learn-claude-code
learn-claude-code is an open course from shareAI-lab that teaches "harness engineering" by building a small Claude Code–like coding agent from scratch in Python. Its starting premise is that agency comes from the model, while a working agent product is the model plus a harness: the loop, tools, permissions, context management and coordination around it. The course builds that harness one mechanism at a time.
It suits developers who want to understand how coding agents work rather than just use them. The current track has 17 progressive lessons, each adding one mechanism with runnable code: the core agent loop with a single bash tool, adding tools, permission boundaries, hooks, planning with to-do lists, subagents, on-demand skill loading, context compaction, memory, a file-backed task graph, background jobs, scheduling, agent teams, MCP, an integrated runtime, resumable workflows and goal-driven continuation. Lessons have English, Chinese and Japanese text, and a web platform presents the course with source, simulator and architecture views. The course also takes a strong stance against drag-and-drop "agent" builders, which readers may or may not share.
Getting started: clone the repository, `pip install -r requirements.txt`, copy `.env.example` to `.env` with your `ANTHROPIC_API_KEY`, and run `python s01_agent_loop/code.py`. The web version runs with `npm install && npm run dev` in the `web` folder.
Features
Why choose it
Trade-offs
Maintenance check
- Last commit
- 2026-10-27
- Commits, last 90 days
- 63
- Releases, last 90 days
- 0
- Latest release
- —
- Open issues
- 58
- Recent issues with at least one comment
- 4/20
Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.
Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.
Most discussed open issues
- #290 关于context offloading/compac 上下文卸载/压缩 中的问题10 comments · 2026-05-19
- #338 感谢大佬的教程,学完后自己做了一个乐高式组装harness的项目,分享出来共同学习4 comments · 2026-06-01
- #234 s09_agent_teams执行流程疑问4 comments · 2026-04-16
- #349 建议每节课只展示新代码,旧代码用 import 引用3 comments · 2026-06-05
- #65 Windows 11 support: changes needed for all agent files3 comments · 2026-03-09
Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.
Who it fits
- You want to understand how modern coding agents like Claude Code work under the hood from first principles (from basic bash loop to multi-tool calling).
- You prefer hands-on, progressive tutorials where each lesson introduces a single mechanism with working, digestible code.
- You only want a ready-to-use coding assistant for daily dev tasks and do not care about internal mechanics (install official Claude Code or Aider directly).
- You need an enterprise multi-agent production orchestration framework (CrewAI or MetaGPT are built for direct deployment).
How it differs
learn-claude-code is an educational repository explaining agent internals step by step; mini-swe-agent is a compact baseline tuned for SWE-bench performance.
learn-claude-code dissects the core single-agent code-edit loop; MetaGPT simulates a full multi-agent software company with specialized roles.
Compatibility
Quick start
Use cases
Alternatives
Comments
No comments yet. Be the first!