Skip to content

This page was translated from the Korean original with AI and may contain errors.

Chapter 5. Verification and Testing — Give a Check and Get Evidence ​

Required Read this to follow this stage.

One-line summary: AI stops when the work looks done. If you give it a check that tells it whether the work is truly done, AI runs a loop where it fixes and re-checks on its own. And instead of just hearing "everything passed," ask for evidence (the command it ran and its output, or a screen).

This chapter is based on the official Claude Code and GitHub docs checked on November 1, 2026. The habit of checking results against your original notes in Stage 3 becomes automated under the name of a "check" in Stage 4.

Why You Need a Check ​

The official best practices guide puts it this way. Claude stops when the work looks done. If it has nothing to tell it whether the work is actually done, "looks done" is all it has to go on.[1] Then you end up being the test, and every mistake stays there until you happen to notice it.[2]

On the other hand, if you give it something that answers pass or fail, Claude closes that loop itself. It makes a change, runs the check, reads the output if it broke, fixes it, and runs it again.[3]

Without a checkWith a check
"All done" → You open it and hunt for mistakesCheck fails → Claude fixes it → Re-checks → Passes

Source: Summary from this guide (based on official docs)[3:1]

Quick check

What changes when you give Claude a verification check (a test that answers pass or fail)?

Types of Checks ​

A check can be anything as long as Claude can read the result. The official docs give examples like these.[4]

  • Test file: a check file that lists what to verify, like "Are all 5 to-dos visible?"
  • Whether the build succeeded: whether the preparation step (build) from Chapter 4 finished without errors
  • Linter (linter): a tool like a spell checker for code
  • Output comparison script: a short program (script) that compares the result with a correct answer prepared in advance
  • Browser screen: the actual screen compared side by side with a mockup

The to-do board is a web page with no build, so you can start with test files and the browser screen.

They even say that if you have a check like that, the single most useful line in CLAUDE.md is the command that runs it.[5]

The easiest way is to write it in your prompt. It works right away today with no setup.[6]

After fixing the to-do board, check the verification criteria in SPEC.md one by one, and keep going until they all pass.

In the desktop app, Claude can start a dev server (a small program that previews the web page you made only on your own computer) and open it in the Browser pane inside the app to verify its own changes. By default, it checks automatically after every edit.[7] This is a great fit for the to-do board, which is a web page.

When asking for tests, be specific about what behavior you want to check.[8]

Weak promptBetter prompt
Write a test for meWrite a test that checks whether all 5 to-do items from the meeting notes appear on the screen and whether the due dates are in a date format

Source: Example from this guide (tip from official docs)[8:1]

Quick check

If you already have a verification check, what do the official docs say is the single most useful line in CLAUDE.md?

Getting Evidence ​

Whichever check you use, ask for evidence. That means the command it ran and its output, or a screen.[9] Hearing "everything passed" tells you almost nothing, and reading the output is faster than running the check again yourself.[9:1]

Show me the exact check command you just ran and its output. Also tell me how many passed and how many failed.

Also verify that the check actually checks. A check that doesn't fail when you break something on purpose is a decoration, not a check. For example, delete one to-do item, run the check, and see if it fails.

Quick check

How does this guide recommend responding when Claude says, "All tests passed"?

Automatically on Every Push — GitHub Actions ​

You can set things up so a person doesn't have to ask for a check every time. GitHub Actions is a GitHub feature that runs builds, tests, and deployments automatically. You can make it run tests every time you push a change.[10]

