Claude Code · Workflow

The Claude Code prompts I use every day

Not tips. Actual prompts — the ones I type repeatedly because they work.

Before starting any task

Before you write any code, read [file] and [file].
Tell me what you understand about how this works.
Then tell me what you plan to change and why.

This stops Claude from writing code based on assumptions. The "tell me what you plan" step catches wrong approaches before any files are touched. Takes 30 seconds, saves 20 minutes.

When I want a small change to stay small

Make only the change I asked for.
Do not refactor anything you did not need to touch.
Do not fix other things you notice.
If you see something that should be fixed, tell me after — do not fix it now.

Without this, Claude will improve things. Some improvements are wrong. All of them need review. This prompt cuts the review surface to what you actually asked for.

When Claude is looping on an error

Stop trying to fix this.
Tell me: what do you think the root cause is?
What have you already tried and why didn't it work?
What information would tell you what's actually wrong?

This breaks the pattern-matching loop. Claude names the root cause in step one, which it had been routing around for three iterations. Then you can ask for one fix targeted at the actual problem.

When I don't trust the output

What parts of this change are most likely to cause problems?
What are you least confident about?
What edge cases did you not handle?

Claude usually knows what's sketchy. If you don't ask, it doesn't volunteer it. This is the fastest way to find out where to look closely.

When a task spans multiple sessions

Before we start: write a state file at tasks/current.md.
Include: what we're trying to accomplish, what done looks like,
what files are in scope, and what not to touch.
Update it after each major step.

The state file survives context resets. A new session can read it and continue. Without it, every new session starts from scratch.

When context is getting long

Summarize what we've done so far and what's still left.
Write it to tasks/current.md.
Then we'll continue in a fresh session.

At around 80% context, Claude's reasoning starts to degrade on complex tasks. Compact before it's a problem. The summary file lets you pick up exactly where you left off.

When I want to check tests actually test something

For each test you wrote: what would happen if the function
returned the wrong value? Would the test catch it?
If any test wouldn't catch a wrong return value, rewrite it.

Claude writes tests that pass. This is not the same as tests that catch bugs. This prompt forces it to verify that each test actually asserts something meaningful.

The Agent Prompt Playbook has 25 of these — prompts for the specific situations you hit repeatedly when using Claude Code seriously. $29.