IntermediateEnglish40 lectures · 1h 58m

Claude Code Hands-On: CLAUDE.md, Hooks, Skills, Subagents

Drive Claude Code in a real repo: sessions, permissions, CLAUDE.md, hooks, skills and subagents, recorded live

Watch 3 lectures free

01

What changes after this course

  • ●Instead of everyone on the team prompting Claude Code by trial and error, you set up CLAUDE.md, hooks and permission rules for the repository
  • ●Instead of doing everything in one session, you hand work to subagents and review what comes back
  • ●Instead of starting over after a bad change, you recover from it and keep context and cost under control

02

Why it matters now

Coding agents now read your repository, edit files and run commands. The difference between using one by trial and error and using it on purpose sits in a few files: permission rules, CLAUDE.md, hooks and skills. This course builds each one in a real repository, recorded as it happened.

03

What you leave with

  • ✓The demo project with a snapshot for every lecture
  • ✓37 setup scripts, so any lecture can be watched on its own
  • ✓Your own CLAUDE.md, hooks, skills and a reviewer subagent

04

Skills you'll build

  • →Run a Claude Code session the safe way: ask, act, review, verify
  • →Write a CLAUDE.md that changes behaviour, and hooks that format code and block edits to secrets
  • →Write skills and subagents, and know when not to delegate

Inside the course

Screens from the lectures: recorded Claude Code sessions in the course's demo todo-api repo, which a setup script puts in each lecture's state. Claude Code is Anthropic's tool; this course is independent and not made by Anthropic.

Claude Code adds two delete tests to tests/test_todos.py and reports all 4 tests passing

Terminal: Claude Code in todo-api (setup/S1_L02.sh)

First session: two tests added, 4 of 4 pass

The first task is small and checkable. Claude Code adds tests for deleting a todo and for deleting a missing one, runs them, and reports all 4 tests passing.

▶ Lecture 1.2 · Your first session - ask, act, review
Same one-line question asked with --model haiku and --model opus, both answer 4, costs 0.0187 and 0.0759 dollars

Terminal: claude -p in todo-api (setup/S1_L09.sh)

Same answer, two prices

The same question goes to two models with --output-format json. Both answer 4 endpoints; the JSON reports what each run cost, about 0.0187 dollars for haiku and 0.0759 for opus.

Lecture 1.9 · Choosing a model and an effort level

Claude Code lists which lines of a CLAUDE.md change nothing in its behavior

Terminal: Claude Code in todo-api (setup/S2_L04.sh)

Roughly 4 of 10 lines carry weight

Asked to audit a CLAUDE.md, Claude Code marks lines 1, 4, 5 and 6 as inert: it would behave the same if they were deleted. Lines 5 and 6 are generic filler.

Lecture 2.4 · CLAUDE.md anti-patterns - the file that changes nothing

A Stop hook keeps blocking because tests fail, until Claude Code overrides it after 9 blocks

Terminal: Claude Code in todo-api (setup/S3_L03.sh)

A Stop hook that never lets go

The Stop hook blocks the turn while tests fail, again and again. After 9 consecutive blocks Claude Code overrides it and points at stop_hook_active, the check the hook was missing.

Lecture 3.3 · Hook events end to end - SessionStart, Stop, and exit codes

A reviewer subagent finishes in 22 seconds and requests changes: the 4 test failures come from the diff

Terminal: Claude Code in todo-api (setup/S5_L02.sh)

The reviewer blames the diff, not the tests

A reviewer subagent reads the diff and asks for changes: the 4 failing tests are caused by the diff, not by stale tests. It names a 201 to 200 status change and a changed error string.

Lecture 5.2 · Write your own subagent

Two new bulk-complete tests fail with 405 before the endpoint exists: 2 failed, 17 passed

Terminal: Claude Code in todo-api (setup/S7_L02.sh)

Tests first, and they fail for the right reason

The tests for a new bulk-complete endpoint are written before the endpoint. Both fail with 405, since the route does not exist yet: 2 failed, 17 passed.

Lecture 7.2 · Test-driven - let the failing test do the specifying

What you'll learn

  • ✓Run a Claude Code session the safe way: ask, act, review, verify
  • ✓Choose permission modes and write allow and deny rules for a repository
  • ✓Write a CLAUDE.md that actually changes behavior, and know what belongs in rules, memory or hooks instead
  • ✓Build hooks that format code after every edit, block edits to secrets and add context to every prompt
  • ✓Write skills with arguments, pre-approved tools and scripts, and fix a skill that never fires
  • ✓Write subagents with restricted tools, run them in parallel, and know when not to delegate
  • ✓Recover from a bad change, manage context and cost, and audit what your repository ships to the team

About this course

Claude Code is a coding agent that lives in your terminal. It reads your repository, edits files, runs commands and tests, and asks before it does anything you have not allowed. This course teaches you to drive it deliberately, in a small FastAPI project that you can follow along with, one feature at a time.

