Claude Code Training
Course 11 of 11 chapters ready

Agentic Coding with Claude Code

A chapter-by-chapter training course

Hands-on training built from the book "Agentic Coding with Claude Code". Each module follows one chapter of the book and pairs the source material with exercises, knowledge checks, and instructor notes.

Your progress

Loading progress…

Chapters

Chapter 1 Ready

Context Engineering

Why context engineering matters, how it evolved from prompt engineering, the four Claude Code strategies (write / select / compress / isolate), what makes a system prompt land in the Goldilocks zone, and how the book's slash commands map to the Anthropic API primitives (compaction, tool-result clearing, memory). Includes a newcomer-friendly preface, plain-language analogies for each section, four diagrams, and a hands-on Claude Code exercise driving every strategy on a sandbox project.

~110 min

Chapter 2 Ready

The Gist of Claude Code

Operationalizes Chapter 1. Walks through the four mechanical setup moves at the start of every Claude Code project: drop a CLAUDE.md in with /init, work the permission gate (Yes / Yes-session / No), extend Claude Code with MCP servers (Playwright as the worked example, with the local/project/user scope choice), and drive a spec-driven design pass via plan mode (Shift+Tab) and the @-reference pattern. Enrichment from official Anthropic docs adds the four-scope CLAUDE.md ladder, the deny→ask→allow permission evaluation order, @-imports + .claude/rules/ for path-scoped memory, and the rule that project-root CLAUDE.md survives /compact. Includes a newcomer-friendly preface, seven analogies (hotel keycard, USB devices, binder tabs, blueprint, and a closing "new contractor on site" recap), three SVG diagrams, and a hands-on exercise that drives every move on a Python-stdlib sandbox CLI.

~110 min

Chapter 3 Ready

A Tour of Essential Commands

Promotes Claude Code from "installed" to "in daily use." Covers the three authentication / billing paths (Anthropic API key with `/cost`-now-`/usage` monitoring, Claude Pro / Max subscription, and third-party cloud); the everyday slash-command surface with the four-tier settings hierarchy (managed > CLI > local > project > user) and the permission-merge exception; hooks end-to-end including the worked Stop-event notification hook plus the critical exit-2-blocks-but-exit-1-doesn't detail and the "hooks are not a security boundary" rule; the five-tier CLAUDE.md memory hierarchy alongside the newer auto-memory subsystem, `@`-imports (max 4 hops) and the <200-lines-per-CLAUDE.md guidance; the rewind / checkpointing feature with all five restore/summarize actions plus what checkpoints can't capture (bash side effects, manual edits, anything past 30 days); and Skills — the merger of `.claude/commands/*.md` into `.claude/skills/<name>/SKILL.md` with YAML frontmatter, `allowed-tools` as a least-privilege grant (not restriction), and dynamic `!`-injection for retrieval-augmented commands. Includes the canonical-name correction for the rewind metric (CAIR = Confidence in AI Results, not Cost of AI Recovery; formula Value / (Risk × Correction)). Newcomer preface, six per-section analogies plus a closing workshop-tour analogy, two SVG diagrams, a directory-audit activity, and a ~30–45 min hands-on Claude Code exercise that drives every surface in the chapter.

~115 min

Chapter 4 Ready

Extending Claude Code with MCP Servers and Plugins

