claude-code-system-prompts
Claude Code system prompts — up-to-date collection of all internal prompts for subagents, tools, and utilities
This repository provides a comprehensive, up-to-date collection of all internal system prompts used by Claude Code, including those for subagents, slash commands, and built-in tools. It extracts over 110 prompt strings directly from Claude Code's compiled source, ensuring accuracy and tracking changes across 157 versions. Developers can use this resource to understand Claude Code's internal logic or modify prompts via `tweakcc`.
- Comprehensive collection of 110+ Claude Code system prompts
- Tracks prompt changes and token counts across 150+ versions
- Includes prompts for subagents, slash commands, and utilities
- Extracted directly from Claude Code's compiled source for accuracy
README
View on GitHub ↗Check out Piebald
We've released Piebald, the ultimate agentic AI developer experience.
Download it and try it out for free! https://piebald.ai/
Scroll down for Claude Code's system prompts. :point_down:
Claude Code System Prompts
[!important] NEW (January 23, 2026): We've added all of Claude Code's ~40 system reminders to this list—see System Reminders.
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.1.114 (April 17th, 2026). It also contains a CHANGELOG.md for the system prompts across 157 versions since v2.0.14. From the team behind Piebald.
This repository is updated within minutes of each Claude Code release. See the changelog, and follow @PiebaldAI on X for a summary of the system prompt changes in each release.
[!note] ⭐ Star this repository to get notified about new Claude Code versions. For each new Claude Code version, we create a release on GitHub, which will notify all users who've starred the repository.
Why multiple "system prompts?"
Claude Code doesn't just have one single string for its system prompt.
Instead, there are:
- Large portions conditionally added depending on the environment and various configs.
- Descriptions for builtin tools like
Write,Bash, andTodoWrite, and some are fairly large. - Separate system prompts for builtin agents like Explore and Plan.
- Numerous AI-powered utility functions, such as conversation compaction,
CLAUDE.mdgeneration, session title generation, etc. featuring their own systems prompts.
The result—110+ strings that are constantly changing and moving within a very large minified JS file.
[!TIP] Want to modify a particular piece of the system prompt in your own Claude Code installation? Use tweakcc. It—
- lets you customize the the individual pieces of the system prompt as markdown files, and then
- patches your npm-based or native (binary) Claude Code installation with them, and also
- provides diffing and conflict management for when both you and Anthropic have conflicting modifications to the same prompt file.
Extraction
This repository contains the system prompts extracted using a script from the latest npm version of Claude Code. As they're extracted directly from Claude Code's compiled source code, they're guaranteed to be exactly what Claude Code uses. If you use tweakcc to customize the system prompts, it works in a similar way—it patches the exact same strings in your local installation as are extracted into this repository.
Prompts
Note that some prompts contain interpolated bits such as builtin tool name references, lists of available sub agents, and various other context-specific variables, so the actual counts in a particular Claude Code session will differ slightly—likely not beyond ±20 tokens, however.
Agent Prompts
Sub-agents and utilities.
Sub-agents
- Agent Prompt: Explore (494 tks) - System prompt for the Explore subagent.
- Agent Prompt: Plan mode (enhanced) (636 tks) - Enhanced prompt for the Plan subagent.
Creation Assistants
- Agent Prompt: Agent creation architect (1110 tks) - System prompt for creating custom AI agents with detailed specifications.
- Agent Prompt: CLAUDE.md creation (384 tks) - System prompt for analyzing codebases and creating CLAUDE.md documentation files.
- Agent Prompt: Status line setup (2029 tks) - System prompt for the statusline-setup agent that configures status line display.
Slash Commands
- Agent Prompt: /batch slash command (1106 tks) - Instructions for orchestrating a large, parallelizable change across a codebase.
- Agent Prompt: /rename auto-generate session name (80 tks) - Prompt used by /rename (no args) to auto-generate a kebab-case session name from conversation context.
- Agent Prompt: /review-pr slash command (211 tks) - System prompt for reviewing GitHub pull requests with code analysis.
- Agent Prompt: /schedule slash command (2486 tks) - Guides the user through scheduling, updating, listing, or running remote Claude Code agents on cron triggers via the Anthropic cloud API.
- Agent Prompt: /security-review slash command (2550 tks) - Comprehensive security review prompt for analyzing code changes with focus on exploitable vulnerabilities.
Utilities
- Agent Prompt: Agent Hook (133 tks) - Prompt for an 'agent hook'.
- Agent Prompt: Auto mode rule reviewer (257 tks) - Reviews and critiques user-defined auto mode classifier rules for clarity, completeness, conflicts, and actionability.
- Agent Prompt: Bash command description writer (207 tks) - Instructions for generating clear, concise command descriptions in active voice for bash commands.
- Agent Prompt: Bash command prefix detection (823 tks) - System prompt for detecting command prefixes and command injection.
- Agent Prompt: Claude guide agent (734 tks) - System prompt for the claude-guide agent that helps users understand and use Claude Code, the Claude Agent SDK and the Claude API effectively.
- Agent Prompt: Coding session title generator (181 tks) - Generates a title for the coding session.
- Agent Prompt: Conversation summarization (1121 tks) - System prompt for creating detailed conversation summaries.
- Agent Prompt: Determine which memory files to attach (265 tks) - Agent for determining which memory files to attach for the main agent.
- Agent Prompt: Dream memory consolidation (763 tks) - Instructs an agent to perform a multi-phase memory consolidation pass — orienting on existing memories, gathering recent signal from logs and transcripts, merging updates into topic files, and pruning the index.
- Agent Prompt: Dream memory pruning (456 tks) - Instructs an agent to perform a memory pruning pass by deleting stale or invalidated memory files and collapsing duplicates in the memory directory.
- Agent Prompt: General purpose (285 tks) - System prompt for the general-purpose subagent that searches, analyzes, and edits code across a codebase while reporting findings concisely to the caller.
- Agent Prompt: Hook condition evaluator (stop) (145 tks) - System prompt for evaluating hook conditions, specifically stop conditions, in Claude Code.
- Agent Prompt: Managed Agents onboarding flow (2265 tks) - Interactive interview script that walks users through configuring a Managed Agent from scratch — selecting tools, skills, files, environment settings — and emits setup and runtime code.
- Agent Prompt: Memory synthesis (443 tks) - Subagent that reads persistent memory files and returns a JSON synthesis of only the information relevant to each query, with cited filenames.
- Agent Prompt: Onboarding guide generator (1135 tks) - Co-authors a team onboarding guide (ONBOARDING.md) for new Claude Code users by analyzing the creator's usage data, classifying session types, and iterating on the draft collaboratively.
- Agent Prompt: Prompt Suggestion Generator v2 (296 tks) - V2 instructions for generating prompt suggestions for Claude Code.
- Agent Prompt: Quick PR creation (806 tks) - Streamlined prompt for creating a commit and pull request with pre-populated context.
- Agent Prompt: Quick git commit (510 tks) - Streamlined prompt for creating a single git commit with pre-populated context.
- Agent Prompt: Recent Message Summarization (724 tks) - Agent prompt used for summarizing recent messages.
- Agent Prompt: Security monitor for autonomous agent actions (first part) (3101 tks) - Instructs Claude to act as a security monitor that evaluates autonomous coding agent actions against block/allow rules to prevent prompt injection, scope creep, and accidental damage.
- Agent Prompt: Security monitor for autonomous agent actions (second part) (3523 tks) - Defines the environment context, block rules, and allow exceptions that govern which tool actions the agent may or may not perform.
- Agent Prompt: Session memory update instructions (756 tks) - Instructions for updating session memory files during conversations.
- Agent Prompt: Session search (158 tks) - Subagent prompt for searching past Claude Code conversation sessions by scanning .jsonl transcript files and returning matching session IDs.
- Agent Prompt: Session title and branch generation (307 tks) - Agent for generating succinct session titles and git branch names.
- Agent Prompt: Verification specialist (2938 tks) - System prompt for a verification subagent that adversarially tests implementations by running builds, test suites, linters, and adversarial probes, then issuing a PASS/FAIL/PARTIAL verdict.
- Agent Prompt: WebFetch summarizer (189 tks) - Prompt for agent that summarizes verbose output from WebFetch for the main model.
- Agent Prompt: Worker fork (258 tks) - System prompt for a forked worker sub-agent that executes a single directive from the parent agent and reports back concisely.
Data
The content of various template files embedded in Claude Code.
- Data: Claude API reference — C# (4341 tks) - C# SDK reference including installation, client initialization, basic requests, streaming, and tool use.
- Data: Claude API reference — Go (4294 tks) - Go SDK reference.
- Data: Claude API reference — Java (4506 tks) - Java SDK reference including installation, client initialization, basic requests, streaming, and beta tool use.
- Data: Claude API reference — PHP (3486 tks) - PHP SDK reference.
- Data: Claude API reference — Python (3583 tks) - Python SDK reference including installation, client initialization, basic requests, thinking, and multi-turn conversation.
- Data: Claude API reference — Ruby (923 tks) - Ruby SDK reference including installation, client initialization, basic requests, streaming, and beta tool runner.
- Data: Claude API reference — TypeScript (2915 tks) - TypeScript SDK reference including installation, client initialization, basic requests, thinking, and multi-turn conversation.
- Data: Claude API reference — cURL (2201 tks) - Raw API reference for Claude API for use with cURL or else Raw HTTP.
- Data: Claude model catalog (2278 tks) - Catalog of current and legacy Claude models with exact model IDs, aliases, context windows, and pricing.
- Data: Files API reference — Python (1334 tks) - Python Files API reference including file upload, listing, deletion, and usage in messages.
- Data: Files API reference — TypeScript (797 tks) - TypeScript Files API reference including file upload, listing, deletion, and usage in messages.
- Data: GitHub Actions workflow for @claude mentions (525 tks) - GitHub Actions workflow template for triggering Claude Code via @claude mentions.
- Data: GitHub App installation PR description (409 tks) - Template for PR description when installing Claude Code GitHub App integration.
- Data: HTTP error codes reference (2124 tks) - Reference for HTTP error codes returned by the Claude API with common causes and handling strategies.
- Data: Live documentation sources (3639 tks) - WebFetch URLs for fetching current Claude API and Agent SDK documentation from official sources.
- Data: Managed Agents client patterns (2685 tks) - Reference guide of common client-side patterns for driving Managed Agent sessions, including stream reconnection, idle-break gating, tool confirmations, interrupts, and custom tools.
- Data: Managed Agents core concepts (3208 tks) - Reference documentation for the Managed Agents API covering core concepts (Agents, Sessions, Environments, Containers), lifecycle, versioning, endpoints, and usage patterns.
- Data: Managed Agents endpoint reference (4545 tks) - Comprehensive reference for Managed Agents API endpoints, SDK methods, request/response schemas, error handling, and rate limits.
- Data: Managed Agents environments and resources (2909 tks) - Reference documentation covering Managed Agents environments, file resources, GitHub repository mounting, and the Files API with SDK examples.
- Data: Managed Agents events and steering (2428 tks) - Reference guide for sending and receiving events on managed agent sessions, including streaming, polling, reconnection, message queuing, interrupts, and event payload details.
- Data: Managed Agents overview (2202 tks) - Provides the agent with a comprehensive overview of the Managed Agents API architecture, mandatory agent-then-session flow, beta headers, documentation reading guide, and common pitfalls.
- Data: Managed Agents reference — Python (2841 tks) - Reference guide for using the Anthropic Python SDK to create and manage agents, sessions, environments, streaming, custom tools, files, and MCP servers.
- Data: Managed Agents reference — TypeScript (2855 tks) - Reference guide for using the Anthropic TypeScript SDK to create and manage agents, sessions, environments, streaming, custom tools, file uploads, and MCP server integration.
- Data: Managed Agents reference — cURL (2641 tks) - Provides cURL and raw HTTP request examples for the Managed Agents API including environment, agent, and session lifecycle operations.
- Data: Managed Agents tools and skills (3844 tks) - Reference documentation covering the Managed Agents SDK's tool types (agent toolset, MCP, custom), permission policies, vault credential management, and skills API for building specialized agents.
- Data: Message Batches API reference — Python (1544 tks) - Python Batches API reference including batch creation, status polling, and result retrieval at 50% cost.
- Data: Prompt Caching — Design & Optimization (2664 tks) - Document on how to design prompt-building code for effective caching, including placement patterns and anti-patterns.
- Data: Session memory template (292 tks) - Template structure for session memory
summary.mdfiles. - Data: Streaming reference — Python (1436 tks) - Python streaming reference including sync/async streaming and handling different content types.
- Data: Streaming reference — TypeScript (1612 tks) - TypeScript streaming reference including basic streaming and handling different content types.
- Data: Tool use concepts (4147 tks) - Conceptual foundations of tool use with the Claude API including tool definitions, tool choice, and best practices.
- Data: Tool use reference — Python (5106 tks) - Python tool use reference including tool runner, manual agentic loop, code execution, and structured outputs.
- Data: Tool use reference — TypeScript (5033 tks) - TypeScript tool use reference including tool runner, manual agentic loop, code execution, and structured outputs.
System Prompt
Parts of the main system prompt.
- System Prompt: Advisor tool instructions (443 tks) - Instructions for using the Advisor tool.
- System Prompt: Agent Summary Generation (178 tks) - System prompt used for "Agent Summary" generation.
- System Prompt: Agent memory instructions (337 tks) - Instructions for including memory update guidance in agent system prompts.
- System Prompt: Agent thread notes (159 tks) - Behavioral guidelines for agent threads covering absolute paths, response formatting, emoji avoidance, and tool call punctuation.
- System Prompt: Auto mode (255 tks) - Continuous task execution, akin to a background agent.
- System Prompt: Autonomous loop check (1071 tks) - Defines behavior for autonomous timer-based invocations, guiding Claude to continue established work, maintain PRs, and handle repeated idle checks while the user is away.
- System Prompt: Avoiding Unnecessary Sleep Commands (part of PowerShell tool description) (175 tks) - Guidelines for avoiding unnecessary sleep commands in PowerShell scripts, including alternatives for waiting and notification.
- System Prompt: Censoring assistance with malicious activities (98 tks) - Guidelines for assisting with authorized security testing, defensive security, CTF challenges, and educational contexts while censoring requests for malicious activities.
- System Prompt: Chrome browser MCP tools (156 tks) - Instructions for loading Chrome browser MCP tools via MCPSearch before use.
- System Prompt: Claude in Chrome browser automation (759 tks) - Instructions for using Claude in Chrome browser automation tools effectively.
- System Prompt: Communication style (297 tks) - Instructs Claude to give brief, user-facing updates at key moments during tool use, write concise end-of-turn summaries, match response format to task complexity, and avoid comments and planning documents in code.
- System Prompt: Context compaction summary (278 tks) - Prompt used for context compaction summary (for the SDK).
- System Prompt: Description part of memory instructions (148 tks) - Field for describing what the memory is. Part of a bigger effort to instruct Claude how to create memories.
- System Prompt: Doing tasks (ambitious tasks) (47 tks) - Allow users to complete ambitious tasks; defer to user judgement on scope.
- System Prompt: Doing tasks (help and feedback) (24 tks) - How to inform users about help and feedback channels.
- System Prompt: Doing tasks (no compatibility hacks) (52 tks) - Delete unused code completely rather than adding compatibility shims.
- System Prompt: Doing tasks (no unnecessary error handling) (64 tks) - Do not add error handling for impossible scenarios; only validate at boundaries.
- System Prompt: Doing tasks (security) (67 tks) - Avoid introducing security vulnerabilities like injection, XSS, etc.
- System Prompt: Doing tasks (software engineering focus) (104 tks) - Users primarily request software engineering tasks; interpret instructions in that context.
- System Prompt: Dream team memory handling (279 tks) - Instructions for handling shared team memories during dream consolidation, including deduplication, conservative pruning rules, and avoiding accidental promotion of personal memories.
- System Prompt: Executing actions with care (590 tks) - Instructions for executing actions carefully.
- System Prompt: Fork usage guidelines (323 tks) - Instructions for when to fork subagents and rules against reading fork output mid-flight or fabricating fork results.
- System Prompt: Git status (37 tks) - System prompt for displaying the current git status at the start of the conversation.
- System Prompt: Hooks Configuration (1493 tks) - System prompt for hooks configuration. Used for above Claude Code config skill.
- System Prompt: How to use the SendUserMessage tool (283 tks) - Instructions for using the SendUserMessage tool.
- System Prompt: Insights at a glance summary (569 tks) - Generates a concise 4-part summary (what's working, hindrances, quick wins, ambitious workflows) for the insights report.
- System Prompt: Insights friction analysis (139 tks) - Analyzes aggregated usage data to identify friction patterns and categorize recurring issues.
- System Prompt: Insights on the horizon (148 tks) - Identifies ambitious future workflows and opportunities for autonomous AI-assisted development.
- System Prompt: Insights session facets extraction (310 tks) - Extracts structured facets (goal categories, satisfaction, friction) from a single Claude Code session transcript.
- System Prompt: Insights suggestions (748 tks) - Generates actionable suggestions including CLAUDE.md additions, features to try, and usage patterns.
- System Prompt: Learning mode (insights) (142 tks) - Instructions for providing educational insights when learning mode is active.
- System Prompt: Learning mode (1042 tks) - Main system prompt for learning mode with human collaboration instructions.
- System Prompt: Memory description of user details (122 tks) - Describes the purpose and guidelines for per-user memory files that accumulate details about the user's role, goals, knowledge, and preferences across sessions.
- System Prompt: Memory description of user feedback (with explicit save) (146 tks) - Describes the feedback memory type that captures user guidance on work approaches, emphasizing recording both successes and failures and explicitly instructing to save a new memory noting contradictions with team feedback.
- System Prompt: Memory description of user feedback (139 tks) - Describes the user feedback memory type that stores guidance about work approaches, emphasizing recording both successes and failures and checking for contradictions with team memories.
- System Prompt: Memory staleness verification (112 tks) - Instructs the agent to verify memory records against current file/resource state and delete stale memories that conflict with observed reality.
- System Prompt: Minimal mode (164 tks) - Describes the behavior and constraints of minimal mode, which skips hooks, LSP, plugins, auto-memory, and other features while requiring explicit context via CLI flags.
- System Prompt: One of six rules for using sleep command (23 tks) - One of the six rules for using the sleep command.
- System Prompt: Option previewer (151 tks) - System prompt for previewing UI options in a side-by-side layout.
- System Prompt: Parallel tool call note (part of "Tool usage policy") (102 tks) - System prompt for telling Claude to using parallel tool calls.
- System Prompt: Partial compaction instructions (725 tks) - Instructions on how to compact when the user decided to compact only a portion of the conversation, with a
Similar other
MiroFish
Swarm intelligence engine for future prediction — simulates multi-agent interactions to deduce outcomes
paperclip
AI agent orchestration server for autonomous companies — manages teams of bots, goals, budgets, and governance
learn-claude-code
Agent harness engineering tutorial — build the environment and tools for real LLM agents, inspired by Claude Code
LightRAG
Lightweight RAG framework — builds simple, fast, and scalable retrieval-augmented generation systems for LLMs