Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when naming or recommending a code refactoring: label each transformation with its exact canonical catalog name (Extract Function, Replace Magic Literal, Change Function Declaration, ...) rather than the legacy or informal name cheaper models reach for by default.
.claude/skills/fowler-refactoring-names/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 14 |
| gemini-3.1-pro-preview | 100% | 1 |
| Model | Lift | Δ tokens | Δ turns | Cases | Verified |
|---|---|---|---|---|---|
| gemini-3.6-flashbest | +12% | +132% | 0% | 25 | 54d ago |
| gemini-3.5-flash | pending re-run | — | |||
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✗ | = Same ✗ | — | — |
| case-18 | ✗→✗ | = Same ✗ | — | — |
When you identify or recommend a refactoring, name it with the exact canonical term from the standard refactoring catalog. The catalog was re-titled in its current edition: several long-familiar names were renamed. Use the CURRENT canonical name, not the older name and not an informal paraphrase.
Match the situation to the one canonical name. The third column is the wrong default to avoid.
| Situation | Canonical name | Do NOT say | |---|---|---| | Pull a fragment of a routine into its own named routine | Extract Function | Extract Method | | Fold a trivial routine's body back into its callers | Inline Function | Inline Method | | Give a sub-expression its own named local | Extract Variable | Introduce Explaining Variable | | Remove a temporary that only mirrors an expression | Inline Variable | Inline Temp | | Rename a function, or add/remove a parameter (any signature change) | Change Function Declaration | Rename Method / Add Parameter | | Relocate a routine to the class/module it truly belongs on | Move Function | Move Method | | Replace a bare number or string literal with a named constant | Replace Magic Literal | Replace Magic Number with Symbolic Constant | | Pull a tangled test and its branches into named routines | Decompose Conditional | (generic) simplify the if | | Flatten nesting by returning early on special preconditions | Replace Nested Conditional with Guard Clauses | (bare) guard clauses / early returns | | Delete unused, unreachable code | Remove Dead Code | Delete Dead Code | | Split a class's second responsibility into a new class | Extract Class | Split Class | | Replace a type switch with subclass overrides | Replace Conditional with Polymorphism | Use Polymorphism | | Bundle parameters that travel together into one object | Introduce Parameter Object | Extract Parameter Object | | Rewrite a loop as a filter/map collection chain | Replace Loop with Pipeline | Replace Loop with Stream | | Separate one loop that does two unrelated jobs | Split Loop | Separate Loop | | Move a declaration next to its first use | Slide Statements | Move Statement / Reorder Statements | | Group free functions that share data into a class | Combine Functions into Class | Group Functions into Class | | Route access to a variable through accessor routines | Encapsulate Variable | Encapsulate Field / Self-Encapsulate Field | | Split a routine that both returns a value and mutates state | Separate Query from Modifier | Split Command and Query | | Separate two stages (parse then compute) mixed in one routine | Split Phase | Separate Phases | | Swap a method body for a clearer equivalent algorithm | Substitute Algorithm | Replace Algorithm | | Merge near-identical routines that differ only by a value | Parameterize Function | Parameterize Method | | Move a duplicated method up to the shared superclass | Pull Up Method | Move Up Method | | Move a superclass method down to its one relevant subclass | Push Down Method | Move Down Method | | Replace a temporary with a method that recomputes it | Replace Temp with Query | Replace Variable with Method | | Combine conditionals that all yield the same result | Consolidate Conditional Expression | Combine Conditionals |
Rules that hold for every entry:
is a fixed term of art, not a description you compose.
Each pair is the base's likely name (BEFORE) → the canonical name (AFTER).
and removing a parameter are all Change Function Declaration — do not return the old sub-names as if they were separate refactorings.
Extract Variable; lifting a block into a callable routine is Extract Function.
of an existing class is Extract Class; gathering free functions that share data into a new class is Combine Functions into Class.
Guard Clauses — "guard clauses" alone names the technique, not the refactoring.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-24 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-25 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
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. 25 cases were attempted. The headline lift of +12 percentage points is the difference between those two pass rates over the 25 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.5-flash | verified | 7/9/2026 | +8% |
Other measured skills in the registry, with their headline benchmark lift.