Skip to content

barckcode/claude-code-explain

 
 

Repository files navigation

Claude Code Internals

A static website explaining how Claude Code works internally, built for educational purposes. The goal is to help everyday users understand the tool better so they can use it more effectively.

Live at: claude-code-explain.helmcode.com

What this is

This site documents the internal architecture of Claude Code based on direct source code analysis: the system prompt structure, built-in tools, agent types, memory system, permission modes, context management, pricing, and more.

All findings come from reading the source code. The analysis/ directory contains the raw research notes.

Tech stack

  • Framework: Astro 5 (static output)
  • Styling: Tailwind CSS v4
  • Languages: English and Spanish
  • Deployment: Cloudflare Pages via GitHub Actions

Development

npm install
npm run dev      # local dev server
npm run build    # production build to dist/

Sections covered

# Section What it covers
01 System Prompt 6-layer hierarchy, 7 content sections, cache boundary
02 Tools 45 built-in tools across 9 categories
03 Agents 6 built-in agent types with models and tool sets
04 Memory File-based persistent memory, 4 types, MEMORY.md index
05 Permissions 6 modes, YOLO 2-stage AI classifier
06 Context & Compaction 200K context window, auto-compact, micro-compaction
07 Costs Pricing per model, fast mode premium
08 Retry Logic Exponential backoff, error code handling
09 Proactive Mode KAIROS autonomous mode, tick loop
10 Hidden Features Feature flags, undocumented capabilities
11 Practical Tips 10 tips derived from the source code

Disclaimer

This site is an independent educational project. It is not affiliated with or endorsed by Anthropic. All analysis is based on reading publicly available source code and may not reflect future versions of Claude Code.

About

Claude Code Snapshot for Research. All original source code is the property of Anthropic.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 96.8%
  • Astro 2.6%
  • Python 0.4%
  • HTML 0.2%
  • Shell 0.0%
  • JavaScript 0.0%