Section 1 is the working loop: ask before you order, review every edit and command, resume and compact sessions, choose a permission mode on purpose, read what the tool lines hide, write prompts with a definition of done, use plan mode, and pick a model for the difficulty of the task. Section 2 is CLAUDE.md: what belongs in it, project versus personal versus path-scoped rules, how auto memory differs, and the lines that change nothing or do harm. Section 3 adds hooks, the only mechanism that is enforced rather than suggested: a formatter after every write, a guard that blocks edits to secrets, the session events, and a hook that gives the agent context it cannot read. Section 4 is skills: arguments, pre-approved tools, auto-invocation, forked context, why a skill is never selected, and skills that run scripts. Section 5 is subagents: the built-in Explore and Plan agents, a code reviewer you write yourself, parallel and inline agents, when not to use one, and /subtask. Section 6 is the capstone, a real SQLite migration reviewed and committed, followed by recovery, context and cost, and background work. Section 7 is working for real: several repositories, tests as the specification, a large refactor in reviewable steps, shell mode, auditing what a teammate actually gets from your repository, and a full day at speed.

Every terminal lecture is a real session, recorded as it happened, including the moments where Claude asks for permission. Each lecture starts from a tagged snapshot of the demo project, so you can watch any lecture on its own.

**What this course is not.** It does not cover the desktop app, the IDE extensions or the web UI, and it does not teach Python or FastAPI. The follow-up course, *Claude Code in Production*, covers MCP servers, headless mode, CI and the Agent SDK.

Curriculum9 sections · 40 lectures · 1h 58m

Section 0. Welcome

Free preview

Section 1. Sessions and Permissions

Free preview
  • ▶Install and log in1:48
  • ▶Your first session - ask, act, review6:36
  • 🔒Sessions - resume, compact, clear5:24
  • 🔒Permission modes - manual, accept edits, plan, auto4:12
  • 🔒Permission rules - allow, deny, and settings.json3:42
  • 🔒Reading the screen - what the tool lines hide2:42
  • 🔒Prompting that works - criteria, scope, and limits3:00
  • 🔒Plan mode in depth - questions, the plan file, and pushing back2:36
  • 🔒Choosing a model and an effort level2:48

Section 2. CLAUDE.md and Memory

  • 🔒init and a CLAUDE.md that changes behavior3:06
  • 🔒Scopes, imports, and path-scoped rules3:18
  • 🔒Auto memory, and what belongs where2:42
  • 🔒CLAUDE.md anti-patterns - the file that changes nothing3:18

Section 3. Hooks

  • 🔒Hooks - a formatter that runs after every edit2:36
  • 🔒Guardrail hooks - block edits, inject context2:42
  • 🔒Hook events end to end - SessionStart, Stop, and exit codes3:24
  • 🔒A hook that gives the agent context it cannot read2:48

Section 4. Skills

  • 🔒Your first skill2:30
  • 🔒Skills with arguments and pre-approved tools2:30
  • 🔒Auto-invoked skills, supporting files, and forked skills2:18
  • 🔒Managing skills - skills, scope, and what a description buys you2:42
  • 🔒Skills that run scripts - let code do the counting2:42

Section 5. Subagents

  • 🔒Built-in subagents - Explore and Plan2:24
  • 🔒Write your own subagent2:42
  • 🔒Parallel and inline subagents2:36
  • 🔒When not to use a subagent3:06
  • 🔒subtask - delegating with your context, not without it2:54

Section 6. Capstone and Operating

  • 🔒Capstone - SQLite persistence with the whole setup2:18
  • 🔒Capstone - review, fix, and commit2:06
  • 🔒Recovering from a change you should not have asked for2:54
  • 🔒Context discipline - watching the window fill and clearing it2:18
  • 🔒Background tasks - working while the agents work2:48

Section 7. Working for Real

  • 🔒Several repositories at once2:24
  • 🔒Test-driven - let the failing test do the specifying2:48
  • 🔒Breaking a large refactor into reviewable steps2:30
  • 🔒Shell mode, and how the agent stays in sync with your edits2:24
  • 🔒Onboarding a teammate - auditing what your repo actually ships4:12
  • 🔒A day with Claude Code - the loop at full speed3:54

Section 8. Recap

  • 🔒Recap - what you built, and what to do next2:00

Requirements

  • · A computer with a terminal (macOS, Linux or WSL)
  • · A Claude subscription (Pro or Max) or an Anthropic API key
  • · Git, and comfort reading Python; the demo project is a 40-line FastAPI app

Who this is for

  • · Developers who have tried Claude Code and want to use it deliberately instead of by trial and error
  • · Tech leads deciding what to put in a team's CLAUDE.md, hooks and permission rules
  • · Anyone moving from chat-based AI assistance to agentic coding in a real repository

Read alongside the course

    The voice-over in this course is synthesized with a text-to-speech model from scripts written and reviewed by the instructor, and the on-screen material (notebooks, code, slides) is the instructor's own work.

    Claude Code Hands-On: CLAUDE.md, Hooks, Skills, Subagents | SOTAAZ Blog