AI Blocks

Putting the blocks together

This is taking longer than expected.

Try againBrowse the library
AI Blocks · All skills by job · Minds · Mini tools · How it works · From a source · Apps

AI Blocks › Test and fix code

Code refactor planner

Give it messy code. Get named refactoring moves to apply in small safe steps, without changing what it does.

Code refactor 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 Wondel.ai

Made by Wondel.ai. See the original on GitHub; we copied it as it is, with its licence.

What it does

Messy code turns into a list of named moves you can apply one at a time, with tests passing after each. Nothing about what the code does should change. The rule is that refactoring is not rewriting. Each move is one small structural change: verify tests pass, change one thing, verify again. The skill looks for known code smells, then picks the matching move from a catalog, such as extracting a function, replacing a conditional with polymorphism or removing duplication. Quality is scored out of ten from eight quick checks, so you can see progress. Big all-at-once rewrites are avoided because you cannot tell what broke.

You give it

You get

Use it when

How to use it

  1. Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
  2. Ask for the job in your own words. Your AI opens the skill when it fits.

More for Test and fix code

Every test and fix code skill