Code duplication piles up after weeks of vibe coding
The fix
GitClear measured 4x more duplication in AI-assisted codebases. The model doesn't know your existing helpers exist unless you point at them. Two habits: (1) Keep a `CLAUDE.md` or `AGENTS.md` listing utilities and where to find them. (2) After every feature, ask the agent: "Did this duplicate logic from anywhere? Show me the closest existing helper." Even imperfect dedup beats the default behavior.
Prompt to paste
Before writing any new code for [feature], search the codebase for existing helpers, utilities, or components that already do part of this and list them with file paths. Then implement [feature] by reusing them. When you're done, tell me if you duplicated any logic and show the closest existing helper.