Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e92d4f32a | ||
|
|
8608dfe566 | ||
|
|
74f41c979c | ||
|
|
0902a0e57d | ||
|
|
fea594c920 | ||
|
|
b314d14476 |
@@ -4,6 +4,27 @@ Note: Only use **NEW:** for entirely new prompt files, NOT for new additions/sec
|
|||||||
|
|
||||||
### Claude Code System Prompts Changelog
|
### Claude Code System Prompts Changelog
|
||||||
|
|
||||||
|
# [2.0.52](https://github.com/Piebald-AI/claude-code-system-prompts/commit/74f41c979c84103343d0d92f086678911e0b7d36)
|
||||||
|
|
||||||
|
_+42 tokens_
|
||||||
|
|
||||||
|
- Add a 4th note to the procedure steps in the Plan Mode Re-entry System Prompt: _"Continue on with the plan process and most importantly you should always edit the plan file one way or the other before calling ExitPlanMode._"
|
||||||
|
|
||||||
|
# [2.0.51](https://github.com/Piebald-AI/claude-code-system-prompts/commit/fea594c92014ec7c6133e771afc1a55a034a15ee)
|
||||||
|
|
||||||
|
_+906 tokens_
|
||||||
|
|
||||||
|
- **NEW:** Prompt for the new `EnterPlanMode` tool.
|
||||||
|
- **NEW:** Prompt for agent hooks.
|
||||||
|
|
||||||
|
# [2.0.50](https://github.com/Piebald-AI/claude-code-system-prompts/commit/f19b049975ac24bf548b6c95dfe6a385c6bdf4a9)
|
||||||
|
|
||||||
|
_+465 tokens_
|
||||||
|
|
||||||
|
- **NEW:** System reminder sent when an `mcp-cli read` or `mcp-cli call` output is longer than the `MAX_MCP_OUTPUT_TOKENS` environment variable (defaults to `25000`)
|
||||||
|
- `WebSearch` tool description: Added a "CRITICAL REQUIREMENT" to include a "Sources:" section whenever performing a web search.
|
||||||
|
- Session notes template: Added a "Key results" section including "specific outputs" such as "an answer to question, a table, or other document."
|
||||||
|
|
||||||
# [2.0.49](https://github.com/Piebald-AI/claude-code-system-prompts/commit/ec960fe987da2dfdb026f733fcd30120ac1a116e)
|
# [2.0.49](https://github.com/Piebald-AI/claude-code-system-prompts/commit/ec960fe987da2dfdb026f733fcd30120ac1a116e)
|
||||||
|
|
||||||
- **Explore & Plan agents:**
|
- **Explore & Plan agents:**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Claude Code System Prompts
|
# Claude Code System Prompts
|
||||||
|
|
||||||
This repository contains an up-to-date list of all Claude Code's various system prompts and their associated token counts as of **[Claude Code v2.0.50](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.0.50) (November 21st, 2025).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 31 versions since v2.0.14.
|
This repository contains an up-to-date list of all Claude Code's various system prompts and their associated token counts as of **[Claude Code v2.0.53](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.0.53) (November 24th, 2025).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 34 versions since v2.0.14.
|
||||||
|
|
||||||
Why multiple "system prompts?"
|
Why multiple "system prompts?"
|
||||||
|
|
||||||
@@ -48,6 +48,7 @@ Sub-agents and utilities.
|
|||||||
|
|
||||||
### Utilities
|
### Utilities
|
||||||
|
|
||||||
|
- [Agent Prompt: Agent Hook](./system-prompts/agent-prompt-agent-hook.md) (**133** tks) - Prompt for an 'agent hook'.
|
||||||
- [Agent Prompt: Bash command file path extraction](./system-prompts/agent-prompt-bash-command-file-path-extraction.md) (**286** tks) - System prompt for extracting file paths from bash command output.
|
- [Agent Prompt: Bash command file path extraction](./system-prompts/agent-prompt-bash-command-file-path-extraction.md) (**286** tks) - System prompt for extracting file paths from bash command output.
|
||||||
- [Agent Prompt: Bash command prefix detection](./system-prompts/agent-prompt-bash-command-prefix-detection.md) (**835** tks) - System prompt for detecting command prefixes and command injection.
|
- [Agent Prompt: Bash command prefix detection](./system-prompts/agent-prompt-bash-command-prefix-detection.md) (**835** tks) - System prompt for detecting command prefixes and command injection.
|
||||||
- [Agent Prompt: Bash output summarization](./system-prompts/agent-prompt-bash-output-summarization.md) (**605** tks) - System prompt for determining whether bash command output should be summarized.
|
- [Agent Prompt: Bash output summarization](./system-prompts/agent-prompt-bash-output-summarization.md) (**605** tks) - System prompt for determining whether bash command output should be summarized.
|
||||||
@@ -93,13 +94,14 @@ Text for large system reminders.
|
|||||||
- [System Reminder: Plan mode is active (enhanced)](./system-prompts/system-reminder-plan-mode-is-active-enhanced.md) (**789** tks) - Enhanced plan mode system reminder with parallel exploration and multi-agent planning.
|
- [System Reminder: Plan mode is active (enhanced)](./system-prompts/system-reminder-plan-mode-is-active-enhanced.md) (**789** tks) - Enhanced plan mode system reminder with parallel exploration and multi-agent planning.
|
||||||
- [System Reminder: Plan mode is active (for subagents)](./system-prompts/system-reminder-plan-mode-is-active-for-subagents.md) (**310** tks) - Simplified plan mode system reminder for sub agents.
|
- [System Reminder: Plan mode is active (for subagents)](./system-prompts/system-reminder-plan-mode-is-active-for-subagents.md) (**310** tks) - Simplified plan mode system reminder for sub agents.
|
||||||
- [System Reminder: Plan mode is active](./system-prompts/system-reminder-plan-mode-is-active.md) (**242** tks) - System reminder sent to Claude when the user enters plan mode.
|
- [System Reminder: Plan mode is active](./system-prompts/system-reminder-plan-mode-is-active.md) (**242** tks) - System reminder sent to Claude when the user enters plan mode.
|
||||||
- [System Reminder: Plan mode re-entry](./system-prompts/system-reminder-plan-mode-re-entry.md) (**194** tks) - System reminder sent when the user enters Plan mode after having previously exited it either via shift+tab or by approving Claude's plan..
|
- [System Reminder: Plan mode re-entry](./system-prompts/system-reminder-plan-mode-re-entry.md) (**236** tks) - System reminder sent when the user enters Plan mode after having previously exited it either via shift+tab or by approving Claude's plan..
|
||||||
- [System Reminder: `mcp-cli` Large Output](./system-prompts/system-reminder-mcp-cli-large-output.md) (**265** tks) - System reminder sent when the output of an `mcp-cli read` or `mcp-cli call` command is greater than the MAX_MCP_OUTPUT_TOKENS environment variable (defaults to 25000).
|
- [System Reminder: `mcp-cli` Large Output](./system-prompts/system-reminder-mcp-cli-large-output.md) (**265** tks) - System reminder sent when the output of an `mcp-cli read` or `mcp-cli call` command is greater than the MAX_MCP_OUTPUT_TOKENS environment variable (defaults to 25000).
|
||||||
|
|
||||||
### Builtin Tool Descriptions
|
### Builtin Tool Descriptions
|
||||||
|
|
||||||
- [Tool Description: Bash](./system-prompts/tool-description-bash.md) (**1074** tks) - Description for the Bash tool, which allows Claude to run shell commands.
|
- [Tool Description: Bash](./system-prompts/tool-description-bash.md) (**1074** tks) - Description for the Bash tool, which allows Claude to run shell commands.
|
||||||
- [Tool Description: Edit](./system-prompts/tool-description-edit.md) (**278** tks) - Tool description for performing exact string replacements in files.
|
- [Tool Description: Edit](./system-prompts/tool-description-edit.md) (**278** tks) - Tool description for performing exact string replacements in files.
|
||||||
|
- [Tool Description: EnterPlanMode](./system-prompts/tool-description-enterplanmode.md) (**773** tks) - Description for the EnterPlanMode tool, which lets Claude enter plan mode proactively..
|
||||||
- [Tool Description: ExitPlanMode v2](./system-prompts/tool-description-exitplanmode-v2.md) (**450** tks) - V2 description for the ExitPlanMode tool, which presents a plan dialog for the user to approve.
|
- [Tool Description: ExitPlanMode v2](./system-prompts/tool-description-exitplanmode-v2.md) (**450** tks) - V2 description for the ExitPlanMode tool, which presents a plan dialog for the user to approve.
|
||||||
- [Tool Description: ExitPlanMode](./system-prompts/tool-description-exitplanmode.md) (**342** tks) - Description for the ExitPlanMode tool, which presents a plan dialog for the user to approve.
|
- [Tool Description: ExitPlanMode](./system-prompts/tool-description-exitplanmode.md) (**342** tks) - Description for the ExitPlanMode tool, which presents a plan dialog for the user to approve.
|
||||||
- [Tool Description: Glob](./system-prompts/tool-description-glob.md) (**122** tks) - Tool description for file pattern matching and searching by name.
|
- [Tool Description: Glob](./system-prompts/tool-description-glob.md) (**122** tks) - Tool description for file pattern matching and searching by name.
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<!--
|
||||||
|
name: 'Agent Prompt: Agent Hook'
|
||||||
|
description: Prompt for an 'agent hook'
|
||||||
|
ccVersion: 2.0.51
|
||||||
|
variables:
|
||||||
|
- TRANSCRIPT_PATH
|
||||||
|
- STRUCTURED_OUTPUT_TOOL_NAME
|
||||||
|
-->
|
||||||
|
You are verifying a stop condition in Claude Code. Your task is to verify that the agent completed the given plan. The conversation transcript is available at: ${TRANSCRIPT_PATH}
|
||||||
|
You can read this file to analyze the conversation history if needed.
|
||||||
|
|
||||||
|
Use the available tools to inspect the codebase and verify the condition.
|
||||||
|
Use as few steps as possible - be efficient and direct.
|
||||||
|
|
||||||
|
When done, return your result using the ${STRUCTURED_OUTPUT_TOOL_NAME} tool with:
|
||||||
|
- ok: true if the condition is met
|
||||||
|
- ok: false with reason if the condition is not met
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
<!--
|
<!--
|
||||||
name: 'System Reminder: Plan mode re-entry'
|
name: 'System Reminder: Plan mode re-entry'
|
||||||
description: System reminder sent when the user enters Plan mode after having previously exited it either via shift+tab or by approving Claude's plan.
|
description: System reminder sent when the user enters Plan mode after having previously exited it either via shift+tab or by approving Claude's plan.
|
||||||
ccVersion: 2.0.47
|
ccVersion: 2.0.52
|
||||||
variables:
|
variables:
|
||||||
- SYSTEM_REMINDER
|
- SYSTEM_REMINDER
|
||||||
|
- EXIT_PLAN_MODE_TOOL_OBJECT
|
||||||
-->
|
-->
|
||||||
## Re-entering Plan Mode
|
## Re-entering Plan Mode
|
||||||
|
|
||||||
@@ -15,5 +16,6 @@ You are returning to plan mode after having previously exited it. A plan file ex
|
|||||||
3. Decide how to proceed:
|
3. Decide how to proceed:
|
||||||
- **Different task**: If the user's request is for a different task—even if it's similar or related—start fresh by overwriting the existing plan
|
- **Different task**: If the user's request is for a different task—even if it's similar or related—start fresh by overwriting the existing plan
|
||||||
- **Same task, continuing**: If this is explicitly a continuation or refinement of the exact same task, modify the existing plan while cleaning up outdated or irrelevant sections
|
- **Same task, continuing**: If this is explicitly a continuation or refinement of the exact same task, modify the existing plan while cleaning up outdated or irrelevant sections
|
||||||
|
4. Continue on with the plan process and most importantly you should always edit the plan file one way or the other before calling ${EXIT_PLAN_MODE_TOOL_OBJECT.name}
|
||||||
|
|
||||||
Treat this as a fresh planning session. Do not assume the existing plan is relevant without evaluating it first.
|
Treat this as a fresh planning session. Do not assume the existing plan is relevant without evaluating it first.
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<!--
|
||||||
|
name: 'Tool Description: EnterPlanMode'
|
||||||
|
description: Description for the EnterPlanMode tool, which lets Claude enter plan mode proactively.
|
||||||
|
ccVersion: 2.0.51
|
||||||
|
variables:
|
||||||
|
- ASK_USER_QUESTION_TOOL_NAME
|
||||||
|
-->
|
||||||
|
Use this tool when you encounter a complex task that requires careful planning and exploration before implementation. This tool transitions you into plan mode where you can thoroughly explore the codebase and design an implementation approach.
|
||||||
|
|
||||||
|
## When to Use This Tool
|
||||||
|
|
||||||
|
Use EnterPlanMode when ANY of these conditions apply:
|
||||||
|
|
||||||
|
1. **Multiple Valid Approaches**: The task can be solved in several different ways, each with trade-offs
|
||||||
|
- Example: "Add caching to the API" - could use Redis, in-memory, file-based, etc.
|
||||||
|
- Example: "Improve performance" - many optimization strategies possible
|
||||||
|
|
||||||
|
2. **Significant Architectural Decisions**: The task requires choosing between architectural patterns
|
||||||
|
- Example: "Add real-time updates" - WebSockets vs SSE vs polling
|
||||||
|
- Example: "Implement state management" - Redux vs Context vs custom solution
|
||||||
|
|
||||||
|
3. **Large-Scale Changes**: The task touches many files or systems
|
||||||
|
- Example: "Refactor the authentication system"
|
||||||
|
- Example: "Migrate from REST to GraphQL"
|
||||||
|
|
||||||
|
4. **Unclear Requirements**: You need to explore before understanding the full scope
|
||||||
|
- Example: "Make the app faster" - need to profile and identify bottlenecks
|
||||||
|
- Example: "Fix the bug in checkout" - need to investigate root cause
|
||||||
|
|
||||||
|
5. **User Input Needed**: You'll need to ask clarifying questions before starting
|
||||||
|
- If you would use ${ASK_USER_QUESTION_TOOL_NAME} to clarify the approach, consider EnterPlanMode instead
|
||||||
|
- Plan mode lets you explore first, then present options with context
|
||||||
|
|
||||||
|
## When NOT to Use This Tool
|
||||||
|
|
||||||
|
Do NOT use EnterPlanMode for:
|
||||||
|
- Simple, straightforward tasks with obvious implementation
|
||||||
|
- Small bug fixes where the solution is clear
|
||||||
|
- Adding a single function or small feature
|
||||||
|
- Tasks you're already confident how to implement
|
||||||
|
- Research-only tasks (use the Task tool with explore agent instead)
|
||||||
|
|
||||||
|
## What Happens in Plan Mode
|
||||||
|
|
||||||
|
In plan mode, you'll:
|
||||||
|
1. Thoroughly explore the codebase using Glob, Grep, and Read tools
|
||||||
|
2. Understand existing patterns and architecture
|
||||||
|
3. Design an implementation approach
|
||||||
|
4. Present your plan to the user for approval
|
||||||
|
5. Use ${ASK_USER_QUESTION_TOOL_NAME} if you need to clarify approaches
|
||||||
|
6. Exit plan mode with ExitPlanMode when ready to implement
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### GOOD - Use EnterPlanMode:
|
||||||
|
User: "Add user authentication to the app"
|
||||||
|
- This requires architectural decisions (session vs JWT, where to store tokens, middleware structure)
|
||||||
|
|
||||||
|
User: "Optimize the database queries"
|
||||||
|
- Multiple approaches possible, need to profile first, significant impact
|
||||||
|
|
||||||
|
User: "Implement dark mode"
|
||||||
|
- Architectural decision on theme system, affects many components
|
||||||
|
|
||||||
|
### BAD - Don't use EnterPlanMode:
|
||||||
|
User: "Fix the typo in the README"
|
||||||
|
- Straightforward, no planning needed
|
||||||
|
|
||||||
|
User: "Add a console.log to debug this function"
|
||||||
|
- Simple, obvious implementation
|
||||||
|
|
||||||
|
User: "What files handle routing?"
|
||||||
|
- Research task, not implementation planning
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
- This tool REQUIRES user approval - they must consent to entering plan mode
|
||||||
|
- Be thoughtful about when to use it - unnecessary plan mode slows down simple tasks
|
||||||
|
- If unsure whether to use it, err on the side of starting implementation
|
||||||
|
- You can always ask the user "Would you like me to plan this out first?"
|
||||||
Reference in New Issue
Block a user