Cc Src Learning
Description
透过 Claude Code 的源码,我们学到了什么?
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
透过 Claude Code 的源码,我们学到了什么?
基于 Cloud Code 泄露源码,深入解析 AI 开发工具的设计哲学与工程实践。你可以在 [这里](https://github.com/mylxsw/claude-code) 找到完整的代码:[mylxsw/claude-code](https://github.com/mylxsw/claude-code) 。
Claude Code 是 Anthropic 官方推出的命令行工具,旨在帮助开发者利用 Claude 完成软件工程任务。近期,其源码意外泄露,为我们提供了一个难得的机会——从内部视角深入了解一个顶级 AI 应用是如何构建的。
本项目源于一篇系统性研究文章,我们将从**代码库结构**、**设计理念**、**架构实现**、**提示词工程**四个维度,全方位解析 Claude Code 的设计哲学与工程实践。无论你是想了解如何构建 AI 应用,还是想学习优秀的工程实践经验,都能从中获得启发。
文章大纲
[第一章:宏观视角——代码库结构与核心模块](./01-宏观视角:代码库结构与核心模块.md)
[第二章:设计理念——它是如何"思考"的?](./02-设计理念:它是如何思考的.md)
- 2.1 像乐高一样的工具系统(Tool)
- 2.2 slash 命令:像聊天机器人一样的交互方式
- 2.3 权限系统:为什么每次都要问我"允许吗"?
- 2.4 子代理与团队协作:一个人不够,那就多来几个
- 2.5 Skill 系统:把常用操作变成可复用的技能
- 2.6 插件系统:像手机应用一样的扩展能力
[第三章:架构与实现——它是怎么"干活"的?](./03-架构与实现:它是怎么干活的.md)
- 3.1 查询引擎(QueryEngine):AI 是怎么调用的?
- 3.2 桥接系统:IDE 是如何与 CLI 对话的?
- 3.3 服务层:API、MCP、OAuth 都负责什么?
- 3.4 启动优化:并行预加载让启动更快
- 3.5 条件编译:只编译需要的功能(feature flags)
- 3.6 代码规模与目录结构初览
[第四章:Prompt 的艺术——如何让 AI 正确做事?](./04-Prompt的艺术:如何让AI正确做事.md)
- 4.1 系统提示词(System Prompt)是什么?
- 4.2 提示词是如何"组装"的?(分层构建)
- 4.3 工具的提示词:告诉 AI 每个工具怎么用
- [4.4 缓存机制:为什么要区分"静态"和"动态"内容?](./04-Prompt的艺术:如何让AI
Related Skills
Awesome Go
A curated list of awesome Go frameworks, libraries and software
Development next.js
| The React Framework | 138360 | 1503 | 1 |
Development sharing-skills
skill for guidance.
Development root-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger.
Development Template Skill
Minimal skeleton for a new skill project structure.
Development Third-party Notices
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THI
Development