Code cleanup planner
Point it at messy code. Get the problem spots named and cleaned up with proven patterns.
Code cleanup planner is a free AI skill for the job "Test and fix code". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · MIT licence · Made by Burhan Sebin
Made by Burhan Sebin. See the original on GitHub; we copied it as it is, with its licence.
What it does
Messy code gets a short list of named problems and a safe order for fixing them. The code ends up easier to read and change, and it still does the same thing. It scans for long functions, deep nesting, copied logic, magic numbers, dead code and bloated parameter lists, and says where each one is and why it hurts. Each problem gets a matching move, such as extract a function, rename, simplify a condition or name a constant. The moves are put in a sequence of small steps, applied one at a time. Tests run after each step, and it writes simple tests first if none exist.
You give it
- The code to clean up
- Your test command (optional)
- Areas to leave alone (optional)
You get
- A list of code problems with locations
- A matching fix for each
- A safe order of steps
- Tests run after each change
Use it when
- A function has grown to three hundred lines and nobody wants to touch it.
- You inherited code with copied blocks all over.
- You want cleanup done without changing behavior.
- You need a plan to tidy a file before adding a feature.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can run code and read your project files.