Claude Code Over-Engineering: 4 Simple Rules to Fix
A LinkedIn post by Abdullah Ijaz.
Claude Code assumes things. Over-engineers everything. Touches code you didn’t ask it to. It’s driving me insane.
I rarely hype AI stuff online. But someone actually fixed this. With one file. The repo now has 165k+ stars.
The fix is a single CLAUDE.md file with 4 rules (from the karpathy-skills repo):
- Think before coding. Don’t assume, ask first. Claude now actually asks “did you mean X or Y?” instead of silently picking one and running with it.
- Simplicity first. The simplest solution that works.
- State assumptions / minimal code. Write the minimum that solves the problem, then stop.
- Verify before “done”. Don’t claim a fix works without testing it.
Discussion
The comments were sharp and divided:
- Yusuf Ertas: Claude adds way too many redundant try/except blocks, creating empty objects when the error should propagate.
- Safyan Yaqoob: It adds unnecessary comments nobody asked for, making code hard to read.
- Pavlo Khyzhniak: “The ‘done’ part hit home. Nothing is more frustrating than being told a bug is fixed and finding out five seconds later that nobody actually tested it.” But also a skeptic’s flaw: if these prompt packs are so effective, why hasn’t Anthropic put them in the system prompt? — because
CLAUDE.mdis for project-specific context. - Maciej Ciemborowicz: Pushed back on “simplest solution” — abstractions must be adequate to project size and change as it grows. (Shares his own agent-rules-books.)
- Recurring theme: the biggest gains come when the AI understands a specific codebase’s conventions and tradeoffs, not generic rules.