Turns Claude Code from "the agent in your repo" into "the agent wired into your whole stack." Explains why MCP exists (the N×M integration problem and Andrew Koenig's "extra level of indirection"), the three roles to keep straight (host / one-client-per-server / server) plus the three primitives (tools / resources / prompts) and two transports (stdio / Streamable HTTP), the Dec 2025 Linux Foundation governance move, and the full hands-on flow of `claude mcp add` with `.mcp.json` at project / user / session scope. Most of the chapter is the *context engineering* discipline that makes MCP safe to use at scale: every MCP server preloads its tool descriptions into the model's system prompt at session start (~20% of the context window in the book's four-server demo), and `--mcp-config <file> --strict-mcp-config` plus per-session disable claws that back to ~2.4%. The lesson then names MCP's four structural limitations — context pollution, ping-pong round-trip execution, JSON-tool-call format vs the model's native text/code, schemas describe shape not intent — and converges on the *direction of travel*: Anthropic's *Code execution with MCP* post (lead) and Cloudflare's earlier *CodeMode* (parallel) replace tool-call-by-tool-call with one inference + one sandboxed run + a typed API from MCP schemas; Anthropic reports up to ~98.7% token reduction. Closes on **plugins** — bundling MCP servers + skills + sub-agents + hooks into one installable package, `plugin.json` + `marketplace.json`, the `/plugin` flow, and the official `anthropics/claude-code` marketplace as the worked example. Newcomer preface, 8 per-section analogies plus a closing "universal cable" analogy, four original SVG diagrams (MCP at a glance; N×M vs N+M; context-window before/after strict scope; ping-pong vs single-shot), an audit activity, and a ~30–40 min hands-on exercise that drives `claude mcp add` at project and user scope, `--strict-mcp-config`, `/context` measurement, and plugin install on a sandbox project.

~115 min

Chapter 5 Ready

Automating Your Development Workflow with Claude Code and GitHub

The first chapter where Claude Code works without you in the room: tag `@claude` on a GitHub issue or PR and a GitHub Actions runner does the work unattended. Covers how the loop runs end to end — an event triggers the `claude.yml` workflow, which runs `anthropics/claude-code-action@v1` on an ephemeral runner, executing Claude Code non-interactively (headless, on the Claude Agent SDK) — and the two independent credentials involved (the scoped Claude GitHub App for repo access, and an OAuth token via `claude setup-token` or an API key stored as a GitHub Actions secret for model auth). Walks the full `/install-github-app` setup: `gh` CLI prerequisites, the App install, the two workflow templates (Claude Code + Claude Code Review), the auth choice, and the auto-PR that adds `.github/workflows/claude.yml` + `claude-code-review.yml`. The pedagogical spine is a deliberate failure: asked to rename a variable, Claude renames a key that's part of a third-party API payload contract and silently breaks the integration (the 'trust-then-verify gap') — contained only because Claude works on a `claude/issue-<number>-<timestamp>` branch, never `main`, with a human reviewing the PR. The fix is context engineering for unattended runs: `/init` generates a `CLAUDE.md`, you add the load-bearing 'don't rename this payload key' gotcha, commit it so the Action reads it, and the re-run is correct. Closes on the configurable review workflow (linters/tests via `claude_args`, fresh-context review, branch protection as the deterministic gate) and the layered safety model that replaces live oversight (scoped App permissions, only-write-access-can-trigger, short-lived repo-only tokens, prompt-injection caution on untrusted content, default no-auto-merge). Newcomer preface on GitHub Actions / workflows / secrets / GitHub-App-vs-API-key, seven per-section analogies plus a closing 'contractor with a key to the shop' analogy, four original SVG diagrams, a CLAUDE.md-gotchas activity, and a ~35–45 min hands-on lab with a no-GitHub Track B that reproduces the break-then-fix finding locally with `claude -p` headless plus a pytest contract check.

~115 min

Chapter 6 Ready

Claude Code Planning and Multi-agent Workflows

Adds structure for scale across two halves that share one spine — structure before action. First, plan mode: a read-only explore-and-design pass (entered with `/plan`, the `Shift+Tab` mode cycle, or `--permission-mode plan`) that produces a reviewable specification before any edits — Claude can read, analyze, make MCP calls and search docs, but cannot edit/create/delete files, commit, or install packages until you approve. This drives spec-driven development: draft the HookHub spec, refine it through feedback (the initial carousel is dropped for an all-cards layout; more event types added), then export it to a committed Markdown file (e.g. in `.claude/`) so it becomes durable project memory — the explore → plan → code → commit workflow. Second, multi-agent execution: running several full Claude Code instances in parallel on the same project to accelerate independent work. The chapter is explicit that its demo uses the simplest, most fragile form — multiple instances on the same branch with shared file access — safe only when each agent is scoped to a different file (the HookHub walkthrough restyles `HookCard.tsx` and `Hero.tsx` in two terminals via 'Modify only … / Do not modify …' prompts, then reviews with `git status`/`git diff` and commits once). The discriminating skill is telling independent tasks (parallel-safe) from dependent ones (a frontend that needs a not-yet-built backend API must be sequential), and the engineer's role shifts from implementation to coordination and oversight. Closes by naming what the book defers: Git worktrees (`claude --worktree`) as the documented isolation fix, and the three distinct senses of 'multiple agents' — terminal instances (this chapter), in-session subagents (next chapter), and agent teams. Newcomer preface, six per-section analogies plus a closing house-renovation analogy, three original SVG diagrams + a three-mechanisms table, a spec-and-split activity, and a framework-free (~35–45 min) hands-on lab that drives plan mode read-only then two parallel agents on a static sandbox, with a worktree stretch. Source PDF was image-only and transcribed from rendered page images.

~115 min

Chapter 7 Ready

Working with Claude Code Subagents

Picks up Chapter 6's deferred promise: subagents — the in-session form of 'multiple agents.' A subagent is a specialized assistant the main agent delegates a scoped task to, with its own system prompt, its own isolated context window, and selective tool access; it never sees the conversation history (only the one prompt the main agent writes it) and returns a single condensed summary. The chapter builds this up in order: what a subagent is and the Markdown-with-YAML-frontmatter file that defines it (required `name`/`description`; `tools` as an allowlist where omitting inherits all and listing restricts; `model` defaulting to `inherit`; project `.claude/agents/` vs user `~/.claude/agents/` scope — with a note that the current frontmatter schema and scope hierarchy are much larger than the book lists); creating one with `/agents` (generate-with-Claude vs manual, the `code-comedy-carl` example, least-privilege tool selection, model/color); invoking it (automatic delegation via the `description`, naming it, or `@`-mention) and the key nuance that Claude runs multiple subagents sequentially unless the prompt makes their independence explicit ('review these files in parallel'). The conceptual spine is context flow: the main agent sends one prompt = the subagent's only context, the subagent explores in a fresh isolated window (tens of thousands of tokens) and returns a ~1–2k-token condensed summary, so the main thread stays lean and you reach for `/compact`/`/clear` far less — grounded in Anthropic's context-engineering 'attention budget' / context-rot framing. Then the two levers for shaping a subagent (the `description`, appended to the main agent's system prompt, controls when it fires AND how the main agent prompts it; the system-prompt body controls internal logic/output format), via the Mermaid-diagram example, plus tool pollution / least privilege and the security risk of an untrusted definition hijacking the main agent. The capstone scales to concurrent subagents through the community Infinite Agentic Loop pattern (by IndyDevDan / GitHub `disler` — corrected from the book's 'IndieDevDan'; explicitly not an official Anthropic feature): `/infinite <spec> <dir> <count>` turns the main agent into an orchestrator that fans out parallel subagents (via the Agent tool, formerly Task) to generate many variations (six Hero components) for human selection — a high-order/'meta' prompt that runs spec-analysis → directory-reconnaissance → iteration-strategy → parallel-coordination phases, mapping onto the orchestrator-workers pattern. Throughout, the honest cost counterweight: parallel subagents multiply tokens (~4× a chat per agent, ~15× multi-agent in Anthropic's internal numbers), worth it only for genuinely independent, high-value work. Newcomer preface, seven per-section analogies plus a closing consulting-firm analogy, three original SVG diagrams (context flow; the two levers; the Infinite-Loop fan-out), an on-paper subagent-design activity, and a framework-free ~35–45 min hands-on lab (build a least-privilege reviewer with `/agents`, watch context isolation, pull both levers, then force parallel execution). Source PDF was image-only and transcribed from rendered page images.

~120 min

Chapter 8 Ready

Creating and Customizing Output Styles

Shifts from delegating work (Chapters 6–7) to engineering the main session's *communication protocol*. The spine is the **output style** — a small, reusable, file-based definition that modifies Claude Code's system prompt to set a role, tone, and output format (it changes *how* Claude responds, not *what* it knows). Covers the built-in styles (Default, Explanatory, Learning, and the newer **Proactive**), selecting one with `/config` → Output style or the `outputStyle` setting (the book's standalone `/output-style` command was deprecated v2.1.73 and **removed v2.1.91**), and authoring custom styles as Markdown + YAML frontmatter at user (`~/.claude/output-styles/`) or project (`.claude/output-styles/`) scope. The load-bearing nuance the book omits: a custom style **drops Claude Code's software-engineering instructions unless `keep-coding-instructions: true`** — and how output styles sit among the other behavior-shaping tools via the docs' comparison table (CLAUDE.md = a user message *after* the system prompt; `--append-system-prompt` = a one-off; subagents = a scoped helper; Skills = on-demand). Then two richer styles: a **YAML** style where the format itself carries meaning (dependencies as nesting, priority from ordering — like Kubernetes/Docker Compose configs), and an advanced **HTML** style that *embeds a workflow* (generate a complete ASCII-art HTML page, write it to disk, open it) directly in the definition with no code or plugins. The second half customizes the **status line**: the `/statusline` command or the `statusLine` settings block, and the data flow — Claude Code pipes session JSON (model, `output_style.name`, `context_window`, `cost`, `transcript_path`) to a script on stdin, and whatever it prints to stdout becomes the persistent bar (ANSI color supported); a worked Python script reads the transcript to show the last user prompt. Closes on the book's vision of a **'team of specialized agents'** — one styled instance per role (frontend/backend/devops/security) — taken seriously *and* checked honestly against the documented parallel-work tools (subagents; agent teams, experimental and off by default). Newcomer preface, six per-section analogies plus a closing mixing-board analogy, two original SVG diagrams (system-prompt rewrite via `keep-coding-instructions`; the status-line stdin→script→stdout flow), an output-style-design activity, and a framework-free ~35–45 min lab (two custom styles, a `keep-coding-instructions` before/after, and a live status line) on a stdlib-only sandbox. Source PDF was image-only and transcribed from rendered page images (code verbatim, prose summarized).

~115 min

Chapter 9 Ready

Understanding Agent Skills

The architectural deep-dive on **Agent Skills** — picking up the Skills surface Chapter 3 introduced mechanically and explaining what skills *are*, how they spend or save the context window, how they run real scripts, and where they sit among the other primitives. A skill is a **folder** (`SKILL.md` + optional scripts/resources) that packages a reusable workflow so the agent performs a recurring task consistently, loaded on demand — *packaging, not a new kind of intelligence*. The conceptual core is **progressive disclosure**: a cheap skill *listing* (name + `description`) loads up front; the full `SKILL.md` body loads only when the skill is selected and then **persists in the conversation for the session** (a recurring cost — keep the body lean); bundled files load only when referenced. Claude routes on the *listing* — primarily the `description` (with `when_to_use` appended; the body's first paragraph only if `description` is omitted) — which is why editing deep body text doesn't change *when* a skill fires. Worked on the recurring HookHub project (a `brand-guidelines` styling skill vs. prompting directly + the CLAUDE.md-bloat trap) and a `git-pushing` skill whose bundled `smart_commit.sh` (referenced via `${CLAUDE_SKILL_DIR}`) starts deterministic, then is upgraded to call the Claude CLI (`claude -p`) for an AI-written commit message — a layered system showing a skill can hold deterministic scripts, AI calls, or both. Because a skill injects *instructions* (not rigid path bindings) into an agent that can reason, Claude can often recover from a moved or failed script — but that recovery is a *capability, not a guarantee*; for a step that must run every time, use a hook, not a skill's prose. Closes by placing skills among the primitives — Skills (instructions, main context) vs MCP (external integration; tool definitions deferred by default) vs subagents (isolated context, returns a summary) vs slash commands (now merged into skills) — with a routing rule of thumb and the note that skills are a cross-product open standard. Newcomer preface bridging from Chapter 3, five per-section analogies plus a closing workshop analogy, two original SVG diagrams (progressive disclosure; skill-as-packaging with a non-guaranteed reasoning backstop), a routing activity, and a framework-free, stdlib-only ~35–45 min lab (build a `repo-brief` skill + bundled script, prove selection follows the listing, add a `claude -p` call, break the path and watch recovery). Source PDF was image-only and transcribed from rendered page images (code/tables verbatim, prose summarized).

~115 min

Chapter 10 Ready

Using Claude Code Desktop

Assembles the whole book's threads into one workflow: orchestrated, parallel development across local and cloud environments through the Claude desktop app. Establishes that Claude Code lives in the desktop app's **Code** tab as a graphical front end to the same engine and config (CLAUDE.md, MCP, hooks) as the CLI, then draws the central distinction between **Local worktree** mode (everything runs on your machine; Git worktrees created locally) and **cloud** mode (managed, containerized instances on Anthropic's infrastructure that clone your repo via GitHub, work, commit, and open PRs — the 'background agents,' which persist and scale). Git **worktrees** are the load-bearing mechanism — one repository checked out into several directories so each agent works on its own branch without colliding — taught with the full lifecycle (create worktree on a new branch → work in that dir → commit lands on the worktree branch → original branch untouched → merge) and the current defaults a 2025 book omits (worktrees branch from `origin/HEAD` by default; cleanup is conditional, not automatic). The spine is a three-feature parallel walkthrough (animations + hooks-DB update locally, an Anthropic-style hero redesign in the cloud) whose key teaching moment is a cloud agent starting from `main` instead of `project/hookhub` — proving a wrong base silently poisons the merge, so each agent's starting branch must be specified and verified. Merging uses the integrate-test-then-push pattern: a temporary `project/hookhub-merge` integration branch, conflicts resolved there, the result tested locally before pushing — and the honest framing that Claude has **no magic merge command** (it runs standard Git in a worktree; advisory and human-gated). Extends the same flow to **mobile** (all-cloud execution: clone/checkout/commit remotely, open a PR, `@claude review`) and closes on the chapter's two-sided skill — **when NOT to parallelize** (tightly coupled, shared state, tiny tasks, high coordination cost, exploratory work) plus the parallel-development checklist. Drift corrected against current docs: 'background agents' → cloud/background *sessions*; the desktop Local-vs-cloud toggle → a Local/Remote/SSH environment picker; worktree base-ref and conditional-cleanup defaults; mobile split into Claude Code on the web vs Remote Control; no automated cross-branch merge. Newcomer preface, seven per-section analogies plus a closing 'workshop with a satellite shop' analogy, three original SVG diagrams (local vs cloud; the worktree layout; the integration-branch merge), a parallel-vs-sequential split activity, and a framework-free (~35–45 min) hands-on lab that reproduces worktree isolation, parallel edits on separate branches, and the integrate-test-then-push merge entirely locally with `git` + the Claude CLI. Source PDF was image-only and transcribed from rendered page images (code/commands/paths verbatim, prose summarized).

~120 min

Chapter 11 Ready

Understanding Deep Agents

The book's conceptual capstone: what a 'deep agent' is and how state-of-the-art coding agents like Claude Code are built. Opens with an **agent taxonomy** — the broad domain of agents (agentic apps like hybrid RAG, the foundational ReAct reason→act→observe loop) splits into **shallow** agents and **deep** agents, and deep agents split into deep-research agents and **coding agents** (Claude Code, Cursor, Devin, Gemini CLI) — and argues that much current progress comes from the **application layer** (the 'agent harness'), not just bigger models. Explains why **shallow ReAct agents hit a wall** on long-running work (each iteration injects the tool result back into the prompt → the context grows → **context rot** degrades quality and raises cost), which motivates 'deep' = the ability to do complex, long-horizon tasks reliably, i.e. **smart context management**. The spine is the **four building blocks** a deep agent shares (LangChain's articulation): (1) a **detailed system prompt** — a reasoning framework, heuristics, language efficiency; (2) a **planning tool** — an explicit dynamic to-do list (pending/in-progress/completed) whose real job is context management ('almost a no-op'); (3) **subagents** — hierarchical delegation to specialized workers in isolated contexts that return only a summary; (4) a **filesystem** — write intermediate state to disk + selectively retrieve with glob/grep ('the filesystem as a context engine,' via the three-box all-available ⊃ selected vs required model). Each block is mapped to both Claude Code and the LangChain DeepAgents harness, and three of the four are shown to be context-management moves. Closes by tying the four pillars back across the whole book (context engineering Ch1 → CLAUDE.md/permissions Ch2–3 → MCP Ch4 → GitHub Ch5 → planning/parallel Ch6 → subagents Ch7 → output styles Ch8 → skills Ch9 → desktop/cloud Ch10 are all pillars of the same structure). Drift corrected against current docs: **'deep agent' is a community/LangChain term, not an Anthropic/Claude Code label** (Anthropic says 'long-horizon execution'); the book's **`TodoWrite`/`TodoRead` planning tool is now the legacy surface** — current Claude Code uses the **`Task*` family** (`TodoWrite` disabled by default) — and the in-session to-do list is distinct from read-only **plan mode**; the **`Agent` tool** (formerly `Task`) drives subagent delegation; **'filesystem as a context engine' is an engineering principle**, not a documented Claude Code feature name (grounded in Anthropic's *Effective context engineering* post). Newcomer preface, seven per-section analogies plus a closing 'expedition / whole-book' capstone analogy, three original SVG diagrams (the agent taxonomy; the four pillars as columns over long-horizon execution; the filesystem context-engine three-box model), a 'find the four pillars in a tool you use' activity, and a framework-free (~35–45 min) hands-on lab that drives Claude Code through a multi-step task to watch all four pillars run (the Task* to-do list, a subagent returning a summary, write-to-disk + glob/grep retrieval, and a CLAUDE.md heuristic reshaping behavior). Source PDF was image-only and transcribed from rendered page images (headings/code/tool-names verbatim, prose summarized).

~115 min

Capstone Ready

Capstone Project

The course finale: one framework-free, end-to-end build that threads every chapter's skill into a single project, plus a cumulative final exam covering all 11 chapters. Step-by-step (Claude Code + git + a throwaway stdlib sandbox — no npm/Node, no accounts), the learner builds a small Python-stdlib `devlog` CLI (a JSON-backed project journal/changelog) and reaches for the right tool at each stage: set up project memory in a CLAUDE.md with a deliberate load-bearing gotcha (entries are append-only; never renumber existing ids — echoing Chapter 5's break-then-fix); design the data model and commands in plan mode and export a committed spec (Ch6); build the core under the permission gate (Ch2–3); package a `release-notes` skill and an output style (Ch8–9); delegate a least-privilege subagent review and apply its summary (Ch7); build two independent features (`search` + `export`) in parallel git worktrees and integrate-test-merge them (Ch10); and reflect by mapping the whole build onto the four deep-agent pillars (Ch11), with short conceptual notes on where an MCP server fits (Ch4) and how you'd wire the GitHub Action (Ch5). Closes with a success checklist, common pitfalls, and an optional 'apply it to your own repo' coda. The cumulative final exam is ~12 application/scenario questions drawn proportionally from all 11 chapters (so MCP and the GitHub Action are assessed even though the hands-on build touches them lightly), auto-graded in the app with a passing score of 9/12 — closing the deferred 'final assessment covers all chapters proportionally' item. Original pedagogical synthesis (not from the book), grounded in the canonical-correct facts established across the chapter audits. ~120 minutes (90–120 min project + ~20 min exam).

~120 min