Stop putting rules in CLAUDE.md: use Claude Code hooks for deterministic tasks
Pretend_Sell6592 · reddit · 2026-09-07
A developer shares a workflow realization: rules like "run the formatter after edits" or "don't touch this file" were sitting in CLAUDE.md, relying on Claude to remember them. Claude Code's hooks can instead enforce these deterministically at session checkpoints.
- CLAUDE.md is for context Claude needs to understand
- Hooks are for things that must always happen: auto-format after edits, block changes to protected files, run checks before commands, or notify you when Claude is waiting
The takeaway: if a rule is deterministic, let the tooling enforce it instead of trusting the model to comply.
More from coding & agent
- Shopify design lead on AI-era workflow: designers are becoming full-stack editors — KlausCodes · 2026-10-26
- Drex for Search hits Nace API console, saving 397k tokens and 56.8% latency per query — testingcatalog · 2026-10-26
- Nace AI launches Drex for Search, cutting agent steps 62% and tokens 56% — testingcatalog · 2026-10-26
- Ultrametric open-sources Open Startup Repo to let AI agents run startup operations — garrytan · 2026-10-26
- MCP fault injection study: agent task scores drop 60% under realistic tool failures, scale doesn't help — dair_ai · 2026-10-26
- General agents burn ~140M tokens/month on LinkedIn outreach; scripts do it 60x cheaper — ChrisHarpon2 · 2026-10-26