A structured extraction of every system prompt, instruction template, and prompt fragment embedded in the Claude Code CLI source code. The repository makes it easy to browse, search, and study how Claude Code is instructed under the hood.
This repository does NOT contain any part of the Claude Code source code or codebase. It contains only the extracted prompt text — the natural-language instructions that Claude Code sends to the model. No application logic, no TypeScript implementation, no proprietary code of any kind is included. The
source_mirrors/directory holds only the prompt-oriented fragments needed for traceability, not runnable source code.
Screencast.from.2026-04-04.23-28-48.mp4
git clone https://github.com/PayMeService/extracted_prompts.git
cd extracted_prompts
xdg-open playground.html # Linux
# or: open playground.html (macOS)
# or: start playground.html (Windows)No dependencies, no build step — just clone and open.
| Path | Description | Count |
|---|---|---|
prompts/general/ |
Prompt strings, templates, and instruction blocks from the TypeScript codebase | 254 |
prompts/ant_guarded/ |
Prompts behind USER_TYPE === 'ant' (Anthropic-internal) gates |
27 |
source_mirrors/ |
Verbatim copies of every prompt-oriented source file for traceability | 122 |
markdown/missing/ |
Placeholder records for Markdown files referenced by code but absent from the checkout | 50 |
Supporting files:
manifest.json— machine-readable index of every extracted entry (name, type, source location, output path, ant-guard status)prompt_index.md— human-readable list of all 254 general prompt entries with source file and line numbersant_guarded_index.md— same for the 27 Anthropic-internal entriesmarkdown_references.md— every.mdfile the code tries to load at runtime, with resolution status
Open playground.html in a browser for a full-featured explorer UI:
- Fuzzy search across all prompt entries
- Filter by category (general vs. ant-guarded) and source file
- Side-by-side source location and extracted prompt content
- Syntax-highlighted prompt text with collapsible sections
No build step or server required — it's a single self-contained HTML file that reads manifest.json at load time.
These source files contain the densest clusters of Anthropic-internal prompt material:
constants/prompts.ts— core system prompt assembly (language, tone, output efficiency, model marketing names)tools/FileEditTool/prompt.ts— edit tool description overridestools/BashTool/prompt.ts— bash tool description overridestools/ToolSearchTool/prompt.ts— tool search descriptiontools/AgentTool/prompt.ts— agent/subagent dispatching instructionstools/EnterPlanModeTool/prompt.ts— plan mode entry promptcommands/init.ts—/initcommand prompt
This extraction was performed using OpenAI Codex powered by GPT-5.4-xhigh-reason. The agent was given the Claude Code source tree and tasked with systematically walking every file, identifying prompt-shaped string literals, template expressions, and function return values, then writing each one to a standalone Markdown file. Ant-guarded code paths were detected by inspecting surrounding if / ternary conditions for USER_TYPE checks and flagged accordingly. The full process — traversal, classification, extraction, and index generation — was carried out autonomously by the model in a single Codex session.