← All projects
Learning resources

Learn Claude Code

A step-by-step tutorial that teaches you to build a small Claude Code-style AI coding agent from scratch.

What it does

This tutorial explains how AI coding agents like Claude Code work by building a small one yourself. Its makers call the code around the AI model a "harness": the tools, knowledge and permissions that let the model take actions.

It is split into chapters, each adding one piece, such as the basic loop where the AI calls tools, loading skills on demand, shortening old chat history, spawning helper agents and managing tasks. Each chapter has a written explanation and runnable Python code.

The chapters come in English, Chinese and Japanese.

Who it's for

Developers who want to understand how AI agents are built from the inside.

Can I use it without coding?

Developers only. The lessons are readable by anyone, but following along means running Python code with an AI model account. New to this? Start here.

Can I run it?

Cost
FreeNothing to pay or sign up for.
API key
Not needed

Try it

  1. Start with the first lesson, about the agent loop, and work through the chapters in order.
  2. Each chapter has a written guide and a runnable code example.

Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?

Before you install

  • Only download from the official GitHub page. Copies with similar names exist for many popular projects.
  • License (MIT): Very permissive: free to use, change and share, including for business.
  • More on staying safe