Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Claude Code System Prompts

A research project exploring how modern agentic AI coding assistants work under the hood. This repository contains our best understanding of the prompt architecture, agent coordination patterns, and security mechanisms that power tools like Claude Code.

Everything here is based on behavioral observation, output analysis, community discussions, and publicly shared information. These are reconstructed approximations, not verbatim copies. The actual implementation may differ significantly.

What This Project Is

This is an educational deep-dive into the design patterns behind agentic coding assistants. We analyze how these systems:

  • Assemble dynamic system prompts at runtime
  • Coordinate multiple specialized sub-agents
  • Classify and auto-approve tool calls safely
  • Manage context windows through intelligent compaction
  • Handle memory, skills, and user preferences

The goal is to help AI engineers, researchers, and builders learn from these architectural patterns and apply them in their own projects.

What This Project Is Not

This is not a leak, dump, or direct copy of any proprietary system. The prompts documented here are our best reconstructions based on observable behavior. They represent one interpretation of how these systems likely work.

Documented Patterns

Core Identity

#PatternDescription
01Main System PromptHow the master prompt is dynamically assembled from modular sections
02Simple ModeMinimal prompt variant for lightweight operation
03Default Agent PromptBase instructions inherited by all sub-agents
04Cyber Risk InstructionSecurity boundaries between authorized and prohibited actions

Orchestration

#PatternDescription
05Coordinator System PromptMulti-worker orchestration with phased workflows
06Teammate Prompt AddendumCommunication protocols for multi-agent collaboration

Specialized Agents

#PatternDescription
07Verification AgentAdversarial testing agent that validates implementations
08Explore AgentRead-only codebase exploration with no-modify constraints
09Agent Creation ArchitectGenerates new agent configurations from requirements
10Status Line Setup AgentTerminal status line configuration across shells

Security and Permissions

#PatternDescription
11Permission ExplainerRisk assessment before tool approval
12Auto Mode ClassifierMulti-stage security classifier for autonomous tool execution

Tool Descriptions

#PatternDescription
13Tool-Specific PromptsHow individual tools (Bash, Edit, Agent, etc.) describe themselves

Utility Patterns

#PatternDescription
14Tool Use SummaryGenerating concise labels for completed tool batches
15Session SearchSemantic search across past conversation sessions
16Memory SelectionSelecting relevant memory files for query context
17Auto Mode CritiqueReviewing user-written classifier rules
20Session TitleLightweight title generation for session management
29Agent SummaryBackground progress updates for sub-agents
30Prompt SuggestionPredicting likely user follow-up commands

Context Window Management

#PatternDescription
21Compact ServiceConversation summarization strategies for long sessions
22Away SummaryBrief session recaps for returning users

Dynamic Behaviors

#PatternDescription
18Proactive ModeAutonomous background operation with pacing controls
23Chrome Browser AutomationBrowser extension integration patterns
24Memory InstructionHierarchical memory loading and override semantics

Skill Patterns

#PatternDescription
19Simplify SkillMulti-agent parallel code review pattern
25Skillify SkillInterview-based skill creation workflow
26Stuck SkillSession diagnostic and recovery patterns
27Remember SkillMemory organization and promotion workflow
28Update Config SkillConfiguration management patterns

Architectural Observations

Dynamic Prompt Assembly

Based on our analysis, the system prompt appears to be assembled through a pipeline of modular builders:

Prompt Assembly Pipeline
    |
    |   Cacheable Prefix (stable across sessions)
    |-- Identity and safety instructions
    |-- Permission and hook configuration
    |-- Code style and error handling rules
    |-- Tool preferences and usage patterns
    |-- Tone, style, and output rules
    |
    |   Cache Boundary
    |
    |   Dynamic Suffix (changes per session)
    |-- Available agents and skills
    |-- Memory file contents
    |-- Environment context (OS, directory, git state)
    |-- Language and output preferences
    |-- Active MCP server instructions
    |-- Context window management directives

Security Classification

The auto-approval system appears to use a multi-stage approach:

  1. A base classifier with predefined rules for safe and unsafe operations
  2. User-configurable overrides that can extend or restrict the defaults
  3. A fast first pass, with extended reasoning as fallback for ambiguous cases

Memory Hierarchy

Loading Order (earliest = lowest priority):
    |
    |-- Enterprise/managed configuration
    |-- User global preferences
    |-- Project-level instructions (shared)
    |-- Project rules directory
    |-- Local overrides (private, not committed)
    |
    |   Supports transitive file inclusion
    |   Conditional injection via path-based filtering

Use Cases

This research is useful for:

  • AI engineers building their own agentic coding tools
  • Prompt engineers studying production-grade prompt architectures
  • Security researchers understanding how autonomous AI tools manage permissions
  • Students and educators learning about multi-agent system design

Repository Structure

claude-code-system-prompts/
    README.md
    prompts/
        01-30 documented patterns (see catalog above)

Disclaimer

This is an independent research project. All content represents our analysis and approximations based on publicly observable behavior. This project is not affiliated with, endorsed by, or connected to Anthropic. All trademarks belong to their respective owners. If any content owner has concerns, please open an issue and we will address it promptly.

关于 About

Research into how agentic AI coding assistants work — reconstructed prompt patterns, agent coordination, and security classification
agentic-aiai-researchclaudeprompt-engineeringsystem-prompts

语言 Languages

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
6
Total Commits
峰值: 6次/周
Less
More

核心贡献者 Contributors