Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✓→✓ | = Same ✓ | 19% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 699% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 65% | 0% |
| case-08 | ✓→✓ | = Same ✓ | -4% | 0% |
| case-09 | ✓→✓ | = Same ✓ | 0% | 0% |
Clean up and simplify code after making changes.
Run this skill after completing a feature or fix to ensure the code is clean, readable, and maintainable.
with statements for resource managementenumerate() instead of manual indexingzip() for parallel iterationpathlib for file pathsruff format .ruff check --fix .pytestOptionally specify files or directories to simplify.
Usage:
/code-simplifier - Simplify recently changed files/code-simplifier src/module.py - Simplify specific file/code-simplifier src/ - Simplify entire directoryBefore:
pythonresult = [] for i in range(len(items)): if items[i].is_valid == True: result.append(items[i].value)
After:
pythonresult = [item.value for item in items if item.is_valid]
Before:
pythonif x != None: if y != None: if z != None: process(x, y, z)
After:
pythonif all(v is not None for v in (x, y, z)): process(x, y, z)
Other measured skills in the registry, with their headline benchmark lift.