Claude Code System Prompts — Full Extraction
Complete extraction of all Claude Code system prompts, 18 tool descriptions, sub-agent prompts, and utility prompts. Tracked across 135+ versions.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install b845abfe-2c4c-4217-85f8-a353adf851c8 --target codex先 dry-run,确认写入项后再运行此命令。
What it is
This is a complete reverse-engineering of Claude Code's internal prompt architecture. It documents 110+ dynamic strings that change based on environment and configuration, extracted directly from compiled source code across 135+ versions (v2.0.14 onward).
The extraction covers agent prompts (explore, plan, batch, PR review, security review), system prompts for all modes (auto, learning, minimal, plan), 18+ built-in tool descriptions, and utility prompts. It is an essential reference for anyone building Claude Code skills, custom agents, or studying how Anthropic instructs Claude Code.
How it saves time or tokens
Understanding Claude Code's prompt architecture helps you write skills and instructions that align with its existing behavioral patterns rather than fighting against them. The extraction reveals how Claude Code prioritizes tools, delegates to sub-agents, and handles safety checks. This knowledge lets you write more effective custom prompts and avoid patterns that conflict with the system prompts. Without this reference, prompt engineering for Claude Code requires extensive trial and error.
How to use
- Visit the repository and browse by category:
git clone https://github.com/Piebald-AI/claude-code-system-prompts
cd claude-code-system-prompts
ls -la
# agent-prompts/ system-prompts/ tool-descriptions/ system-reminders/
- Check the CHANGELOG.md for version-by-version changes to understand how prompts evolved.
- To customize Claude Code's behavior locally, use the tweakcc tool:
# tweakcc allows safe modification of Claude Code prompts
npx tweakcc
Example
The explore agent sub-prompt structure:
# Agent: Explore
Role: Fast codebase exploration
Capabilities:
- Read files
- Search with grep/glob
- Navigate directory structures
Constraints:
- Cannot modify files
- Cannot run commands
- Optimized for speed over depth
# Agent: Plan
Role: Software architecture planning
Capabilities:
- Read files
- Analyze dependencies
- Generate implementation plans
Constraints:
- Cannot modify files
- Cannot run commands
- Provides structured plans for the main agent
Related on TokRepo
- Prompt library — Browse more prompts and skills for AI agents.
- Featured workflows — Discover curated AI tools and frameworks on TokRepo.
Common pitfalls
- Trying to override system prompts with custom instructions that contradict them leads to inconsistent behavior. Work with the existing prompt patterns, not against them.
- Assuming prompts are static. Claude Code's prompts change between versions. Check the CHANGELOG before building tools that depend on specific prompt behaviors.
- Using extracted prompts verbatim in other AI systems. The prompts are optimized for Claude's specific capabilities and may not work well with other models.
常见问题
The prompts are extracted from Claude Code's compiled source code by analyzing the JavaScript bundles. Each version is compared to detect changes, and the CHANGELOG documents what changed between versions.
These are the actual prompts used by Claude Code, extracted from the production builds. They are not published by Anthropic directly. The extraction is maintained by the Piebald-AI community.
Claude Code uses 110+ dynamic prompt strings. These include system prompts for different modes, agent prompts for sub-agents (explore, plan, batch), 18+ tool descriptions, and various system reminders and utility prompts.
The tweakcc tool allows safe modification of Claude Code's local prompts. However, modifying system prompts may cause unexpected behavior. A safer approach is to use CLAUDE.md and skills to add context without modifying core prompts.
Claude Code releases frequently, and prompts change with most releases. The repository tracks 135+ versions and documents changes in the CHANGELOG. Major prompt architecture changes happen every few months.
引用来源 (3)
- Claude Code System Prompts GitHub— Claude Code system prompts extraction across 135+ versions
- Anthropic Documentation— Claude Code official documentation
- tweakcc GitHub— tweakcc tool for Claude Code prompt customization
来源与感谢
Created by Piebald-AI. Licensed under MIT. claude-code-system-prompts — ⭐ 6,900+
Thanks to the Piebald AI team for meticulously extracting and tracking Claude Code's internal prompt architecture.
讨论
相关资产
System Prompts — Extracted from 30+ AI Coding Tools
Full system prompts extracted from Claude Code, Cursor, Devin, Windsurf, Replit, v0, and 25+ more AI tools. See exactly how they work.
Claude Code vs Cursor — When to Use Which
Practical comparison guide for developers choosing between Claude Code (terminal agent) and Cursor (AI IDE). Covers strengths, workflows, pricing, and when each tool shines with real-world examples.
Prompt Architect — 27 Frameworks for Expert Prompts
Transform vague prompts into structured, expert-level prompts using 27 research-backed frameworks across 7 intent categories. Works with Claude Code, ChatGPT, Cursor, and 30+ AI tools.
Awesome LLM Apps — 50+ AI App Recipes with Source Code
Curated collection of 50+ production-ready AI application examples with full source code. RAG chatbots, AI agents, multi-model apps, and more. Each recipe is a complete, runnable project. 6,000+ stars.