Skip to content
Flows
Tier 1 · Claude Code internals Claude Code internals · fetched 2026-07-02

claude-code-source-analysis (ceetity)

Smaller independent analysis of the Claude Code source; skimmed for unique observations to cross-check the major bundles.

View source on GitHub

Key takeaways

  • 01

    Use as a cross-check witness against the book-length analyses

From the archive

Verbatim excerpts mined from our local archive of this repository — the prompts, schemas, and patterns worth stealing.

Insight

Claude Code's three-layer feature gating

Core findings:
- Complete implementation analysis of 53 tools, 87 slash commands, and 148 terminal UI components
- 7 hidden features: BUDDY / KAIROS / ULTRAPLAN / Coordinator / Bridge / 26+ hidden commands / 50 compile switches
- Three-layer gating system: compile-time feature() -> runtime USER_TYPE -> GrowthBook remote flags
- Data source: sourcesContent inside the @anthropic-ai/claude-code npm package's cli.js.map

[translated] A whitepaper reconstructed from 1,987 TypeScript source files; the three-layer gating chain is the key takeaway for shipping experimental agent features safely.

README.md