Code simplifier
Point it at code that works but is hard to read. Get a simpler version that behaves the same.
Code simplifier 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 Addy Osmani
Made by Addy Osmani. See the original on GitHub; we copied it as it is, with its licence.
What it does
Code that works but is hard to read becomes simpler and behaves exactly the same. The test is whether a new teammate would understand the new version faster. Shorter is not the goal. It looks for deep nesting, long functions, unclear names and duplication, then makes small changes: flatter conditions, clearer names, merged repeats. It does this after the feature works and tests pass, never before you understand the code. It skips code that is already clean or where the simpler version would be measurably slower. Tests run after changes to confirm nothing moved.
You give it
- The code to simplify
- Tests that prove it still works (optional)
- Any speed limits to respect (optional)
You get
- A simpler version of the code
- A list of what changed and why
- Confirmation behavior is unchanged
- Places left alone on purpose
Use it when
- A feature works but the code feels heavy.
- A reviewer flagged deeply nested logic.
- A merge left duplicate logic across files.
- Code written in a hurry needs tidying before others read it.
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.