Claude Code 源码解读

|
40+工具
40+命令
15+核心模块

学习路线

选择你的探索路径 — 从快速上手到深度架构

快速上手

几分钟内掌握 Claude Code 的核心概念

🔬

深度源码

深入关键子系统的实现细节

🏗️

架构设计

理解高层设计模式和系统边界

架构全景

点击节点探索 Claude Code 的核心模块

Loading architecture diagram...
Loading features...

术语表

Claude Code 架构中的关键术语和概念

🤖

Agent

AI agent loop that manages conversations and tool calls

🔧

Tool

Extensible functions the agent can invoke

⌨️

Command

Slash commands for user interactions

🔍

QueryEngine

Orchestrates conversations and message history

🧠

Context

Token budget and system prompt management

🐣

Buddy

Tamagotchi-style companion system

KAIROS

Persistent AI assistant mode

🔌

MCP

Model Context Protocol for external integrations

💰

Token Budget

Manages LLM token allocation and context window

🪝

Stop Hooks

Lifecycle hooks triggered at conversation boundaries

📦

Compact

Summarizes conversation history to save tokens

💭

Dream

Background reflection and planning process