Learn Real Claude Code — Development skill for Claude Code
Deep dive into Claude Code source — 512K lines of industrial-grade TypeScript agent architecture.
How to install Learn Real Claude Code
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open 674019130/learn-real-claude-code and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Learn Real Claude Code does
Deep dive into Claude Code source — 512K lines of industrial-grade TypeScript agent architecture.
Alternatives in Development
- Management Deep Dive — 管理层纵深研究:买股票就是买人 15.9k ★
- Open Agent SDK TypeScript — Agent-SDK without CLI dependencies, as an alternative to claude-agent-sdk, completely open source 2.6k ★
- How Claude Code Works — Deep dive into Claude Code internals — architecture, agent loop, context engineering, and more 1.9k ★
README
[English](./README.md) | [中文](./README-zh.md)
Learn Real Claude Code — Source Archaeology on a 512K-Line Agent
The Source Code Doesn't Lie
On March 31, 2026, a security researcher discovered that Anthropic had accidentally shipped the complete TypeScript source of Claude Code inside an npm package — 512,000+ lines, 1,902 files, a 60MB sourcemap that unzips to the full codebase.
This was not the first time. The same mistake happened in February 2025.
Before we talk about what the source reveals, let's be precise about what you are actually looking at.
**Claude Code is not an agent. Claude Code is a harness.**
The agent is Claude — a neural network, trained by Anthropic, capable of reasoning, planning, and acting. Claude Code is the shell around that model: the tools, the context management, the permission system, the terminal UI, the streaming infrastructure. It is the vehicle the agent drives. Not the driver.
This distinction matters because it changes what you learn from reading the source. You are not studying "how Claude thinks." You are studying **how Anthropic built the environment that lets Claude think at its best** — in production, at scale, with real users.
And what you find, when you read those 512,000 lines carefully, is deeply instructive.
What the Source Reveals
The common mental model of an AI coding agent looks like this:
user message → LLM call → parse response → if tool_call: run tool → loop
Clean. Simple. Teachable in a weekend.
The reality in Claude Code's source is different:
user message
→ fast-path check (exit in < 5ms if --version, --help, etc.)
→ lazy module evaluation (main.tsx is 804KB; don't load what you don't need)
→ parallel prefetch (config + auth + MCP init all fire concurrently)
→ command registry check (100+ slash commands before touching the model)
→ system prompt assembly (10+ sources, SYSTEM_PROMPT_DYNAMIC_BOUNDARY for cache)
→ StreamingToolExecutor fires tools MID-STREA
Related Skills
Claude Code Report
CC技术要点分析笔记:This report analyzes the core source code of Claude Code's Agent section, aiming to quickly learn t
Claude Code Source Analysis Orange Book
Claude Code: Source Code Analysis · Orange Book Series · Deep dive into Claude Code architecture and implement
Claude Code Source Analysis
Claude Code 泄露源码深度分析 — 基于 2026-03-31 泄露的 Anthropic Claude Code CLI 完整 TypeScript 源码(~1,884 文件,512K+ 行)的逐模块架构解读
Claude Reviews Claude
Claude reads its own source code — 17-chapter architectural deep-dive into Claude Code v2.1.88. EN/ZH bilingua
Build Code Agent
从零构建 Code Agent:Claude Code 源码深度解析 Build a Code Agent from Scratch: Deep Dive into Claude Code Source
Deep Market Research
Deep market/competitive/tech research agent skill (agentskills.io standard). Source grading + =2-source cross-
Related Agents
Notebooklm Producer
Use this agent to create audio and video assets using Google NotebookLM. Handles notebook creation, source upl
Deep Dive
Use this agent when you need comprehensive analysis, investigation, or exploration of code, architecture, or t
Data Science Expert
Principal Data Science engineer specialized in concurrent systems, ML pipelines, deep learning, NLP, scientifi