by anneheartrecord · MCP Server · ★ 175
Last updated: · Indexed by AgentSkillsHub · Auto-synced every 8h
English Claude Code 源码解剖 📖 在线阅读: https://anneheartrecord.github.io/claude-code-docs/ 2026 年 3 月 31日,有人发现 Anthropic 发布在 npm 上的 Claude Code 客户端包里带了 sourcemap 文件。 Sourcemap 是前端构建工具生成的调试辅助文件,记录了编译后代码和原始源码之间的映射关系。正常发布时应该把它排除掉,但 Anthropic 的构建流程里漏了这一步。 于是完整的 TypeScript 源码被反向还原了出来,有51.5 万行代码,2,766 个文件。 需要明确的是:泄露的只是客户端侧的代码。 Claude Code 是典型的客户端-服务端(Client-Server)分离架构。客户端跑在你的终端里,负责用户交互、工具执行、权限管理、上下文组装。服务端是 Anthropic 的 API,负责模型推理,模型本身和服务端逻辑没有泄露。 但客户端的这部分代码已经足够有价值了。因为 Agent 产品的核心竞争力不只在模型调用侧,也在于怎么通过设计 Agent 将模型的能力安全、高效、稳定地释放出来。 有意思的是,从 git 历史看,这份代码本身很可能就是 AI 写的:20 个 commit 全部来自同一个账号 claude-code-best,其中三个带着 。51.5 万行代码一次编译零报错。AI 把功能写得挑不出毛病,却栽在一个基础的发布配置细节上。 这个仓库做了什么 我用 Claude Code 对这份源码做了系统化的技术分析,逐模块拆解,写了 13 篇技术文档,中英双语。 从架构设计到 Agent 循环的六阶段实现,从三层消息压缩体系到权限校验系统,从五层记忆加载到工具的执行流水线。 同时从 82 个 feature flag 里挖出了 Anthropic 还没发布的
| Stars | 175 |
| Forks | 21 |
| Language | Python |
| Category | MCP Server |
| License | MIT |
| Quality Score | 55.5706869037441/100 |
| Open Issues | 2 |
| Last Updated | 2026-08-11 |
| Created | 2026-04-01 |
| Platforms | claude-code, mcp, python |
| Est. Tokens | ~13k |
These tools work well together with claude-code-docs for enhanced workflows:
Looking for a claude-code-docs alternative? If you're comparing claude-code-docs with other mcp server tools, these 6 projects are the closest alternatives on Agent Skills Hub — ranked by topic overlap, star count, and community traction.
Source code teardowns of 14 AI coding agents. What is actually inside Claude Code, Dify, OpenHands, Cline, Mem
Persistent memory for AI coding agents
The hivemind for AI coding agents — persistent team context recorded once and recalled across agents, machines
Spec-driven development with smart compaction. Claude Code plugin combining Ralph Wiggum loop with structured
iOS development ClaudeCode plugin for mindful token and context usage. Contains modular MCPs that group variou
103 ready-to-use AI agent skills for Claude Code, OpenAI Codex, Gemini CLI, Cursor, GitHub Copilot, Windsurf,
Explore other popular mcp server tools:
claude-code-docs is Chapter-by-chapter teardown of a production coding agent — agent loop, context engineering, compaction, permissions, MCP. 13 chapters, Chinese and English.. It is categorized as a MCP Server with 175 GitHub stars.
claude-code-docs is primarily written in Python. It covers topics such as agent-architecture, ai-agents, claude-code.
You can find installation instructions and usage details in the claude-code-docs GitHub repository at github.com/anneheartrecord/claude-code-docs. The project has 175 stars and 21 forks, indicating an active community.
claude-code-docs is released under the MIT license, making it free to use and modify according to the license terms.
The top alternatives to claude-code-docs on Agent Skills Hub include awesome-ai-anatomy, omega-memory, ox. Each offers a different approach to the same problem space — compare them side-by-side by stars, quality score, and community activity.
Grades come from a rule-based scan built on the SlowMist agent-security taxonomy, covering 11 red-flag categories including credential harvesting, data exfiltration, and curl | sh installers. It is a first-layer scan, not a manual audit — we say so rather than overstate it.
The scale of the problem is documented independently: Liu et al. (2026), in a study of 31,132 agent skills, report that 26.1% contain security vulnerabilities. Our own full-catalog census is published as a citable open dataset.
Sources & who's responsible: