Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Executes automated refactoring for specific files, directories, or semantic queries. This skill should be used when the user asks to refactor specific files or directories, simplify recently changed code, clean up dead code in a limited scope, or invokes "/refactor".
.claude/skills/fradser-refactor/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | -31% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-21 | ✓→✗ | ▼ Worse | 68% | 0% |
Execute automated refactoring for $ARGUMENTS using refactor:code-simplifier agent.
Goal: Ensure scope resolution is deterministic before launching the agent.
Actions:
git rev-parse --is-inside-work-tree and continue even if false when explicit paths are providedGoal: Identify files to refactor based on arguments or session context.
Actions:
git diff --name-only to find recently modified code filesCRITICAL: Never include node_modules/, .git/, dist/, build/, lock files, or compiled artifacts in refactoring scope — use Grep --glob exclusions to enforce.
See references/scope-determination.md for search strategies and edge cases.
Goal: Execute refactor:code-simplifier agent with aggressive mode enabled.
Actions:
refactor:code-simplifier agent with target scope and aggressive mode flagrefactor:best-practices skill and applies language-specific patternsSee references/agent-configuration.md for detailed Task parameters.
Goal: Report comprehensive summary of changes.
Actions:
git restore --worktree --staged <files>)See references/output-requirements.md for detailed summary format.
/refactor-project for project-wide scope| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→fail | 7,217 | 4,176 | -42% | 1 | 1 | 0% | 1,149 | 1,139 | -1% | 0 | 0 | — |
case-21 | pass→fail | 2,998 | 4,543 | +52% | 1 | 1 | 0% | 488 | 821 | +68% | 0 | 0 | — |
case-01 | fail→fail | 4,911 | 14,406 | +193% | 1 | 1 | 0% | 719 | 917 | +28% | 0 | 0 | — |
case-02 | fail→fail | 5,808 | 6,269 | +8% | 1 | 1 | 0% | 339 | 830 | +145% | 0 | 0 | — |
case-03 | fail→fail | 18,251 | 7,740 | -58% | 1 | 1 | 0% | 3,119 | 926 | -70% | 0 | 0 | — |
case-05 | pass→pass | 11,150 | 3,928 | -65% | 1 | 1 | 0% | 1,977 | 1,177 | -40% | 0 | 0 | — |
case-06 | pass→pass | 10,723 | 9,717 | -9% | 1 | 1 | 0% | 2,003 | 1,542 | -23% | 0 | 0 | — |
case-07 | pass→pass | 10,176 | 4,299 | -58% | 1 | 1 | 0% | 1,627 | 1,272 | -22% | 0 | 0 | — |
case-08 | fail→pass | 11,307 | 3,267 | -71% | 1 | 1 | 0% | 1,610 | 1,117 | -31% | 0 | 0 | — |
case-09 | pass→pass | 7,226 | 7,967 | +10% | 1 | 1 | 0% | 1,087 | 1,703 | +57% | 0 | 0 | — |
case-10 | pass→pass | 11,028 | 5,381 | -51% | 1 | 1 | 0% | 1,826 | 1,373 | -25% | 0 | 0 | — |
case-11 | fail→pass | 9,252 | 2,845 | -69% | 1 | 1 | 0% | 1,550 | 859 | -45% | 0 | 0 | — |
case-12 | fail→pass | 9,478 | 3,651 | -61% | 1 | 1 | 0% | 1,408 | 962 | -32% | 0 | 0 | — |
case-13 | pass→fail | 12,046 | 5,259 | -56% | 1 | 1 | 0% | 2,200 | 877 | -60% | 0 | 0 | — |
case-14 | pass→pass | 5,494 | 2,479 | -55% | 1 | 1 | 0% | 1,021 | 978 | -4% | 0 | 0 | — |
case-15 | fail→pass | 15,473 | 6,622 | -57% | 1 | 1 | 0% | 2,178 | 1,538 | -29% | 0 | 0 | — |
case-16 | pass→pass | 13,135 | 5,310 | -60% | 1 | 1 | 0% | 2,298 | 1,349 | -41% | 0 | 0 | — |
case-17 | pass→pass | 16,004 | 5,230 | -67% | 1 | 1 | 0% | 2,045 | 1,309 | -36% | 0 | 0 | — |
case-18 | pass→pass | 8,739 | 3,423 | -61% | 1 | 1 | 0% | 1,583 | 1,134 | -28% | 0 | 0 | — |
case-19 | pass→pass | 11,438 | 3,968 | -65% | 1 | 1 | 0% | 1,782 | 1,101 | -38% | 0 | 0 | — |
case-20 | fail→fail | 46,860 | 8,395 | -82% | 1 | 1 | 0% | 8,224 | 1,161 | -86% | 0 | 0 | — |
case-22 | fail→fail | 18,689 | 8,839 | -53% | 1 | 1 | 0% | 4,475 | 873 | -80% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 15 counted toward the lift figure. The other 7 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +9 percentage points is the difference between those two pass rates over the 15 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.