# claude-code-source-recovery

Walks an agent through the recovered TypeScript source of Claude 2.1.88: commands, MCP wiring and the terminal UI.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 693 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/claude-code-source-recovery/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/claude-code-source-recovery

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/claude-code-source-recovery/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/claude-code-source-recovery/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/claude-code-source-recovery/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/claude-code-source-recovery/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills claude-code-source-recovery
```

2. **Manually: put the files in place**
- File: `.github/skills/claude-code-source-recovery/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/claude-code-source-recovery
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/claude-code-source-recovery/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill claude-code-source-recovery -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/claude-code-source-recovery/SKILL.md

## When to use it
- 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
- 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`

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 139 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