In public repositories, you can use the standard runners provided by GitHub (GitHub's computers that run checks for you) for free.[11]

You don't need to have all the automation in place from day one. At first, writing it in your prompt and checking in the browser as shown above is plenty. If you want to use it later, you can ask Claude to create the configuration file (a file that says when to run what) for you.

Learn a bit more (click to expand)
  • You define what to do in a YAML file (a configuration file) placed in the .github/workflows folder of your repository.[12]
  • The habit of committing often and checking often is called continuous integration (CI). It helps you catch errors early.[13]
  • GitHub shows the check results on the PR screen. A PR is a proposal asking to merge the changes on a branch, covered in Chapter 6. You can see right away whether the changes in your branch introduced an error.[13:1]

Quick check

Which statement about GitHub Actions is true?

Try It Yourself ​

  1. On the first-board branch from Chapter 4, ask Claude to create a check that tests the verification criteria in SPEC.md.
  2. Ask it to run the check and show you the exact command it ran and its output.
  3. Delete one to-do item on purpose and run the check again to see if it fails. Once you confirm, undo the change.
  4. Open the to-do board in the app's Browser pane and count the to-do items yourself.
  5. Add the check command as a single line in CLAUDE.md.

Next step: In Chapter 6, you will open a PR with your changes so far and get a review.

Summary ​

  • AI stops when the work looks done. If you give it a check that answers pass or fail, it fixes and re-checks on its own.
  • A check can be a test, a build, a comparison script, a browser screen, or anything else Claude can read the result from.
  • Instead of hearing "everything passed," get evidence in the form of the command and its output. Break something on purpose to see if the check actually fails.
  • GitHub Actions runs checks automatically every time you push. Standard runners are free in public repositories.

Glossary ​

TermOne-line meaning
TestAn automated check that verifies whether the result matches what you expect
CIThe habit of merging often and running automated checks often (continuous integration)
GitHub ActionsA feature that automatically runs set tasks every time you push
YAMLA text format used for configuring automated tasks

Finished this chapter?

Progress is saved only in this browser. See your progress on the full table of contents.

Next chapter: Chapter 6. PRs and Reviews

References (13)
  1. Claude Code official docs, "Best practices for Claude Code". "Claude stops when the work looks done. If it has nothing to run that tells it whether the work actually is done, "looks done" is all it has to go on." code.claude.com (checked on 2026-11-01) ↩︎

  2. Claude Code official docs, "Best practices for Claude Code". "In practice that makes you the test suite, and every mistake sits there until you happen to notice it." code.claude.com (checked on 2026-11-01) ↩︎

  3. Claude Code official docs, "Best practices for Claude Code". "If you give it something that comes back pass or fail, Claude can close that loop itself." code.claude.com (checked on 2026-11-01) ↩︎

  4. Claude Code official docs, "Best practices for Claude Code". "The check can be almost anything, as long as Claude can read the result:" / "A test file" / "A build's exit code" / "A linter" / "A script that diffs output against a fixture" code.claude.com (checked on 2026-11-01) ↩︎

  5. Claude Code official docs, "Best practices for Claude Code". "If your repo already has one of these, the single most useful line in your CLAUDE.md is the command that runs it." code.claude.com (checked on 2026-11-01) ↩︎

  6. Claude Code official docs, "Best practices for Claude Code". "In the prompt: run the auth tests after, and keep going until they pass. Claude decides for itself when it's satisfied." code.claude.com (checked on 2026-11-01) ↩︎

  7. Claude Code official docs, "Desktop application". "Claude can start a dev server and open it in the Browser pane to verify its changes." / "By default, Claude auto-verifies changes after every edit." code.claude.com (checked on 2026-11-01) ↩︎

  8. Claude Code official docs, "Common workflows". "When asking for tests, be specific about what behavior you want to verify." code.claude.com (checked on 2026-11-01) ↩︎

  9. Claude Code official docs, "Best practices for Claude Code". "Whichever option you use, ask Claude for evidence: the command it ran and its output, or the screenshot." / "reading the output is faster than rerunning the check yourself." code.claude.com (checked on 2026-11-01) ↩︎

  10. GitHub official docs, "Quickstart for GitHub Actions". "GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline." / "You can create workflows that run tests whenever you push a change to your repository, or that deploy merged pull requests to production." docs.github.com (checked on 2026-11-01) ↩︎

  11. GitHub official docs, "Billing and usage". "GitHub Actions usage is free for standard GitHub-hosted runners in public repositories, and for self-hosted runners." docs.github.com (checked on 2026-11-01) ↩︎

  12. GitHub official docs, "Understanding GitHub Actions". "Workflows are defined in the .github/workflows directory in a repository." docs.github.com (checked on 2026-11-01) ↩︎

  13. GitHub official docs, "Continuous integration". "Committing code more often detects errors sooner and reduces the amount of code a developer needs to debug when finding the source of an error." / "GitHub runs your CI tests and provides the results of each test in the pull request, so you can see whether the change in your branch introduces an error." docs.github.com (checked on 2026-11-01) ↩︎