by Harzva
Claude Code 源码逆向恢复项目 | Source Map 逆向 · 架构分析 · 可运行版本 | 1900+ 文件 · 51万行代码 · 12章节课程
# Add to your Claude Code skills
git clone https://github.com/Harzva/learn-likeccLast scanned: 5/30/2026
{
"issues": [
{
"type": "npm-audit",
"message": "ws: ws: Uninitialized memory disclosure",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-05-30T15:56:20.768Z",
"npmAuditRan": true,
"pipAuditRan": true
}learn-likecc is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Harzva. Claude Code 源码逆向恢复项目 | Source Map 逆向 · 架构分析 · 可运行版本 | 1900+ 文件 · 51万行代码 · 12章节课程. It has 165 GitHub stars.
Yes. learn-likecc passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/Harzva/learn-likecc" and add it to your Claude Code skills directory (see the Installation section above).
learn-likecc is primarily written in TypeScript. It is open-source under Harzva on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh learn-likecc against similar tools.
No comments yet. Be the first to share your thoughts!
learn-likecc 不是一个单纯的“Claude Code 使用笔记”仓库。它把四条线放在同一个可发布工程里:
| 方向 | 你会得到什么 | 入口 |
|---|---|---|
| 源码学习 | 以真实 TypeScript 源码结构理解 Agent Harness、工具系统、权限、MCP、Hooks、Subagent、上下文压缩 | course/docs/zh |
| 可运行复刻 | 基于 ccsource/claude-code-rebuild 的学习版 CLI,用于研究运行链路,不作为生产替代品 |
ccsource/claude-code-rebuild |
| 在线教程站 | GitHub Pages 上的教程、专题、图谱、仿真器和工作流页面 | site/ |
| LikeCode 实验 | 多 provider 路由、模型切换、localhost 工作台、Loop 任务与长期迭代记录 | docs/ / .claude/plans |
这个仓库的定位是学习、研究、复刻和产品化实验。涉及 Claude Code 的源码快照与分析均以教育研究为目的,原始产品与相关源码权利归原权利方所有。
| 你想做什么 | 推荐入口 |
|---|---|
| 直接看在线课程 | https://harzva.github.io/learn-likecc/ |
| 从源码结构学 Agent Loop | https://harzva.github.io/learn-likecc/topic-sourcemap.html |
| 体验仿真器专题 | https://harzva.github.io/learn-likecc/topic-cc-loop-lab.html |
| 看 Claude Code 解构总览 | https://harzva.github.io/learn-likecc/topic-cc-unpacked-zh.html |
| 跟踪本仓库自己的迭代 | CHANGELOG.md / docs/commit-ledger.md |
flowchart LR
A["源码快照<br>ccsource/sourcecode"] --> B["课程拆解<br>S01-S12 / D01-D12"]
B --> C["可视化专题<br>Source Map / CC Unpacked"]
C --> D["Loop Lab 仿真器<br>Agent Loop / Script / Trace"]
D --> E["LikeCode 实验<br>模型路由 / Web 工作台 / Loop"]
E --> F["可复用方法<br>Agent CLI / Harness / Workflow"]
仿真专题是这个仓库最适合“边看边理解”的入口:它把抽象的 Agent 运行链路拆成可以点击、回放和对照的页面。
| 仿真器 | 解决的问题 | 在线入口 |
|---|---|---|
| Agent Loop 动态模拟器 | 一次 Agent 循环到底怎么跑 | site/agent-loop-simulator/ |
| 脚本启示仿真器 | 命令、配置、练习如何组织成训练路径 | site/agent-script-insight/ |
| Trace Prompt 仿真器 | Claude Code 请求如何由 system、tools、runtime reminder 和 user message 组装 | site/agent-trace-simulator/ |
| Loop Lab 总入口 | 三条仿真路径、机制页、本地 SSE 联调统一入口 | site/topic-cc-loop-lab.html |
如果你之前是从 GitHub 页面点 Download ZIP,解压目录没有 .git,无法提交和推送。建议正式开发时 clone 仓库:
git clone https://github.com/Harzva/learn-likecc.git
cd learn-likecc
安装根目录校验工具:
npm ci
npm run lint:md
python tools/check_site_md_parity.py
python tools/check_cc_loop_steps.py
python tools/gen_cc_overview.py --check
python tools/gen_cc_arch_treemap.py --verify-in-sync
本地预览站点:
cd site
python -m http.server 8080
然后打开:
http://127.0.0.1:8080/
http://127.0.0.1:8080/topic-cc-loop-lab.html
当前正式 clone 中可用的学习版 CLI 基线在 ccsource/claude-code-rebuild。
cd ccsource/claude-code-rebuild
bun install
bun run src/entrypoints/cli.tsx
根目录脚本 bin/likecode 会优先寻找 ccsource/like-code-main,如果该本地主开发线不存在,则回退到 ccsource/claude-code-rebuild。
chmod +x bin/likecode
./bin/likecode --help
这是学习版复刻环境,不建议把它当作生产 CLI 使用。真实项目中请优先使用官方 Claude Code 或你明确审计过的分支。
LikeCode 当前最重要的产品化实验,是把“模型选择”从固定列表变成可配置路由。
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.provider.example",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5-20250929"
},
"modelRoutes": {
"minimax/minimax-m2.5": {
"baseURL": "https://api.provider.example",
"authToken": "sk-provider-route-example",
"headers": {
"x-provider": "minimax"
}
}
},
"model": "minimax/minimax-m2.5"
}
已经验证过的关键点:
Pro/MiniMaxAI/MiniMax-M2.5[1m]。baseURL 应写到 provider 根地址,例如 https://api.siliconflow.cn,不要直接写到 /v1/messages。thinking、headers 和 provider 语义做兼容处理。| Part | 主题 | 章节 |
|---|---|---|
| Part 1 | 核心架构 | S01 Agent Loop、S02 Tool System、S03 Permission、S04 Command |
| Part 2 | 高级机制 | S05 Context Compression、S06 Subagent、S07 MCP、S08 Task Management |
| Part 3 | 扩展集成 | S09 IDE Bridge、S10 Hooks、S11 Vim Mode、S12 Git Integration |
课程正文在 course/docs/zh,站点镜像在 site/s01.html 到 site/s12.html。
learn-likecc/
├─ site/ # GitHub Pages 静态站点与仿真器入口
│ ├─ agent-loop-simulator/ # Agent Loop 动态模拟器
│ ├─ agent-script-insight/ # 脚本启示仿真器
│ ├─ agent-trace-simulator/ # Trace Prompt 仿真器
│ ├─ images/claude-pets/ # Claude Pet SVG 墙素材
│ └─ md/ # HTML 对应 Markdown 镜像
├─ course/ # 源码学习课程
├─ ccsource/
│ ├─ claude-code-rebuild/ # 可运行重建基线
│ └─ sourcecode/claude-code-main # 源码学习快照
├─ tools/ # 站点校验、生成、抓取与联调脚本
├─ docs/ # 设计说明、运行记录、提交台账
└─ .github/workflows/ # Pages 部署与站点校验
| 命令 | 用途 |
|---|---|
npm run lint:md |
README 与关键 Markdown lint |
python tools/check_site_md_parity.py |
校验 site/*.html 与 site/md/*.md 镜像关系 |
python tools/check_site_git_tracking.py |
校验 topic 页面是否被 Git 跟踪 |
python tools/gen_cc_overview.py --check |
校验 CC overview 数据 |
python tools/gen_cc_arch_treemap.py --verify-in-sync |
校验架构 treemap 数据 |
python tools/check_cc_loop_steps.py |
校验 Loop steps JSON schema |
本仓库仅供学习、研究、教学和复刻实验。请不要把未审计的复刻代码、私有 token、真实业务凭据或第三方源码权利不明的内容用于生产环境或公开分发。