Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Produces a refactor plan filed as a GitHub issue, with evidence checked against code, frozen behaviour, and small reviewable commits.
86% 100%+14 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 19 of 22 without it.
3 of 3 safety checks passed
Not used yet
A refactor changes the structure of code without changing what it does, and it goes wrong in predictable ways: the goal is vague, behaviour shifts unnoticed, or the work lands as one unreviewable diff. This skill prevents all three before any code moves. It turns a developer's "this module is a mess" into a written request that reviewers can approve or reject: evidence for the problem, the chosen approach and the ones rejected, the behaviour that is frozen, the tests that guard it, and an ordered list of commits small enough to review and revert one at a time. The result is filed as a GitHub issue.
Ask in one message, and skip what the user has already said:
Read the area before believing either the complaint or the proposed cure. Collect numbers the issue can cite:
wc -l src/orders/order-service.ts
grep -rl "order-service" src --exclude='*.test.ts' | wc -l # files that depend on it
git log --since="12 months ago" --format= --name-only -- src/orders \
| grep . | sort | uniq -c | sort -rn | head -5 # most-changed files
npx vitest run src/orders --coverage # the project's own test command
Note who calls the code, what it calls, where state is shared, and which behaviour is covered by tests. If the evidence does not support the complaint (the file is large but rarely changes and rarely breaks), say so; "leave it alone" is a valid outcome.
Lay out at least three, with what each costs and what it leaves unsolved: do nothing; the smallest change that removes the stated pain; the structural change the user proposed; a rewrite, if anyone is considering one. Recommend one. Prefer the option that removes the pain soonest and can be stopped halfway with the code still better than before.
Write down what is in scope, what is explicitly out, and the observable behaviour that must be identical before and after: responses, persisted data, emitted events, error messages others depend on, timing budgets. A refactor ships no behaviour change. Bugs found along the way are recorded and fixed in separate commits or separate issues, so that a reviewer can trust that a structural commit is only structural.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus popular skills in the same category.