#333 · Primary category: Education & Research

claude-code-from-scratch

ai ai-agent anthropic build-from-scratch claude claude-code coding-agent llm tutorial typescript

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