building-a-coding-agent-from-scratch-course
Learn harness engineering by building Claude Code from scratch. Free, open-source course: 8 articles, 6 videos, 1 codebase.
Install / Use
npx skills add itsdecodingai/building-a-coding-agent-from-scratch-courseInstalls into whichever agent you are using.
Other
Other agent config
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of building-a-coding-agent-from-scratch-course
building-a-coding-agent-from-scratch-course scores 91/100 on our quality scale, 308th of 950 AI & Machine Learning skills we index (top 33%).
Its Other is 34 KB long, well organised into 23 sections with 2 code examples: a thorough specification that gives an agent plenty to work with.
With 1,235 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 29 days ago, so building-a-coding-agent-from-scratch-course is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-21. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
building-a-coding-agent-from-scratch-course compared with similar skills
All 4 of these similar skills score higher than building-a-coding-agent-from-scratch-course; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| building-a-coding-agent-from-scratch-course (this skill)by itsdecodingai | 91 | 1.2k | 29d ago | Other |
| claude-memby thedotmack | 100 | 119.0k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 93.7k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 80.5k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 48.0k | today | CLAUDE.md |
Frequently asked questions
- How do I install building-a-coding-agent-from-scratch-course?
- Run
npx skills add itsdecodingai/building-a-coding-agent-from-scratch-course. The install tabs above show the steps for each supported agent. - Which AI agents does building-a-coding-agent-from-scratch-course work with?
- It is written for Claude Code, as a Other file. Other agents that read the same format can often use it too.
- Is building-a-coding-agent-from-scratch-course safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is building-a-coding-agent-from-scratch-course still maintained?
- The repository was last updated 29 days ago, so building-a-coding-agent-from-scratch-course is actively maintained.
Skill content
View source on GitHubhttps://github.com/user-attachments/assets/f8711e5b-05e2-4c31-aa7f-355374c332d8
<p align="center"> <a href="https://www.decodingai.com/p/building-a-coding-agent-from-scratch-system-design" target="_blank"><b>📖 Read Lesson 1 (17 min)</b></a> · <a href="https://www.youtube.com/watch?v=sJpop1juVBQ" target="_blank"><b>🎬 Watch Lesson 1</b></a> · <a href="#-course-outline"><b>📚 See all 8 lessons</b></a> </p><p align="center"> <img src="assets/demo-skills.png" alt="The demo skills listed inside the decode TUI after typing /demo-" width="800"> </p> <p align="center"><i>Type <code>/demo-</code> and the six demos are one keystroke away.</i></p>Try the finished agent first — 5 minutes, $0:
git clone https://github.com/decodingai-magazine/building-a-coding-agent-from-scratch-course.git cd building-a-coding-agent-from-scratch-course make install cp .env.example .env # set LLM API key uv run decodeThen type
/demo-and pick a demo. See what they do below. Full setup guide.
📖 About This Course
In LangChain's Terminal-Bench experiment, changing only the harness (with the same model) moved a coding agent from ~30th place into the top 5: the harness, not the model, is what makes a coding agent good.
The agent is ~20 lines. The course is everything else, known as the harness.
agent = Agent(
build_model(settings.llm_provider), # gemini | openrouter | modal
deps_type=AgentDeps, # cwd, event sink, permission gate
output_type=[str, DeferredToolRequests], # final answer, or tools paused for approval
)
register_tools(agent) # read, edit, bash, grep, ...
async with agent.iter(prompt, message_history=history) as run:
async for node in run: # model request → tool calls → repeat
stream_events(node)
That's the entire tool-calling agent. Everything else in this repo (the tools, skills, permission layer, sandbox, steering queue, memory, compaction, session recording & replay, remote execution, subagent fan-out, and evals) is the harness. That's what you're here to build.
<p align="center"> <img src="assets/tui-session-start.png" alt="A fresh decode session: Opik tracing on, a Modal-served Qwen model, skill autocomplete, steering keys in the footer" width="90%"/> <br/> <i>A fresh session powered by Qwen3.6-35B hosted on Modal</i> </p>We spent months under the hood of Claude Code (via its leaked source), OpenCode, Pi, and Aider, then distilled what we learned into 8 articles and 6 videos where you'll build decode, your own coding agent, from scratch. One headless core hooked to two modes: an interactive TUI and Modal serverless functions running N copies in parallel, fired by CLI, webhook, or cron.
<p align="center"> <img src="assets/architecture.png" alt="Diagram of a coding agent harness: two interfaces (Interactive TUI with steering queue and priority gate; Remote Modal runtime running N headless harnesses via CLI, webhook, or cron) drive one Headless Harness made of a Context Window with compaction, an LLM-to-Tools Agent Loop, and six modules (LLM Providers, Memory, Skills, Sandbox, Permissions, LSP Server). An Evals and Observability layer (benchmarks, regressions, replays via Opik and Kitaru) sits underneath." width="620"> </p> <p align="center"><i>The harness architecture of the coding agent you will build during this course.</i></p> <h3 align="center"> <a href="#-course-outline">📚 Explore the 8 lessons: articles + videos</a> </h3>[!WARNING] Building a coding harness from scratch can make you dangerously good at building any other AI product, whether in finance, medicine, or e-commerce.
🎮 See It Work
The finished agent ships with demo skills under .decode/skills/. Open the TUI, type /demo-, pick one, and watch the harness you're about to build do real work:
🤖 You'll Walk Away Knowing How To
- Design a coding agent harness from scratch (article 1 · video 1)
- Implement the coding agent loop as a headless harness (article 2 · video 1)
- Attach the headless harness to multiple interfaces: a terminal UI, a CLI, or even a remote runtime (article 6 · video 4)
- Execute the agent's tools within local Docker or remote Modal sandboxes (article 3 · video 2)
- Host open-source models as SGLang servers on Modal (article 2 · video 1)
- Implement guardrails by adding a permission layer (article 1 · video 1)
- Build essential context engineering techniques: memory, compaction, skills (article 4 · video 3)
- Hook up an LSP server for faster feedback loops (article 4 · video 3)
- Implement a configurable agents catalog: build, plan, code reviewer, and exploration agents (article 5)
- Deploy the headless harness on Modal, triggering remote agents via the CLI, a webhook, or a cron job (article 6 · video 4)
- Spawn parallel subagents via fan-out strategies (article 5)
- Add observability (article 2 · video 1)
- Design an eval harness for benchmarking the agent and checking for regressions (article 7 · video 5)
- Organically grow your regression suite from failed agent traces (article 8 · video 6)
- Reproduce agent failures and check for regressions when changing your prompts or models by replaying traces with Kitaru (article 8 · video 6)
Tech Stack
The code is written in Python, with the following frameworks and libraries:
- Agent Framework: Pydantic AI
- **LLM
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
119.0kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
93.7kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
80.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
48.0kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
