Day 1, 30 minutes · advanced
Why it matters
Claude stops when the work looks done. If it has nothing to run that says pass or fail, "looks done" is all it has, and you become the test. That is fine while you watch every step. It is not fine when you want Claude to work for half an hour while you do something else.
This course is about those longer, hands-off runs. It is for people who finished Claude Code 101: you can install Claude Code, write a clear prompt, keep a short CLAUDE.md, switch permission modes and undo a change. Now you learn to let Claude work on its own and still trust the result: a finish line it can prove, steering, settings, hooks, scripts and scheduled runs.
You follow one small practice project. Ines runs the Kettleby Tool Library, a made-up lending library for tools, and keeps one plain text card per tool. Today you set up her cards, write a tiny check that says whether every card is correct, and give Claude a finish line with /goal. At the end Claude has fixed the broken cards on its own and you have the check output as proof.
A check Claude can run
The best practices page puts it simply: give Claude something it can run that comes back pass or fail. Then Claude can make a change, run the check, read what broke and fix it, without you in the loop. The check can be a test, a build, a linter or, as here, a small script.
Ines's cards are three lines each: Name:, Shelf: and Status: (in or out). The check is a short shell script, check.sh, that reads every card and prints the problems, or one OK line. It ends with exit code 0 when all is well and 1 when not. An exit code is the number a command hands back when it finishes: 0 means success.
To run it the same way on every system, you give git a short name for it: git check. Git runs that name with its own small shell, so it works in PowerShell on Windows as well as on macOS and Linux. You need Git for Windows on Windows, which Claude Code 101 recommended.
A goal: a finish line a second model checks
/goal sets a completion condition. After every turn, a separate small, fast model reads the conversation and gives one of three verdicts:
- Not yet met: Claude starts another turn, with the reason as guidance.
- Met: the goal clears and the transcript records it as achieved.
- Impossible: the goal clears and the transcript records why.
So "done" is decided by a fresh model, not the one doing the work. The goal page adds an important limit: the evaluator does not run commands or read files itself. It only judges what Claude has shown in the conversation. That is why the condition must ask Claude to run the check and show its output.
A good condition has three parts, as the goal page lists them:
- One measurable end state, such as an exit code or an empty list.
- A stated check: how Claude proves it, such as "
git checkexits 0". - Constraints: what must not change on the way there.
Add a limit too, such as "or stop after 8 turns". The evaluator judges that from the conversation as well.
A goal does not change your permission mode. In auto mode the turns run without prompts. In Manual mode Claude still asks before commands your settings do not allow. Evaluation tokens are billed on top of the normal work, and one goal can be active per session.
The steps
- Make the practice project and give git the
checkname. - Ask Claude to create the cards, the check and a short CLAUDE.md, with two cards broken on purpose.
- Run the check once and commit the starting point, so you can see later exactly what Claude changed.
- Set the goal with an end state, a check, constraints and a turn limit.
- Watch the verdicts. Each one shows in the transcript.
Ctrl+Oshows the reason behind it, and/goalon its own shows the condition, the turns, the time and the token spend. - Check the proof yourself. Read the check output Claude showed, then run the check yourself and look at what changed.
- Write a finish line for a task of your own.
Follow the steps for Claude Code below.
Example: Ines's goal
Ines typed this goal:
/goal git check prints OK and exits 0. Only files in items/ may change; check.sh and CLAUDE.md stay as they are. Show the full git check output in your last message. Or stop after 8 turns.
Claude added the missing shelf line to the hedge trimmer card and changed Status: lent to Status: out. It ran the check, showed OK: every item card passes, and the evaluator returned "met" after two turns. Ines then ran git check herself and read the diff before she committed.
Common mistakes
- A goal the evaluator cannot see. "The cards are correct" gives the evaluator nothing to read. "
git checkexits 0, show the output" does. - No constraints. Without "check.sh stays as it is", the quickest way to a passing check is to change the check. Lesson 3 turns that rule into a lock.
- Trusting "all done". Ask for the command and its output. For a run you did not watch, that output is your only evidence.
Deeper dive
Today's actions
Ticks are not saved without an accountDo it in Claude Code
Claude Code
- In your terminal (PowerShell on Windows), run these lines one at a time. The fourth line gives git the name
checkfor the script you create next. When Claude Code asks whether you trust the new folder, accept.mkdir kettleby-tools cd kettleby-tools git init git config alias.check '!sh check.sh' claude - Paste this setup prompt and press Enter. Claude creates five cards, the check script and a short CLAUDE.md.
Set up this practice project. Do not run any commands yet. 1. Create a folder items with five cards: ladder.txt, tile-cutter.txt, hedge-trimmer.txt, pressure-washer.txt and sewing-machine.txt. Each card has three lines: Name: <the tool>, Shelf: <one of A1 to A4>, Status: in or out. On purpose, leave out the Shelf line in hedge-trimmer.txt and write Status: lent in sewing-machine.txt. 2. Create check.sh with exactly this content: #!/bin/sh # check.sh: checks every item card in the items folder fail=0 for f in items/*.txt; do for field in Name Shelf Status; do grep -q "^$field: " "$f" || { echo "$f: no $field line"; fail=1; } done grep -Eq '^Status: (in|out)([^a-z]|$)' "$f" || { echo "$f: Status is not in or out"; fail=1; } done if [ "$fail" -eq 0 ]; then echo "OK: every item card passes"; fi exit "$fail" 3. Create CLAUDE.md with these three lines: Kettleby Tool Library: one card per tool in items/, with the lines Name, Shelf and Status (in or out). Check: run git check. Done means it prints OK and exits 0. Never edit check.sh. - Ask Claude to run the check and save the starting point. You should see two problems and exit code 1.
Run git check and show me the full output and the exit code. Then commit everything with the message: Starting cards, two broken on purpose. - Set the goal. It starts a turn at once, so you do not send a separate prompt.
/goal git check prints OK and exits 0. Only files in items/ may change; check.sh and CLAUDE.md stay as they are. Show the full git check output in your last message. Or stop after 8 turns. - Watch the transcript: after each turn it shows the evaluator's verdict. Press
Ctrl+Oto see the reason, and type/goalto see the condition, turns, time and token spend. If the bar showsmanual mode on, answer Yes when Claude asks to rungit check. - When the goal is met, run the check yourself with the
!prefix, which runs a command without going through Claude, and look at what changed.! git check ! git diff --stat - Ask Claude to commit the fix, then type
/exitand write your own finish line: one end state, one check, one constraint and a turn limit.Commit the changed cards with the message: Fix cards so git check passes.
Note: On Windows use PowerShell, not CMD: CMD does not treat the single quotes in the git config line as quotes. git check runs the script with the small shell that comes with Git for Windows, so you need Git for Windows. If /goal is missing, hooks may be turned off in your settings; the goal page lists the cases.
Paid planNeeds a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. The free Claude plan does not include Claude Code.
Create a free account to save your progress
Free, and no payment details. Your ticks and finished lessons are kept, on every device.
Create a free account I already have an accountCreate a free account to save your progress. Sign in or sign up