Claude Code 架構導覽
基於 npm 發布包 source map 還原的 TypeScript 源碼結構分析,版本 2.1.88
30+ 工具實作
40+ 命令集
多 Agent 協調
遠端會話
插件系統
專案目錄結構
restored-src/src/ 核心邏輯模組
restored-src/src/
├── main.tsx # CLI 入口
├── tools/ # 工具實現(Bash、FileEdit、Grep、MCP 等 30+ 個)
├── commands/ # 命令實現(commit、review、config 等 40+ 個)
├── services/ # API、MCP、分析等服務
├── utils/ # 工具函數(git、model、auth、env 等)
├── context/ # React Context
├── coordinator/ # 多 Agent 協調模式
├── assistant/ # 助手模式(KAIROS)
├── buddy/ # AI 伴侶 UI
├── remote/ # 遠端會話
├── plugins/ # 插件系統
├── skills/ # 技能系統
├── voice/ # 語音交互
└── vim/ # Vim 模式
核心模組
點擊任何一個模組卡片,可以看到更詳細的說明