Back to Skills

claude-code-internals

verified

This skill should be used when the user asks to "explore claude code source", "find internal features", "investigate cli.js", "check beta headers", "discover hidden settings", or mentions "minified code analysis", "anthropic-beta headers", "context management internals".

View on GitHub

Marketplace

cc-plugin

jongwony/cc-plugin

Plugin

claude-code-internals

Repository

jongwony/cc-plugin

claude-code-internals/skills/claude-code-internals/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/jongwony/cc-plugin/blob/main/claude-code-internals/skills/claude-code-internals/SKILL.md -a claude-code --skill claude-code-internals

Installation paths:

Claude
.claude/skills/claude-code-internals/
Powered by add-skill CLI

Instructions

<constraints>
- **Output limit**: Always use `| head -N` (SIGTRAP risk from session bloat)
- **Relative paths**: Use `scripts/`, `references/` (not absolute paths)
</constraints>

# Claude Code Internals Explorer

Procedures for analyzing Claude Code's standalone binary.

## Quick Start

> **Note**: All script paths are relative to this skill's directory (where SKILL.md resides).

**Delegate all binary exploration to subagent:**

```
Task tool (subagent_type: Explore)
Prompt: "Run scripts/find_installation.sh to get binary path.
        Then search for [keyword] using: strings $BINARY | grep -E '[pattern]' | head -50
        Return: version, matching lines with context (-B2 -A2)."
```

The subagent handles token-heavy strings output; main context receives only summarized findings.

## Zero-Context Mode (Recommended)

**Problem**: Subagent output is recorded in session logs. Binary analysis can cause session file bloat → SIGTRAP crashes.

**Solution**: Write prompt to temp file, then execute via Headless CLI wrapper. Script internals are not logged; only final stdout is recorded.

### Workflow

1. **Write prompt** to temp file (supports multiline)
2. **Execute** `scripts/analyze-binary.sh <prompt_file> [allowed_tools]`

### Script Interface

| Argument | Description | Default |
|----------|-------------|---------|
| `$1` | Prompt file path (required) | - |
| `$2` | Allowed tools (comma-separated) | `Bash,Read,Glob,Grep` |

The script injects `BINARY_PATH` automatically.

### Example

```bash
# Use unique ID in filename for parallel independence
PROMPT_FILE="/tmp/internals_prompt_$$.txt"

# 1. Write prompt to temp file
cat > "$PROMPT_FILE" << 'EOF'
Search the binary for beta headers.

Instructions:
1. Use: strings "$BINARY_PATH" | grep -E "anthropic-beta|20[0-9]{2}-[0-9]{2}" | head -30
2. List all matching headers with their apparent status
3. Note any patterns suggesting feature flags
EOF

# 2. Execute with tool restriction
scripts/analyze-binary.sh "$PROMPT_FILE" "B

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6615 chars