How piebald-ai/claude-code-system-prompts works
Purpose and Entry Points
This is a versioned corpus of Claude Code prompt fragments extracted from compiled Claude Code releases, currently documented for v2.1.246. It is primarily consumed by humans, diff tooling, and patching workflows such as tweakcc—not executed as an application. The public index and release history are README.md and CHANGELOG.md.
Content Corpus
The repository’s core artifact is a flat Markdown prompt registry under system-prompts/. Filenames encode the runtime role and feature area, enabling direct lookup and stable diffs. Major families are:
• Main interactive-agent prompt fragments: system-prompts/system-prompt-harness-instructions.md, system-prompts/system-prompt-executing-actions-with-care.md
• Specialized agent prompts: system-prompts/agent-prompt-explore.md, system-prompts/agent-prompt-plan-mode-enhanced.md
• Built-in tool contracts: system-prompts/tool-description-write.md, system-prompts/tool-description-workflow.md
• Embedded reference/template data: system-prompts/data-claude-code-gateway-protocol.md, system-prompts/data-managed-agents-core-concepts.md
• Skill instructions: system-prompts/skill-building-llm-powered-applications-with-claude.md, system-prompts/skill-verify-skill.md
• Runtime notifications/reminders: system-prompts/system-reminder-plan-mode-workflow.md, system-prompts/system-reminder-external-source-trust-boundary.md
Prompt Assembly Boundaries
The corpus reflects Claude Code’s conditional prompt assembly rather than one monolithic prompt. Base system fragments establish identity, safety, tool behavior, planning, memory, and autonomy; runtime selectively adds tool descriptions, skills, agent-specific instructions, reminders, configuration-dependent content, and interpolated session context. Individual files are therefore atomic patch/diff units, not independently runnable prompts.
Agent and Workflow Layer
Agent prompts define distinct control planes for exploration, planning, delegation, background jobs, hooks, review, and utility tasks. Coordinator/worker behavior and isolated worktree execution are represented in system-prompts/system-prompt-coordinator-mode-orchestration.md, system-prompts/agent-prompt-coordinator-worker-instructions.md, and system-prompts/agent-prompt-worker-fork.md. Deterministic multi-agent scripting is documented as a tool contract in system-prompts/tool-description-workflow.md.
Tool, Security, and Trust Contracts
Tool-description files capture the model-visible interface and operational constraints for filesystem, shell, browser, MCP, scheduling, messaging, and Artifact capabilities. High-impact safety boundaries include sandboxing and Git guidance in system-prompts/tool-description-bash-sandbox-mandatory-mode.md and system-prompts/tool-description-bash-git-avoid-destructive-ops.md; untrusted external-content handling in system-prompts/system-reminder-external-source-trust-boundary.md; and autonomous-action review in system-prompts/agent-prompt-security-monitor-for-autonomous-agent-actions-first-part.md.
External Systems Represented
Although this repo does not integrate with services itself, its extracted prompts describe Claude Code’s interfaces with Anthropic’s Claude API, Managed Agents, MCP servers, GitHub, browser automation, Claude.ai Artifacts, cloud scheduling, and self-hosted runners. Key reference payloads include system-prompts/data-managed-agents-endpoint-reference.md, system-prompts/data-claude-code-gateway-protocol.md, and system-prompts/data-self-hosted-runner-command-help.md.
Extraction and Maintenance
The only executable maintenance surface is Node.js tooling: tools/updatePrompts.js updates/generated prompt files, while tools/promptMarkdownUtils.mjs centralizes Markdown processing and has its companion test file. Updates are expected to track Claude Code releases closely; CHANGELOG.md preserves cross-version prompt evolution. There is no service runtime, package manifest, deployment topology, or database in this repository.
Main entry points: tool-description-write.md Tool contracts · system-prompt-harness-instructions.md Base system fragments · updatePrompts.js Prompt updater · system-reminder-plan-mode-workflow.md Runtime reminders
Components 17
Repository Index
- Public index
README.md - Release history · Tracks prompt evolution across Claude Code versions.
CHANGELOG.md
Prompt Fragment Corpus
Atomic Markdown units extracted from Claude Code releases.
- Prompt registry · Flat, versioned registry for lookup, diffs, and patching.
- Base system fragments · Establish identity, safety, planning, memory, autonomy, and tool behavior.
system-prompts/system-prompt-harness-instructions.md - Action-care guidance
system-prompts/system-prompt-executing-actions-with-care.md - Specialized agents · Exploration and enhanced planning control planes.
system-prompts/agent-prompt-explore.md - Coordinator and workers · Defines delegation, workers, and isolated worktree execution.
system-prompts/system-prompt-coordinator-mode-orchestration.md - Tool contracts · Model-visible interfaces for filesystem, shell, browser, MCP, scheduling, messaging, and Artifacts.
system-prompts/tool-description-write.md - Workflow contract · Documents deterministic multi-agent scripting.
system-prompts/tool-description-workflow.md - Safety and trust boundaries · Sandbox, Git safety, external-content trust, and autonomous-action review.
system-prompts/tool-description-bash-sandbox-mandatory-mode.md - Runtime reminders · Conditionally injected workflow and trust-boundary guidance.
system-prompts/system-reminder-plan-mode-workflow.md - Reference payloads · Gateway, Managed Agents, and runner reference material.
system-prompts/data-claude-code-gateway-protocol.md - Skill instructions
system-prompts/skill-building-llm-powered-applications-with-claude.md
Maintenance Tooling
- Prompt updater · Updates or generates extracted prompt files.
tools/updatePrompts.js - Markdown utilities · Central Markdown processing used by maintenance tooling.
tools/promptMarkdownUtils.mjs
Represented Runtime Interfaces
External interfaces described by the prompt corpus, not repository integrations.
- Claude Code assembly · Selectively assembles fragments with configuration and session context.
- External interfaces · Claude API, Managed Agents, MCP, GitHub, browser automation, Artifacts, scheduling, and runners.
Connections 22
- Public index → Prompt registry: indexes
- Release history → Prompt registry: tracks changes to
- Prompt updater → Markdown utilities: uses
- Prompt updater → Prompt registry: updates
- Prompt registry → Base system fragments: contains
- Prompt registry → Specialized agents: contains
- Prompt registry → Coordinator and workers: contains
- Prompt registry → Tool contracts: contains
- Prompt registry → Reference payloads: contains
- Prompt registry → Skill instructions: contains
- Base system fragments → Action-care guidance: includes care guidance
- Claude Code assembly → Base system fragments: assembles
- Claude Code assembly → Specialized agents: selects by role
- Claude Code assembly → Coordinator and workers: selects for delegation
- Claude Code assembly → Tool contracts: adds available tools
- Claude Code assembly → Workflow contract: enables workflows
- Claude Code assembly → Runtime reminders: injects by context
- Claude Code assembly → Skill instructions: adds skills
- Tool contracts → Safety and trust boundaries: constrained by
- Runtime reminders → Safety and trust boundaries: reinforces
- Reference payloads → External interfaces: describes
- Tool contracts → External interfaces: defines interfaces for