Claude Code Analysis — Development skill for Claude Code
🤖 The analysis of Claude Code.
How to install Claude Code Analysis
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open liuup/claude-code-analysis and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Analysis does
🤖 The analysis of Claude Code.
Alternatives in Development
- Scientific Agent Skills — A set of ready to use Agent Skills for research, science, engineering, analysis, finance and writing 18.7k ★
- Income Investment — Income Investment: Durable and Opportunistic Distribution Analysis 15.9k ★
- Cohort Analysis — Cohort retention curves, feature adoption, and segment insights 7.8k ★
README
Claude code 源码分析
事件背景
美国东部时间2026年3月31日凌晨4点23分,安全研究者 [Chaofan Shou](https://x.com/Fried_rice) 在 X 发布[推文](https://x.com/Fried_rice/status/2038894956459290963?s=20), 发现 Anthropic 发布到 npm 的 Claude Code 包中,官方没有删除source map 文件, 这意味着 Claude Code 的完整 TypeScript 源码全部泄露, 包含 1902 个源文件以及 513,237 行代码.
目录结构
本仓库为对 Claude Code 泄露源码的静态分析文档集
claude-code-analysis/
├── README.md # 本说明文档(总索引)
├── analysis/ # 分析文档主目录
├── src.zip # 源代码压缩包
└── src/ # 源代码(仅供分析跳转引用)
总述
本目录中的分析文档基于 `src/` 源码静态阅读整理,主要探讨以下系统设计问题:
- 软件架构设计与程序启动路径。
- 安全分析:用户信息的收集、利用情况,潜在的安全风险及防范措施。
- Agent Memory 机制(多层级存储与 Session 压缩逻辑)及实现细节。
- 能力扩充机制(Skills 扩展、Tool Call 机制、MCP 集成)的技术实现及运行方式。
- 隔离机制:通过 Sandbox 防范本地操作风险的设计与实现。
- 内部程序架构设计与模块特点。
- UI 拆解:
src/components/内 TUI 控制台的组件构成。 - 竞品对比:与
Codex、Gemini CLI、Aider、Cursor等工具的功能及体系差异分析。 - 源码证据与外部公开资料对照。
主要系统特征:
- 该项目属于本地代码 Agent 平台,具备独立的执行逻辑与环境闭环设计。
- 核心功能包含统一的执行内核、分层 Memory 系统,以及基于 MCP 和 Skills 的外接扩展支持。
- 架构防御层面,系统采用了本地 Sandbox 隔离与工具调用权限(Tool Permission)控制措施。
- 隐私层面,涉及数据流出的环节主要包括模型上下文交互、本地持久化存储和外部组件远程通信功能。
一图总览
+---------------------------+
| CLI / 多入口 |
| entrypoints/cli.tsx |
| main.tsx |
+---------------------------+
|
v
+---------------------------+
| 初始化与运行环境 |
| init.ts / setup.ts |
+---------------------------+
| |
v v
+----------------+ +---------------------------+
| 命令与控制面 | | TUI / REPL 工作台 |
| commands.ts |-->| App / REPL / Messages |
| PromptInput... | | / PromptInput |
+----------------+ +---------------------------+
|
v
+---------------------------+
| Query / Agent 执行内核 |
| query.ts / QueryEngine.ts |
+------------
Related Skills
Pre Mortem
Run pre-mortem risk analysis on PRDs and launch plans
Competitor Analysis
Analyze competitors with strengths, weaknesses, and differentiation
Gemini CLI Foundations
This repository is a comprehensive skills library for Gemini CLI - reusable, production-ready skill packages t
Claude SEO: Universal SEO Analysis Skill
Claude SEO: Universal SEO Analysis Skill skill
JWT Scan
JWT attack toolkit (offline) — alg:none forgery, RS256→HS256 algorithm confusion, weak-secret crack, static cl
Contradiction Analysis
Related Agents
Hooks:
--- You are a GSD codebase mapper. You explore a codebase for a specific focus area and write analysis documen
Designguru
Expert Design Guidance & Analysis Specialist who provides professional UI/UX insights, design system guidance,
Security Dependencies
You are a security expert specializing in dependency vulnerability analysis, SBOM generation, and su... - wsho