The Claude Code docs say stop writing IMPORTANT. My CLAUDE.md had MUST in caps.
A few weeks ago I wrote about every file I use to stop being Claude Code's checker: my CLAUDE.md, my permission settings, a guard hook, and how I hand off work. All of it grew out of mistakes, one line at a time. This w
A few weeks ago I wrote about every file I use to stop being Claude Code's checker: my CLAUDE.md, my permission settings, a guard hook, and how I hand off work. All of it grew out of mistakes, one line at a time.
This week I read Anthropic's own "Best practices for Claude Code" page and lined it up against my setup. Most of it agreed with what I'd landed on. One section told me something I was doing is outdated.
Two kinds of instructions
The page starts by splitting every instruction into two kinds.
Non-deterministic: Claude reads it and decides. Your prompt, CLAUDE.md, skills. In the docs' words, it usually follows them, but "there's no guarantee that it'll follow your instructions."
Deterministic: Claude Code, the harness, executes it every time. Hooks, deny rules, managed settings. The model's opinion doesn't matter.
I had already written that CLAUDE.md is a request and settings.json is a lock. So far, so good.
Then this tip:
If you keep adding emphasis to a
CLAUDE.mdline and Claude still misses it, that's a sign the line belongs in a hook.
The "What you can stop doing" table
Near the end there's a table of advice that used to be good and isn't anymore. One row:
Add IMPORTANT or ALL CAPS to instructions Claude keeps missing
The reason given: current models follow a plainly worded line, and piling on emphasis mostly makes Claude over-apply the rule. If the rule can't bend, make it a hook or a deny rule. If the line is getting lost, the file needs to be shorter.
My CLAUDE.md for my caching plugin has one block marked up exactly like that. When it describes building the Pro zip, the part about excluding the license-issuing tools is marked "MUST exclude," with a warning sign. If those tools shipped, anyone could mint license keys. It's the line with the highest stakes in the whole file.
By the docs' logic, the size of the letters is the wrong tool. A rule with zero exceptions doesn't belong in a file the model is allowed to judge.
What the docs suggest instead
I already had a check for that zip. After building it, the agent runs a command that lists the archive and greps for anything that must not be there. "Must be empty" means pass.
That's a check Claude is asked to run. The docs describe a stronger version: a Stop hook. It runs your script whenever Claude tries to end its turn, and if the script exits with code 2, Claude is sent back to work with the script's stderr as the reason.
The docs' example is a typecheck:
{
"hooks": {
"Stop": [
{
"hooks": [
{ "type": "command", "command": "pnpm tsc --noEmit 1>&2 || exit 2" }
]
}
]
}
}
The same shape works for any "must be empty" check. One caveat from the docs: if the hook blocks eight stops in a row with no tool call in between, Claude Code overrides it and ends the turn anyway. It won't loop forever.
The other things I was missing
Lining the page up against my setup turned up a few more gaps.
Keep CLAUDE.md short. Every line costs a little attention on every task. The memory guide recommends staying under 200 lines. Mine is around 250. The docs' test for each line: could Claude find this by reading the code, and would it actually go look? If both are yes, cut it. Rules that only matter for some files can go in .claude/rules/ with a paths: filter. Procedures can go in skills.
Keep the enforced set small. Every hook and deny rule will sometimes fire when it shouldn't, and each one needs maintenance. "If you ever find yourself at forty of them, most are probably preferences."
Tell reviewers to skip style. When a fresh agent reviews a diff, the docs' example prompt ends with "skip style," and the docs warn not to drop it: "A reviewer that's asked to find problems will always find something." Fix every finding and you get abstraction layers and tests for cases that can't happen.
Cap unattended runs. Before leaving a run alone, ask what stops it. --max-turns and --max-budget-usd exist for exactly that. My old setup had nothing for this.
What matched
Not everything was outdated. These lined up with what I'd built by trial and error:
- Separate requests (CLAUDE.md) from locks (deny rules, hooks)
- Give the agent a pass/fail check along with the task
- Ask for evidence: the command it ran and its output, not "all tests pass"
- Get a fresh pair of eyes that didn't write the code
One thing I'd added that the docs don't mention: in my end-of-task report format, there's a field for "what I did not check." The docs ask for evidence of what was checked. That field asks for the evidence that's missing.
One line from the end of the page
If any other advice on this page ever starts to feel like busywork, that's probably a sign it belongs in this table too.
The page treats its own advice as temporary. Models change, and so does what's worth writing down for them. That includes the MUST in my CLAUDE.md.
Source: Anthropic, "Best practices for Claude Code," https://code.claude.com/docs/en/best-practices (read November 2026)
Disclaimer: The CLAUDE.md details in this post are from my own project. English isn't my first language, so I use an AI assistant to help draft and edit the writing.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.