Prompts2026年3月28日·1 分钟阅读

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 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Prompt
安装
Single
信任
信任等级:Community
入口
Claude Code System Prompts — Full Extraction
先审查命令
npx -y tokrepo@latest install b845abfe-2c4c-4217-85f8-a353adf851c8 --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
Complete reverse-engineering of Claude Code's 110+ dynamic prompts tracked across 135+ versions.
§01

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.

§02

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.

§03

How to use

  1. 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/
  1. Check the CHANGELOG.md for version-by-version changes to understand how prompts evolved.
  1. To customize Claude Code's behavior locally, use the tweakcc tool:
# tweakcc allows safe modification of Claude Code prompts
npx tweakcc
§04

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
§05

Related on TokRepo

§06

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.

常见问题

How are the prompts extracted?+

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.

Are these official Anthropic prompts?+

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.

How many prompts does Claude Code use?+

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.

Can I modify Claude Code's 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.

How often do the prompts change?+

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)
🙏

来源与感谢

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.

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产