Claude Code 源码与架构解析
输入 Claude Code 模块或功能疑问,检索并解析其架构设计与代码实现,获取规范的扩展开发指南。
功能与用途
本功能专门用于检索和拆解 Claude Code CLI 的底层实现与架构规范。用户提出具体的子系统、Slash 命令或 Agent 工具名称,系统即可定位对应源码、提取权限校验与提示词注入逻辑,并输出符合项目规范的开发参考。适合希望学习大型终端 Agent 架构、二次开发 CLI 插件或排查内部执行逻辑的开发者使用。
适用场景
- 新增自定义 Agent 工具:参考 buildTool 规范,快速编写包含权限校验与 UI 渲染的新工具代码。
- 排查权限与沙箱机制:检索权限拦截与审批分类流程,理清终端命令执行的安全性控制原理。
- 学习终端 UI 与状态管理:探究 React Ink 与 AppState 状态总线如何协调流式响应与界面更新。
适用人群
- AI CLI 与终端工具开发者
- TypeScript 全栈工程师
- Agent 架构研究员
- Claude 生态插件开发者
使用步骤
- 指定想要探索的模块,如 Slash 命令、Agent 工具或桥接层
- 查阅自动生成的架构映射与对应文件的核心实现逻辑
- 依据标准模板生成或改造自定义扩展代码并进行本地调试
开始使用
将需求和 Skill 名称发送给已连接 SkillPX MCP 的 AI 助手,核对适用工具和安装要求。
技术信息
- 分类
- 编程
- 适用工具
- Codex、Claude Code、OpenClaw、Hermes Agent、国内 Agent
- 使用难度
- 进阶
- 版本
- main
- 最近更新
- 2026-09-29
- 文件数
- 82
- 安装包大小
- 自动生成 ZIP
- 安全检查
- 基础检查通过
Development conventions and architecture guide for the Claude Code CLI repository.
依赖与权限
- @modelcontextprotocol/sdk
- express
- @types/express
- @types/node
- tsx
- typescript
- @anthropic-ai/sdk
- @commander-js/extra-typings
- @growthbook/growthbook
- @opentelemetry/api
- @opentelemetry/api-logs
- @opentelemetry/core
- @opentelemetry/sdk-logs
- @opentelemetry/sdk-metrics
- @opentelemetry/sdk-trace-base
- @xterm/addon-fit
- @xterm/addon-search
- @xterm/addon-unicode11
- @xterm/addon-web-links
- @xterm/addon-webgl
- @xterm/xterm
- auto-bind
- axios
- chalk
- chokidar
- cli-boxes
- code-excerpt
- diff
- execa
- figures
- fuse.js
- highlight.js
- ignore
- lodash-es
- marked
- next
- react
- react-dom
- zustand
- swr
- @radix-ui/react-collapsible
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-scroll-area
- @radix-ui/react-select
- @radix-ui/react-separator
- @radix-ui/react-slot
- @radix-ui/react-switch
- @radix-ui/react-tabs
- @radix-ui/react-toast
- @radix-ui/react-tooltip
- @tanstack/react-virtual
- framer-motion
- lucide-react
- shiki
- react-markdown
- remark-gfm
- nanoid
- class-variance-authority
- clsx
- tailwind-merge
- @next/bundle-analyzer
- @types/react
- @types/react-dom
- MCP_API_KEY
- PORT