Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyzes the target code, identifies improvement opportunities, plans a safe refactoring sequence, executes it, and verifies no behavior changes. Runs tests before and after every transformation.
.claude/skills/miosa-osa-refactor/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-16 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 827% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-03 | ✓→✗ | ▼ Worse | -83% | 0% |
| case-14 | ✓→✗ | ▼ Worse | -86% | 0% |
> Restructure code for clarity and maintainability without changing behavior.
/refactor <target> [--strategy <strategy>] [--safe]Analyzes the target code, identifies improvement opportunities, plans a safe refactoring sequence, executes it, and verifies no behavior changes. Runs tests before and after every transformation.
Strategies: extract, rename, decompose, simplify, decouple, auto (detect best).
bash# Auto-detect and refactor /refactor lib/optimal_engine/intake.ex # Extract functions from a long module /refactor lib/app.ex --strategy extract # Safe mode: smaller steps, test after every change /refactor lib/complex_module.ex --safe
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-16 | fail→pass | 12,208 | 8,852 | -27% | 1 | 1 | 0% | 1,786 | 1,838 | +3% | 0 | 0 | — |
case-01 | fail→fail | 4,137 | 5,634 | +36% | 1 | 1 | 0% | 181 | 651 | +260% | 0 | 0 | — |
case-02 | fail→fail | 27,073 | 4,737 | -83% | 1 | 1 | 0% | 4,255 | 536 | -87% | 0 | 0 | — |
case-03 | pass→fail | 24,615 | 6,444 | -74% | 1 | 1 | 0% | 4,256 | 736 | -83% | 0 | 0 | — |
case-04 | fail→pass | 2,856 | 14,905 | +422% | 1 | 1 | 0% | 283 | 2,623 | +827% | 0 | 0 | — |
case-05 | pass→pass | 28,079 | 17,860 | -36% | 1 | 1 | 0% | 4,886 | 3,962 | -19% | 0 | 0 | — |
case-06 | fail→fail | 3,601 | 3,716 | +3% | 1 | 1 | 0% | 553 | 611 | +10% | 0 | 0 | — |
case-07 | fail→fail | 4,624 | 23,153 | +401% | 1 | 1 | 0% | 702 | 495 | -29% | 0 | 0 | — |
case-08 | fail→fail | 10,581 | 4,787 | -55% | 1 | 1 | 0% | 2,049 | 470 | -77% | 0 | 0 | — |
case-09 | fail→fail | 6,464 | 6,088 | -6% | 1 | 1 | 0% | 725 | 602 | -17% | 0 | 0 | — |
case-10 | fail→fail | 17,600 | 5,115 | -71% | 1 | 1 | 0% | 2,817 | 460 | -84% | 0 | 0 | — |
case-11 | fail→fail | 22,641 | 5,082 | -78% | 1 | 1 | 0% | 4,785 | 494 | -90% | 0 | 0 | — |
case-12 | fail→fail | 5,221 | 5,507 | +5% | 1 | 1 | 0% | 246 | 594 | +141% | 0 | 0 | — |
case-13 | fail→fail | 15,422 | 6,436 | -58% | 1 | 1 | 0% | 2,449 | 766 | -69% | 0 | 0 | — |
case-14 | pass→fail | 25,000 | 5,655 | -77% | 1 | 1 | 0% | 3,663 | 500 | -86% | 0 | 0 | — |
case-15 | fail→pass | 20,622 | 15,895 | -23% | 1 | 1 | 0% | 4,410 | 3,750 | -15% | 0 | 0 | — |
case-17 | fail→fail | 6,540 | 5,621 | -14% | 1 | 1 | 0% | 259 | 650 | +151% | 0 | 0 | — |
case-18 | fail→fail | 4,177 | 4,286 | +3% | 1 | 1 | 0% | 691 | 855 | +24% | 0 | 0 | — |
case-19 | fail→fail | 5,714 | 4,144 | -27% | 1 | 1 | 0% | 194 | 710 | +266% | 0 | 0 | — |
case-20 | fail→fail | 17,938 | 5,544 | -69% | 1 | 1 | 0% | 3,426 | 461 | -87% | 0 | 0 | — |
case-21 | fail→fail | 21,065 | 5,993 | -72% | 1 | 1 | 0% | 2,793 | 571 | -80% | 0 | 0 | — |
case-22 | fail→fail | 3,335 | 5,169 | +55% | 1 | 1 | 0% | 127 | 450 | +254% | 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 7 counted toward the lift figure. The other 15 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 +5 percentage points is the difference between those two pass rates over the 7 comparable cases. 4 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.