Skip to main content

Claude Code Basics Lesson 23 of 46

Verification in the Loop: Give It a Yardstick

In short
  • The plan says what it will do. The yardstick tells it whether it came out right.
  • A yardstick is something it can compare its own work against: an image, a sample file, a checklist.
  • With a yardstick it corrects itself, inside the loop, without going through you.
  • Without a yardstick, you're the only judge — and only at the end.

The problem with not knowing you got it wrong

Let's put two things you already know back together. The agent loop is: think, act, check how it went, decide the next move. And the model, on its own, has no idea what you had in mind.

Put the two together and the weak point shows up: if that "check how it went" has nothing to compare against, it turns into a guess. It thinks it finished the job well. You open the result, and it isn't.

The fix isn't explaining better in words. It's giving it a yardstick: something it can measure its own work against, on its own.

What a yardstick looks like

  • An image. If you want something to come out a certain way, hand it a screenshot or a mockup instead of describing it. An image is both the request and the yardstick: it looks at it, builds, compares.

  • An already-finished example. "Make the others like this one." One well-made file is worth three paragraphs of instructions.

  • A check it can run. Something that gives a clear pass/fail outcome, and that it can run on its own until it comes back green.

  • A list of conditions. "It's done when: every file has a date in its name, none is left uncategorized, and the total matches the starting one." Those are checks it can go through one by one.

Notice what they have in common: they aren't descriptions, they're comparisons. The difference between "make it nice" and "make it like this".

What changes in the loop

With a yardstick in hand, the loop closes in on itself: it acts, compares, notices something's off, fixes it, compares again. All of this before handing the work back to you.

It's the difference between a collaborator who brings you the first draft and one who brings you the third — having thrown out the first two on their own.

The list of tools Claude Code used in a single reply: after creating the file, a long sequence of browser actions — open the page, read the text, fill in a field, navigate, re-read.
The yardstick, in practice: after writing the file, it opened it in the browser and tried using it — clicks, text typed in, the page re-read. All of this before telling me it was done.

The practical rule

Before kicking off a task, ask yourself one question: "how would it know, on its own, whether it got this right?"

If you can't answer that, the yardstick is missing. And if it's missing, checking falls entirely on you, at the end, when fixing things costs the most.

Now what

You now have every piece of the first bucket: what gets through and what stops, the rules, the modes, the plan, and the yardstick. In the next lesson we put them all together on a real task, start to finish.

Did you get it?

Two minutes, no grade. Trying to answer — even getting it wrong — cements the concepts far more than rereading. Not in the mood? Skip it: the lesson still counts as complete.

What does it mean to "give it a yardstick"?

Why does a yardstick make the agent loop more effective?

You want a page to come out like an image you have in mind. What do you do?

Course Claude Code Basics
  1. Chapter 1 Introduction

    1. 1 The Claude Ecosystem and Where Claude Code Fits
    2. 2 What Claude Code Is: The Collaborator Who Walks Into Your Studio
    3. 3 How an Agent Works: The Loop
  2. Chapter 2 What's Underneath

    1. 4 Claude Code in Action: The Loop, for Real
    2. 5 The Model Has No Memory: It Starts Over Every Time
    3. 6 The Harness: The Engine and the Gear Around It
    4. 7 The Map: Four Buckets
  3. Chapter 3 You Choose the Engine

    1. 8 There's No Single Claude: The Model Lineup
    2. 9 Which Model for Which Job
    3. 10 Effort: How Hard It Should Think
    4. 11 Model or Effort? The Question That Trips Everyone Up
    5. 12 The Bill: Why Saving Money Can Cost You More
  4. Chapter 4 First Time at the Controls

    1. 13 Where to Run It: Four Doors In
    2. 14 What You Need Before You Start
    3. 15 Installing Claude Code
    4. 16 The Folder: Where You Open It Decides What It Works On
    5. 17 Choosing the Engine, in Practice
    6. 18 Your First Task: Small, Yours, and It Works
  5. Chapter 5 What You Let It Touch

    1. 19 Why It Asks for Permission
    2. 20 The Rules: Always Yes, Ask Me, Never
    3. 21 The Modes: How Much Leash You Give It
    4. 22 Plan Mode: Get the Plan Before the Work
    5. 23 Verification in the Loop: Give It a Yardstick
    6. 24 Example: Putting the Bucket Together
  6. Chapter 6 What It Knows About You

    1. 25 CLAUDE.md: The Notes It Reads the Moment It Walks In
    2. 26 How to Write a CLAUDE.md That Actually Works
    3. 27 The Context Window: How Much It Can Hold at Once
    4. 28 Cleaning Up: Compact and Clear
    5. 29 Automatic Memory
    6. 30 Example: From Repeating Yourself to Never Again
  7. Chapter 7 Skills

    1. 31 What a Skill Is: A Procedure Written Once
    2. 32 Creating Your First Skill
    3. 33 The Description Decides Whether It Gets Used
    4. 34 Example: A Skill That Saves You the Week
  8. Chapter 8 How Many You Put to Work

    1. 35 The Subagent: A Helper With Its Own Desk
    2. 36 When a Helper Is Worth It (and What It Costs)
    3. 37 Teams: When Agents Talk to Each Other
    4. 38 Example: Searching Without Cluttering the Desk
  9. Chapter 9 What It's Connected To

    1. 39 MCP: The Standard Plug Into Your Tools
    2. 40 Plugins: Packaging Up and Borrowing
    3. 41 Example: When You Stop Copying and Pasting
  10. Chapter 10 Automating the Setup

    1. 42 Hooks: The Thing That Always Happens
    2. 43 Where It Fires and What It Can Do
    3. 44 When You Actually Need One (and When It's Too Much)
  11. Chapter 11 Wrap-Up

    1. 45 The Project: Your Expense Tracker
    2. 46 Wrap-Up: What You're Taking Home
From a Confusing Brief to a Complete UX/UI A vague brief becomes a navigable app. Product Ad From a Single Photo A photo becomes an animated ad, no code required. Get Claude to Watch Your Videos Claude watches your videos and turns them into text. Higgsfield Inside Claude Code Generate images and video while you code in Claude Code. Turn a Loom Recording Into a Web Page A screen recording becomes a web page, no code. Vertical Shorts With NotebookLM Your sources become a vertical short. Luxury Landing Pages on Lovable A luxury landing page from a single prompt. Excalidraw Running Locally Excalidraw free on your computer, no code. Mistral OCR in Your Workflow Extract text from documents with Mistral OCR. Claude SEO in the Terminal 25 free SEO skills inside Claude Code. Google Search Console inside Claude Code Search Console data inside your terminal. Claude Code Routines Claude working on its own, computer off. Clone a Landing Page in React With v0 Clone a real landing page into React code. Context Economy With Claude Work light and don't burn through Claude's limits. From Prompt to Self-Improving Skill Claude skills that learn from your mistakes. From NotebookLM to Canva: Presentations NotebookLM slides, finally editable in Canva. The Map for Understanding Every AI Tool 12 categories for placing any AI tool. Transparent PNGs With ChatGPT Real transparency, not a fake checkerboard. Animated Infographics With Gemini Infographics that loop, animated with Gemini. Market Research With Deep Research Deep Research as your market analyst. Get Cited by AI Search Engines (AEO) Become a source that ChatGPT and Perplexity cite.