Agent skillsCLAUDE.md rule
Skill · CLAUDE.md rule

If It's Deterministic, Don't Make It Guess

A forcing function that sends exact-answer work to a script instead of the model's reasoning.

TypeCLAUDE.md rule

You ask the agent to count how many records match, or to reformat two hundred entries, or to total a column. It answers — confidently, in prose. It looks right. It's off by three, because a language model didn't count: it estimated, the way you'd estimate a jar of marbles from across the room.

There is a clean line between two kinds of work. One has a single correct answer a machine can compute: counting, parsing a fixed format, transforming data, arithmetic, lookups. The other needs judgement: what to build, how to word it, which trade-off to take. Models are extraordinary at the second and quietly unreliable at the first — so the rule routes each kind to the tool that is actually good at it:

Without the rule

"Count / total / reformat this" — answered in prose
Looks right, sounds certain
Off by three — and you trusted the number

With the rule

Writes a script for the exact-answer part
Runs it, shows the script and the output
The number is the number — not an estimate

Drop it into your CLAUDE.md. It won't slow down the work that genuinely needs reasoning — that's most of it. What it catches is the quiet failure: the confident wrong count, the missed row, the entry silently dropped in a reformat. The tell is structure. If the input has a consistent shape, the answer belongs to a parser, not a paragraph.

Paste into CLAUDE.md
## Deterministic work goes to code, not prose
When a task has exactly one correct answer a script can compute — counting, parsing a fixed format, transforming data, math, lookups — write and run a script instead of producing the answer by hand.
1. If the input has a consistent structure, reach for a parser, regex, or query — not free-form reasoning.
2. Show the script and its real output, not just the final number.
Reserve your reasoning for judgement, generation, and ambiguity — the work that has no single right answer.
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.