Source: raw/Building_verification_loops_in_Claude_Code.md — official Claude YouTube channel (@claude), Building verification loops in Claude Code, video ID mQZB0l-rhxE (https://www.youtube.com/watch?v=mQZB0l-rhxE), auto-caption transcript fetched 2026-10-30, about 570 words. Changelog cross-reference: CLI Reference (v2.1.215).
Every prompt runs a loop: gather context, take action, verify, respond. Tests, type checks and linters already run in that verify step, but passing them “doesn’t prove the change does what you meant.” The proof is the check you do by hand afterwards: clicking through the page, calling the endpoint, tapping through the simulator. Anthropic’s short walkthrough shows how to hand that check to Claude with the built-in verify skill, then extend the skill it generates with measurable checks.
Key Takeaways
- Codify your manual check. Web app: open the page, click around, watch the console. Back end: call an endpoint and read the response. Mobile: tap through screens in a simulator. Written into the project, Claude can run these with a browser, the terminal or an iOS simulator, fix what fails, and run them again.
- Start with the built-in verify skill. The first time you use it, it runs your app and checks your change in the app itself, then saves the steps that worked as a skill in your project.
- Treat the generated skill as a starting point. Add the checks you personally look for. The video’s example is layout shift (page parts jumping as content loads), measured as a performance trace through Chrome DevTools MCP, which reports layout shift as one of the Core Web Vitals.
- Write three things per check: when Claude should run it, what to do when it fails, and what proves it passed.
- Measurable beats descriptive. “The more measurable a check is, the easier it is for Claude to tell whether it’s passed or not.”
- The project skill runs on its own. In the demo, Claude adds a Like button; because it is a UI change, Claude runs the project’s verify skill without being asked: starts the dev server, opens the page, clicks the button, screenshots it, runs the trace, finds layout shift, fixes it, and reruns until both checks pass.
- The habit to build: whenever you check something by hand and tell Claude what to fix, ask what Claude could measure its work against (a performance budget, an accessibility checklist, your design system’s rules) and codify it.
Try It
- Run the built-in skill once on a real change. Since v2.1.215 Claude no longer runs the built-in
/verifyskill on its own, so invoke it with/verify(per the changelog in CLI Reference). - Open the skill it saved in your project and add one check you always do by hand.
- Make the check measurable. For a web page, add a Chrome DevTools MCP performance trace and a layout-shift threshold. The video does not give a number; pick one from your own performance budget.
- Spell out the three parts for each check: trigger (for example “any UI change”), failure action (“fix and rerun”), and proof (“screenshot plus trace score”).
- Ask for the evidence back. The demo returns the screenshots and scores with the working change, so you review proof rather than a claim.
Implementation
Tool/Service: Claude Code’s built-in verify skill; Chrome DevTools MCP for performance traces; a browser, the terminal or an iOS simulator as verification tools.
Setup: run the verify skill on a change → it saves a project skill → edit that skill to add checks with trigger, failure action and proof.
Cost: not stated. Each verification run uses tokens and tool calls like any other step.
Integration notes:
- The generated skill lives in the project, so it travels with the repo, including into cloud sessions, which carry repo skills but not
~/.claude. - Automatic running applies to the saved project skill in the demo. The built-in
/verifymust be called explicitly since v2.1.215. See Open Questions.
Open Questions
- Which skill runs on its own? The video says Claude runs “the verify skill we just created” by itself for a UI change. The v2.1.215 changelog says Claude “no longer runs the
/verifyand/code-reviewskills on its own.” The two fit if the auto-run applies only to the generated project skill, but the video does not say what triggers it (a description in the skill, or aCLAUDE.mdrule). - The name and path of the saved project skill are not shown in the transcript.
- No layout-shift threshold is given.
Related
- Stop Babysitting Your Agents (Sid) — the verification loop as the core of agent autonomy.
- How We Claude Code (Ara’s workshop) — verification built into the artifact as a contract.
- Verifier-First Loops — proof that lives outside the agent’s own explanation.
- Getting Started with Loops (Anthropic) — the loop framing this video starts from.
- Agent Skills Overview — how project skills load and trigger.
- How the Claude Code Team Uses Claude Code — verification as one of the team’s three primitives.