Keeping it healthy
Clean up a codebase that grew by accident
Months of AI-written code: dead files, the same logic three times, packages nobody uses.
- What you get
- The safe removals done and tested, and the uncertain ones listed for you.
- Paste it into
- Your AI tool, in your project
The prompt
This project has grown messy. Clean it up without changing what it does. Find: files, components, routes and functions nothing uses, the same logic written more than once, packages that are installed and never imported, leftover test and debug code, and commented-out blocks. Show me the list with evidence before removing anything. Prefer deleting to rewriting. Remove only what you're sure about, in small groups, and run the build and tests after each. For duplicates, keep one copy and point the others at it. Give me a separate list of things that looked unused and you weren't sure about, with the reason.
Use it
Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.
More in Keeping it healthy
Add the one test that matters most
There are no tests, and writing hundreds feels pointless.
Update your packages without breaking the app
Everything is a year out of date, and updating all at once breaks the build.
Hear about errors before your users tell you
The site was broken for two days and you found out from an email.
Turn a vague complaint into a bug you can fix
A user writes “it doesn’t work” and nothing else.