Appearance
Text size
Typeface
Line spacing
5
Chapter 5 · 3 min

Asking well

A specific request saves a round of corrections, and a pass/fail check lets Claude find its own mistakes before you do.


Two things decide the result

Most of what separates a good session from a frustrating one comes down to two habits. Say precisely what you want, and give Claude a way to tell whether it got there. Everything else in prompting is detail around those two.

The reason is the same loop from the agent lessons. Claude acts, reads the result, and decides again. A vague request gives it nothing to aim at. A request with a check gives every step something to be corrected against.

Be specific

The guide's advice is plain: specific prompts save a round of corrections. Name the file, describe the symptom, and say what fixed looks like.

Compare two requests:

$ claude> fix the login bug# Which file, which symptom, how will anyone know it is fixed?> In src/auth/session.ts, logging in with a valid email returns 401 after the cookie refresh. Find why, fix it, and show me the failing test passing.# File, symptom, and the shape of done.

The second costs thirty more seconds to write and usually saves a whole turn.

Give context by pointing, not describing. Use @path to include a file, and paste screenshots with Ctrl+V, which gives you an [Image #N] chip to refer to by number. Pipe in logs directly: cat error.log | claude -p "what's going on here".

Check yourself

Which request gives Claude the most to work with?

Give it a way to verify

This is the most valuable habit. Give Claude a pass/fail check it can run itself: a test file, a build exit code, a linter, a fixture diff, or a screenshot to compare against.

Then ask for evidence, not a claim: the command that was run and its output. "Tests pass" is a sentence. The command and its printed result are a fact.

$ claude> Make the date test pass, then run pnpm tsc --noEmit and the whole test suite. Paste the commands and their output.✻ Edits src/format.ts✻ Runs pnpm tsc --noEmit: exit 0✻ Runs the test suite: 41 passed# You read two outputs instead of trusting one summary.

For things that tests and typechecks miss, /verify builds, runs and looks at the app. /code-review uses a fresh subagent that never saw your conversation, so it does not share the author's blind spots.

When you do not know the spec

If you cannot describe the change yet, do not guess. Use the interview pattern: ask Claude to interview you until it could write a spec, let it write SPEC.md, then build in a fresh session. The questions force the vague parts into words before any code exists.

Check yourself

What does asking for 'the command run and its output' protect you from?

Read further