Tsukino Dev Notes

Home

❯

工具与参考

❯

源码仓库镜像

❯

claude code from scratch — 从零复现 Claude Code

claude-code-from-scratch — 从零复现 Claude Code

2026年5月24日1分钟阅读

用 ~4,300 行代码从零复现 Claude Code 核心架构的分步教程。每章贴真实代码 + 源码对照。

原始仓库:GitHub

教程目录

  • 引言:为什么从零造一个 Claude Code?

  • 1. Agent Loop — 核心循环

  • 2. 工具系统

  • 3. System Prompt 工程

  • 4. CLI 与会话

  • 5. 流式输出与双后端

  • 6. 权限与安全

  • 7. 上下文管理

  • 8. 记忆系统

  • 9. 技能系统

  • 10. Plan Mode:只读规划模式

  • 11. 多 Agent 架构

  • 12. MCP 集成

  • 13. 架构对比与下一步

  • 14. 功能测试指南

  • Claude Code From Scratch


本文档为原始仓库镜像,在 Quartz 站点中可直接阅读。

此文件夹下有9条笔记。

  • 2026年5月24日

    en

    • 2026年5月24日

      docs

      • 2026年5月24日

        python

        • 2026年5月24日

          test

          • 2026年5月24日

            _sidebar

            • 2026年5月24日

              _coverpage

              • 2026年5月24日

                Test Project Rules

                • Claude-Code
                • AI-Coding
                • 源码学习
                • Agent
                • TypeScript
              • 2026年5月24日

                Claude Code From Scratch

                • Claude-Code
                • AI-Coding
                • 源码学习
                • Agent
                • TypeScript
              • 2026年5月24日

                Claude Code From Scratch

                • Claude-Code
                • AI-Coding
                • 源码学习
                • Agent
                • TypeScript

              最近更新

              • 源码仓库镜像

                2026年5月24日

                • Tsukino Dev Notes

                  2026年5月24日

                  • _navbar

                    2026年5月24日

                    • _sidebar

                      2026年5月24日

                      • SKILL

                        2026年5月24日

                        Created with Quartz v4.5.2 © 2026

                        • GitHub
                        • Discord Community