#333 · Primary category: Education & Research
claude-code-from-scratch
Build your own Claude Code from scratch. 🔍 Claude Code 开源了 50 万行代码,读不动?用 ~5000 行 TypeScript / Python 从零复现核心架构,11 章分步教程带你理解 coding agent 精髓
Project last updated:07/09/26
GitHub Stars
2.6K
Forks
536
Contributors
4
License
MIT
Why we included this project
This is a teaching project for people who want to understand how a coding agent works internally, not just what it does for them. The real Claude Code is a few hundred thousand lines of code; here the core pieces get rebuilt in roughly five thousand lines of TypeScript and Python, spread across thirteen chapters that each add one component: the agent loop, the tool system, context compression, memory recall, skills, multi-agent setups, and MCP integration. Every chapter maps its code back to the Claude Code architecture so you can see what was simplified and why. The part that stands out for learners is that each chapter runs with a single command and no API key, using a local mock model, and a --diff flag shows exactly what that chapter adds. For developers or tech leads thinking about building or evaluating a lightweight agent of their own, it is a genuinely useful reference for how the pieces fit together.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
JavaGuide
Java Interview & Backend General Interview Guide, covering computer fundamentals, databases, distributed systems, high concurrency, system design, and AI application development.
system-prompts-and-models-of-ai-tools
A curated collection of system prompts, internal tools, and AI models from popular AI assistants and coding agents.
30-seconds-of-code
Coding articles to level up your development skills
generative-ai-for-beginners
21 Lessons, Get Started Building with Generative AI