# Windy3f3f3f3f/claude-code-from-scratch

Build your own Claude Code from scratch.  🔍 Claude Code 开源了 50 万行代码，读不动？用 ~5000 行 TypeScript / Python 从零复现核心架构，11 章分步教程带你理解 coding agent 精髓

Repository: https://github.com/Windy3f3f3f3f/claude-code-from-scratch
Canonical: https://ross.abutalabs.com/products/claude-code-from-scratch
Homepage: https://windy3f3f3f3f.github.io/claude-code-from-scratch/#/
Language: Python
License: MIT
License Family: permissive
Topics: ai, ai-agent, anthropic, build-from-scratch, claude, claude-code, coding-agent, llm, tutorial, typescript
Last push: 2026-07-09T09:34:10+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 45, longevity 11
- inputs: {"age_days": 155, "days_push": 55, "days_rel": 155, "gap_med": null, "n_releases_24m": 1}
- flags: young
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2607, forks 534 (observed 2026-08-28T04:07:04.126955+00:00)

## What it is
A step-by-step tutorial project that rebuilds the core architecture of Claude Code in about 5000 lines of TypeScript and Python across 13 chapters. It covers the agent loop, tool system, context compression, memory recall, skills, multi-agent orchestration, and MCP integration, with runnable code for every chapter.

## Use cases
- understand how claude code works internally
- learn to build a coding agent from scratch
- study agent loop and tool execution patterns
- learn context compression for llm agents
- build a terminal ai coding assistant
- understand mcp integration in agents
- learn multi-agent orchestration patterns

## When to choose
- you want to understand coding agent architecture without reading hundreds of thousands of lines
- you prefer learning by writing code step by step
- you want runnable examples that work without an API key
- you want both TypeScript and Python reference implementations

## When to avoid
- you need a production-ready coding agent for daily use
- you expect an exact replica of Claude Code's internal implementation
- you need guaranteed compatibility or support from Anthropic

## Facets
- artifact type: learning-resource
- maturity: active
- function: agent-framework, llm-inference, developer-tools, cli, mcp, prompt-engineering
- domain: large-language-models, tutorials, developer-tools, education
- platform: python, cli, cross-platform
- tags: claude-code, coding-agent, build-from-scratch, step-by-step-tutorial, agent-loop, context-compression, multi-agent, hands-on, ai-agents, nodejs

## Member repositories
- Windy3f3f3f3f/claude-code-from-scratch (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:04.126955+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:20:56.486318+00:00, confidence not recorded.
  - readme: https://github.com/Windy3f3f3f3f/claude-code-from-scratch (fetched 2026-08-28T04:07:04.126955+00:00, sha 976154212e7c)
  - homepage: https://windy3f3f3f3f.github.io/claude-code-from-scratch/#/ (fetched 2026-08-29T10:03:49.112514+00:00, sha 1e683a6bac67)
- Data as of 2026-08-30T08:39:29.467469+00:00.
