Addy Osmani12 min readintermediate
Audit your Agent files
Summary
Agent configuration files (CLAUDE.md, AGENTS.md, skill packs) accumulate stale rules, inflating token usage and hurting performance. Regular audits—using Claude’s /doctor, pruning to <200 lines, and encoding hard constraints in hooks—restore lean, effective agents.
- Studies of 100 repos found 42% context bloat, 62% lint leakage, and 35% skill leakage in agent files.
- Claude 5 models removed >80% of the system prompt with no measurable loss, showing many instructions become obsolete.
- Personalized skill packs performed no better than generic ones in a 206‑session study; generic skills were more reliable.
- Run Claude’s /doctor periodically, archive old rules, and move essential constraints to hooks or permissions.
Anyone building or maintaining LLM‑powered coding agents should audit their prompt files to avoid token waste and maintain agent quality.
7/10

