claude-code-source-recovery — Claude Code skill: read the CLI source
Walks an agent through the recovered TypeScript source of Claude 2.1.88: commands, MCP wiring and the terminal UI.
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a claude-codeWhat claude-code-source-recovery does
This skill points the agent at the reconstructed source tree of @anthropic-ai/claude-code 2.1.88. The tree came out of a source map, cli.js.map, that was published to npm by mistake; unpacking it yields roughly 700,000 lines of TypeScript split across src/entrypoints, src/commands, src/components, src/services, src/hooks, src/utils and src/ink.
Four areas get covered: how the CLI boots, how commands are resolved from built-ins, skills, plugins and MCP, the Ink and React pieces behind the interface, and stdio connections to MCP servers. A TypeScript snippet in the README reads a source map and writes each file back out into a directory tree.
The original 2.1.88 package is gone from npm, so the README installs it from the Tencent mirror through a direct .tgz link. You need your own copy of cli.js.map — the extraction script has nothing to read without it.
What it helps with
- trace how the CLI resolves commands from several sources
- inspect the Ink and React terminal components
- see how an MCP client is wired into a real CLI
- turn a source map back into a readable file tree
- find session, auth and tool-execution code in the tree
Example prompts for the agent
- Show me how command loading works in the recovered Claude source
- Walk through the MCP client files under
src/services - Explain how to get a source tree out of
cli.js.map
How to install claude-code-source-recovery
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a claude-code2Manually: put the files in place
~/.claude/skills/claude-code-source-recovery/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/claude-code-source-recovery/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a codex2Manually: put the files in place
.agents/skills/claude-code-source-recovery/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a cursor2Manually: put the files in place
.cursor/skills/claude-code-source-recovery/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills claude-code-source-recovery2Manually: put the files in place
.github/skills/claude-code-source-recovery/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/claude-code-source-recoveryManually: put the files in place
.devin/skills/claude-code-source-recovery/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about claude-code-source-recovery
How do I install claude-code-source-recovery in Claude Code?
Run npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a claude-code. The skill lands at ~/.claude/skills/claude-code-source-recovery/SKILL.md.
What does claude-code-source-recovery do?
It helps the agent navigate the recovered TypeScript source of Claude 2.1.88: CLI startup, the command system, MCP integration and the terminal UI components.
What do I need to extract the sources myself?
A copy of the cli.js.map source map. The README includes a TypeScript example that reads it and writes the files into directories.