Claude Code over-engineers simple changes: how to keep it small
Anthropic's own prompting guide says Claude models can over-engineer by creating extra files, adding unnecessary abstractions, or building in flexibility that was not requested. The fix it gives is a plain instruction: only make changes that are directly requested or clearly necessary. Put that in CLAUDE.md and ask for a plan before code.
The wording that works
# Scope
- Avoid over-engineering. Only make changes that are directly requested or clearly necessary.
- Don't create helpers, utilities, or abstractions for one-time operations.
- The right amount of complexity is the minimum needed for the current task.The three lines are quoted from Anthropic's prompting best practices. They work because each one is something the agent can check its own diff against.
Other fixes
- Start in plan mode (Shift+Tab, or claude --permission-mode plan). Plan mode researches and proposes without editing; cut the plan down before you approve it.
- Describe the size of the change you expect: "one function, no new files".
- Review the diff before you accept it. If a new file or option appears that you did not ask for, say so and ask for the smaller version.
- Keep each task small. A request that touches one module leaves less room for a framework to grow around it.
Signs to look for in the diff
- New files for a change that fits in an existing one.
- A helper, wrapper or base class used exactly once.
- Options, flags or config for cases nobody described.
- Tests and docs for code paths that the task did not add.
Each of these maps to the tendency Anthropic describes: extra files, unnecessary abstractions, and flexibility that was not requested. Point at the specific one when you ask for a smaller version.
When a skill or vault helps, and when it does not
Helps
- A short skill for a task you repeat ("add an API route the way this repo does it") shows the expected size by example.
- A vault with your house conventions gives the agent your patterns to follow instead of inventing new ones.
Does not help
- A long, generic "best practices" skill can make it worse by inviting extra structure.
- If the real problem is an unclear task, no skill fixes it; narrow the request.