liuup/claude-code-analysis: a static reading of the leaked Claude Code TypeScript source
🤖 The analysis of Claude Code
At a glance
- What is it?
- This repository is not a tool you install. It is a documentation set that reads the Claude Code source map leak file by file, and its value depends entirely on whether you want architecture notes rather than runnable code.
- Who is it for?
- Adopt this repository if you are studying how a production coding agent is structured and you want a guided index into 1902 source files rather than a raw dump. Do not adopt it if you need a library, a CLI, or anything you can run: the repository contains documents, src.zip and a src/ tree for reference only.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Activity is slowing. The repository last received commits 7 months ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.
Star history
- liuup/claude-code-analysis4,082 ★ · +128
| Repository | 2026-09-24 | 2026-11-13 |
|---|---|---|
| liuup/claude-code-analysis | 4k | 4.1k |
128 Stars in the last 50 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What liuup/claude-code-analysis actually is, and who it is for
The repository describes itself as a collection of static analysis documents about the Claude Code source code, written for people who want to understand how a local coding agent is built. The README frames the origin: a security researcher posted on X that Anthropic had shipped the Claude Code npm package without deleting the source map file, which exposed the full TypeScript source, described as 1902 source files and 513,237 lines of code. The repository is the response to that, not a repackaging of it.
The audience is narrow. If you maintain an agent runtime, a tool-permission layer, or a session persistence design, the chapter list reads like a table of contents you would have written yourself: architecture and entry points, memory, skills, tool calls, MCP, sandbox, context management, prompts, multi-agent, and session storage with resume. If you are looking for a package to add to a project, there is nothing here for you. The top-level entries are README.md, analysis/, src.zip and src/, and the README states plainly that src/ exists only for reference links from the analysis documents.
The project also carries an explicit disclaimer that it is for academic research and technical study, that all rights to Claude Code belong to Anthropic, and that commercial use is prohibited. That framing matters for how you treat the contents: it is a reading of someone else's code, published as commentary.
The architecture the documents describe, chapter by chapter
The overview diagram in the README is the clearest statement of what the analysis covers. It shows a CLI with multiple entry points at entrypoints/cli.tsx and main.tsx, feeding an initialization layer at init.ts and setup.ts, which splits into a command and control surface (commands.ts, PromptInput) and a TUI/REPL workbench (App, REPL, Messages). Both converge on an execution kernel named query.ts and QueryEngine.ts.
From that kernel the diagram fans out to three areas: tool and permission orchestration through Tool.ts, transcript and memory through sessionStorage and the memdir/SessionMem paths, and a platform extension layer covering MCP, plugins, remote and swarm. All three loop back into the kernel. That loop is the interesting part of the design as presented: memory and tool results are not side channels, they re-enter the same execution path that produced them.
The chapter structure follows that diagram. Part one covers architecture and program entry. Part two is security in three sections: what information the system touches and how it is used, risk points and attack paths found in the source, and the defensive measures built to protect the host machine. Part three is the mechanism block, with separate chapters for memory, skills, tool calls, MCP, sandbox, context, prompts, multi-agent and session storage with resume. Parts four through nine add differentiators, extra findings, hidden commands and feature flags, a negative keyword and frustration signal analysis, seven component walkthroughs including function-level breakdowns, a competitive comparison, a code evidence index, a src file tree with descriptions, and a final summary.
A separate chapter on negative keyword detection and frustration signals is unusual enough to note. Most architecture write-ups stop at the request path; this one documents a mechanism for detecting user frustration as a first-class subsystem.
Reading the analysis: no install step, just the index and the source tree
There is no package to install and no build step. The README gives the repository layout and nothing else in the way of setup, so the practical workflow is to obtain the repository and open the analysis directory in a Markdown reader that follows relative links. The README does not document a clone command, an install command or any configuration key, and the repository files add none, so nothing beyond the layout can be quoted here.
The layout the README prints is the only structural instruction it gives:
claude-code-analysis/
├── README.md # 本说明文档(总索引)
├── analysis/ # 分析文档主目录
├── src.zip # 源代码压缩包
└── src/ # 源代码(仅供分析跳转引用)That tree tells you where everything lives: the chapters under analysis/, the source archive as src.zip, and src/ which the README says exists only for reference jumps from the documents. The README also gives a file tree for src/ itself in 10-src-file-tree.md, with per-file descriptions, which is the piece that is hardest to reconstruct by hand when you are staring at a raw dump.
A sensible first pass is to read 01-architecture-overview.md, because every later chapter assumes the entry point and kernel names from the overview diagram, then jump to the subsystem chapter you care about. Use 07-code-evidence-index.md and 10-src-file-tree.md to check a claim against the file it cites. The README positions those two documents as the evidence layer, which is how they should be used.
Where the material runs out: no licence, no releases, no runnable code
The licence field for this repository is unknown, and the README does not name a licence. That is a real constraint, not a formality. The disclaimer prohibits commercial use of the repository contents and asks readers to treat Anthropic's official documentation and user agreement as authoritative on compliance questions, but a README statement is not a licence grant. If you need to redistribute or embed any part of the analysis, there is no stated permission to rely on.
The second limitation is that the analysis is static. The README says the documents were compiled from static reading of src/, which means there are no runtime traces, no profiling data and no observed behaviour to fall back on. Any claim about what happens at runtime is an inference from code, and the repository does not present it as anything else. If you need to know how a subsystem behaves under load or in an edge case the code path does not make obvious, this repository will not settle the question.
Third, the repository is not a tool. There is no CLI, no library, no API surface. It cannot be a dependency, and it cannot be evaluated by running it. That is obvious once stated, but the naming invites the mistake: a reader searching for a Claude Code analysis tool may arrive here expecting something executable.
Fourth, the last push was on 2026-04-02. The repository is not archived, but it has not been pushed to in roughly six months, and it has no published releases. Treat the chapter contents as a snapshot of the source as it existed at the time of the leak, not as a description of the current published package.
How this differs from reading the source dump or a competitor comparison
The obvious alternative is the source itself. A reader with src.zip and a good indexer can search 1902 files directly, and for a narrow question that is faster than reading prose about it. The difference is orientation: the analysis provides a named map, entry points, kernel boundaries, and a chapter per subsystem, which is what you lack when you open a raw dump. The repository also ships 10-src-file-tree.md with per-file descriptions, which is the part of that map that is hardest to reconstruct by hand.
A second alternative is a competitive comparison write-up, and the repository includes one of its own: chapter sixteen compares Claude Code against Codex, Gemini CLI, Aider and Cursor, with an appendix of external comparison sources. That chapter is the one most likely to age badly, because it describes other products at a point in time, and the repository has no release process to refresh it. Read it as a dated comparison, not as a current one.
The distinction that matters most is between this repository and the leak coverage that circulated when the source map was discovered. News coverage answers what happened. This repository answers how the system is put together, subsystem by subsystem, with file references. Those are different products, and only one of them is useful six months later.
Editorial conclusion
Adopt this repository if you are studying how a production coding agent is structured and you want a guided index into 1902 source files rather than a raw dump. Do not adopt it if you need a library, a CLI, or anything you can run: the repository contains documents, src.zip and a src/ tree for reference only. Before relying on any chapter, open the linked file under src/ and confirm the claim yourself, because the README states the documents were compiled from static reading and the licence field is unknown.
Frequently asked questions
What is liuup/claude-code-analysis?
It is a documentation repository containing static analysis of the leaked Claude Code TypeScript source. The README describes it as a collection of analysis documents compiled from reading src/, covering architecture, security, memory, skills, tool calls, MCP, sandbox, context, prompts, multi-agent and session storage.
How do I install liuup/claude-code-analysis?
There is nothing to install. The README gives only the repository layout, so the workflow is to obtain the repository and open the Markdown chapters under analysis/, with src.zip available if you want the source locally.
Does liuup/claude-code-analysis include the leaked Claude Code source code?
The repository contains src.zip and a src/ directory, which the README describes as provided only for analysis cross-reference. The README states that all rights to Claude Code belong to Anthropic and that the repository is for academic research and technical study.
What licence does liuup/claude-code-analysis use?
The licence is not stated. The README carries a disclaimer prohibiting commercial use of the repository contents and defers compliance questions to Anthropic's official documentation and user agreement, but it does not grant a licence.
Is liuup/claude-code-analysis still updated?
The last push to the repository was on 2026-04-02, and the repository has no published releases. The repository is not archived, but the analysis reflects the source as it stood at the time it was written.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/liuup-claude-code-analysis)Star history chart for your README
[](https://hysenlabs.com/projects/liuup-claude-code-analysis)Was this useful?