Claude Code System Prompt
Overview (confidence: high)
Claude Code uses a deeply nested markdown envelope (## > ### > ####) with extensive workflow automation. It is one of the largest prompts in the corpus alongside Manus and Xcode, and represents the most mature single-prompt autonomous agent analyzed.
Envelope Format (confidence: high)
Deeply nested markdown headers (3-4 levels of hierarchy). The nesting enables rich structural organization without XML overhead. Tasks are organized under distinct header branches with clear parent-child relationships.
Workflow Patterns (confidence: high)
Claude Code implements a task state machine lifecycle: pending → active → done → verified. Tasks are tracked in a structured todo list with explicit completion criteria. The prompt instructs parallel tool call maximization — independent operations are executed simultaneously to reduce latency. Multi-command parallel execution chains dependent commands with && and independent ones with ;.
Tool Schema (confidence: high)
Tools are defined using markdown API documentation format under section headers. Each tool includes: name, parameters with constraints, return value format, side-effect warnings, and usage examples. Core tools include code editing, terminal execution, and search capabilities.
Guardrails (confidence: high)
Security rules prohibit committing secrets or credentials, running dangerous commands without confirmation, modifying credential-bearing config files, and executing unverified commands. Crisis detection identifies self-harm or safety-related user messages and prioritizes safety resources.
Communication Style (confidence: high)
Follows explain-before-do pattern — reasoning is presented before actions. The tone is pedagogical and thorough, suitable for complex development tasks.
Unique Features (confidence: high)
- cooldown-heuristics: If rapid repeated failures are detected, the agent pauses, summarizes the situation, and asks user for guidance before proceeding.
- Proactive memory system: Memory file is loaded at session start with key facts, user preferences, and project context. Session ends with memory update.
- Git-commit-retrieval: Uses git log and git diff to understand recent changes and project history.
- MCP app suggestion protocol: If the user describes a problem solvable by an MCP server, suggests installing one from a curated registry.
- Versioning and update instructions: Prompt includes version number and change log, typically at top or bottom of prompt.
Implications (confidence: high)
Claude Code represents the most mature single-prompt autonomous agent in the corpus. Its combination of task state machine, proactive memory, and cooldown heuristics sets a standard for agent reliability. The deeply nested markdown envelope enables rich structure without XML overhead.
Costs and Token Usage (confidence: high)
Claude Code bills by API token consumption. The product exposes a cost-management surface: /usage shows a per-session token/cost breakdown plus plan-limit attribution (skills, subagents, plugins, MCP servers) with day/week toggles, and /usage-credits manages over-limit spend. Costs scale with context size, so the product’s guidance centers on token-usage-reduction: prompt caching, auto-compaction, model selection (Sonnet default, Opus reserved, haiku subagents), context hygiene, preprocessing hooks, and on-demand skills.
Implications
Cost is an explicit design dimension of the Claude Code ecosystem — the system prompt ships with tooling (/usage, /compact) and platform features (caching, hooks, deferred MCP definitions) to manage it. A mature agent prompt must account for token economics, not just output quality.
Relationships
- “sibling-of” claude-opus-5-system-prompt — CLI coding agent vs consumer chat surface; both are Claude-family prompt designs
- “sibling-of” claude-code-opus-5-system-prompt — this page is the synthesized summary; the new page is the primary-source real prompt
Sources
- [raw/prompts/articles/taxonomy-synthesis-2026-07-16.md]
- raw/prompts/articles/claude-code-costs-reduce-token-usage.md