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:
  1. 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.

  2. Focused tools with hooks enforce rules more reliably.

For example, I wouldn’t put this in my LLM’s instructions file:

“Don’t use any in TypeScript”

Instead, I do this:

  1. Create a lint rule that disallows any
  2. Configure my LLM to run the linter via a hook after changes.

Benefits:

  • I know any can’t slip through.
  • My context stays lean
  • My LLM quickly fixes its mistakes because the linter operates as a quality “guardrail”.

View original on X