Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps
This repository is a free, online technical book spanning 18 chapters and roughly 400 print-equivalent pages, derived from studying TypeScript source maps that Anthropic inadvertently shipped inside Claude Code's npm package. The author recovered the original TypeScript through the `sourcesContent` field of those source maps, then wrote original pseudocode and prose to document the architecture without reproducing proprietary code. Coverage includes Claude Code's six core abstractions, its five-phase bootstrap pipeline, the agent loop in `query.ts`, a 14-step tool execution pipeline, concurrent tool partitioning, multi-agent swarm coordination, a four-layer context compression strategy, file-based memory with LLM-driven recall, MCP integration across eight transports, and terminal UI rendering via a custom Ink fork. A standout detail is the fork-agent prompt cache trick, where parallel sub-agents share byte-identical prefixes to reduce input token costs by roughly 95 percent. The material targets senior engineers building agentic systems, architects evaluating design trade-offs, and anyone who wants a detailed internal view of how Claude Code works.
- ✓Recently active
- ✓Healthy fork ratio
- ✓Clear description
- ✓Documented (README)
- !No standard license detected
git clone https://github.com/alejandrobalderas/claude-code-from-sourceTools overview
What people ask about claude-code-from-source
What is alejandrobalderas/claude-code-from-source?
+
alejandrobalderas/claude-code-from-source is tools for the Claude AI ecosystem. Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps It has 2.2k GitHub stars and was last updated 2mo ago.
How do I install claude-code-from-source?
+
You can install claude-code-from-source by cloning the repository (https://github.com/alejandrobalderas/claude-code-from-source) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is alejandrobalderas/claude-code-from-source safe to use?
+
Our security agent has analyzed alejandrobalderas/claude-code-from-source and assigned a Trust Score of 67/100 (tier: OK). See the full breakdown of passed checks and flags on this page.
Who maintains alejandrobalderas/claude-code-from-source?
+
alejandrobalderas/claude-code-from-source is maintained by alejandrobalderas. The last recorded GitHub activity is from 2mo ago, with 1 open issues.
Are there alternatives to claude-code-from-source?
+
Yes. On ClaudeWave you can browse similar tools at /categories/tools, sorted by popularity or recent activity.
Deploy claude-code-from-source to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/alejandrobalderas-claude-code-from-source)<a href="https://claudewave.com/repo/alejandrobalderas-claude-code-from-source"><img src="https://claudewave.com/api/badge/alejandrobalderas-claude-code-from-source" alt="Featured on ClaudeWave: alejandrobalderas/claude-code-from-source" width="320" height="64" /></a>More Tools
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
An AI SKILL that provide design intelligence for building professional UI/UX multiple platforms
🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs, papers, images, or videos into a queryable knowledge graph. App code + database schema + infrastructure in one graph.
A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies