Agent skillsCLAUDE.md rule
Skill · CLAUDE.md rule

Plan First, Then Code

A forcing function that makes the agent show its approach — and stop — before touching code.

TypeCLAUDE.md rule

The agent's instinct is to start typing. You ask for a change and it is three files deep before you have said a word about direction. Often that is fine. But on anything real, it has quietly committed to an approach — and you only find out it chose wrong after a hundred lines already lean on it. Now the fix is expensive: unwinding, not redirecting.

The wrong moment to catch a wrong approach is after the code exists. The right moment is before the first line — when changing direction costs a sentence, not a rewrite. Here is what the gate buys you:

Without the rule

"Sure" — and it starts coding immediately
100 lines built on an unspoken assumption
Wrong direction — you unwind it, not redirect it

With the rule

States the plan: files, direction, unknowns
Stops — you steer in one sentence
Then it builds the right thing, once

Drop it into your CLAUDE.md. For a one-line edit it adds a sentence and gets out of the way; for real work it turns a wrong-direction rewrite into a ten-second course-correction. The trade is deliberate: a little latency up front to kill the most expensive kind of rework — where the code was clean, but built toward the wrong goal.

Paste into CLAUDE.md
## Plan before non-trivial changes
For any task beyond a one-line edit, before writing code:
1. State the approach: which files you will touch, the direction you will take, and why not the obvious alternatives.
2. Flag what you are unsure about or assuming.
3. STOP and wait for my go-ahead. Do not write code until I confirm.
Skip this only for trivial, single-line changes.
Prefer your agent install it?
Did this help?
Other skills
c
The author

Each story here wraps a lesson paid for in full.

craftagentsomeone building and learning at once

What are you building with agents? Want to trade notes, push back, or build something together — drop a line.

58pieces12clustersVI·ENbilingual

Get new pieces by email

Field notes on working with AI agents — occasional, no spam.