Claude Code From Scratch is a step-by-step learning project that recreates the core architecture of a coding agent in roughly 5,000 lines of TypeScript and Python. It is for developers who want to understand how coding agents work without reading a much larger codebase.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/windy3f3f3f3f/claude-code-from-scratch/claude-mdgit clone --depth 1 https://github.com/Windy3f3f3f3f/claude-code-from-scratchWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/windy3f3f3f3f/claude-code-from-scratch/claude-md)<a href="https://agentmods.dev/instructions/windy3f3f3f3f/claude-code-from-scratch/claude-md"><img src="https://agentmods.dev/badge/instructions/windy3f3f3f3f/claude-code-from-scratch/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.00031 |
| Opus 5 | $0.00015 | $0.00015 |
| Sonnet 5 | $0.00006 | $0.00006 |
| Haiku 4.5 | $0.00003 | $0.00003 |
Grade A, and why
claude-code-from-scratch CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Test Project Rules
@./.claude/rules/chinese-greeting.md
This is a test project for mini-claude feature validation.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 6 lines · 31 tokens per session scan A de17caf0db5a
claude-code-from-scratch CLAUDE.md is an instructions file published in the GitHub repository Windy3f3f3f3f/claude-code-from-scratch (2,636 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
open-dictionary AGENTS.md
Instructions for ahpxex/open-dictionary, covering open dictionary rewrite charter, product framing, core workflow, technical framework and 1. raw ingestion layer.
ab900 CLAUDE.md
Instructions for timothywarner-org/ab900, covering claude.md, repository purpose, architecture, commands and 2. non-ascii punctuation -- must return zero.
canvas-lms-mcp AGENTS.md
AGENTS.md instructions for bruchris/canvas-lms-mcp, covering agents.md — canvas lms mcp server, quick start, run with npx (no install needed), or install globally and architecture.
obsidian-university-workflow CLAUDE.md
Instructions for ABO896/obsidian-university-workflow, covering obsidian university workflow, project structure, rules for working on this project, templater api — always read the docs first and config alignment.
agentic-ai-engineering-course AGENTS.md
AGENTS.md instructions for towardsai/agentic-ai-engineering-course, covering the what and course map (lessons ↔ code projects).
anki-mcp-server CLAUDE.md
Claude Code instructions for nailuoGG/anki-mcp-server, covering claude.md, repository overview, development commands, build & development and install dependencies.