With agent instructions files like http://CLAUDE.md, it's tempting to add...
With agent instructions files like http://CLAUDE.md, it's tempting to add lots of detailed guidelines.
But, I only add to the instructions file as a last resort.
Why? Two reasons:
Instructions bloat context because they’re always in context. So, the more I add, the lower the signal of each entry, and the less context “headroom” I have for real work.
Focused tools with hooks enforce rules more reliably.
For example, I wouldn’t put this in my LLM’s instructions file:
“Don’t use
anyin TypeScript”Instead, I do this:
- Create a lint rule that disallows
any- Configure my LLM to run the linter via a hook after changes.
Benefits:
- I know
anycan’t slip through.- My context stays lean
- My LLM quickly fixes its mistakes because the linter operates as a quality “guardrail”.