/killall-craft:smell-to-refactoringfrom killall-craft
Reviewing a diff, or code that feels wrong without an obvious reason. Name each smell from Fowler's catalog, then apply the refactoring that removes it.
Ships in killall-craft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A smell is a named symptom; each has known refactorings. Name the smell before touching the code — the name picks the fix.
Done when: every smell found has a refactoring applied or a stated reason to leave it.
Yields to: surgical scope — smells outside the code under change are reported, not fixed.
| Smell | Refactorings |
|---|---|
| Mysterious Name | Change Function Declaration, Rename Variable, Rename Field |
| Duplicated Code | Extract Function, Slide Statements, Pull Up Method |
| Long Function | Extract Function, Decompose Conditional, Split Loop, Replace Temp with Query |
| Long Parameter List | Introduce Parameter Object, Preserve Whole Object, Remove Flag Argument |
| Global Data | Encapsulate Variable |
| Mutable Data | Encapsulate Variable, Split Variable, Separate Query from Modifier, Replace Derived Variable with Query |
| Divergent Change | Split Phase, Extract Class, Move Function |
| Shotgun Surgery | Move Function, Move Field, Combine Functions into Class |
| Feature Envy | Move Function, Extract Function |
| Data Clumps | Extract Class, Introduce Parameter Object |
| Primitive Obsession | Replace Primitive with Object (see parse-dont-validate) |
| Repeated Switches | Replace Conditional with Polymorphism |
| Loops | Replace Loop with Pipeline |
| Lazy Element | Inline Function, Inline Class |
| Speculative Generality | Remove Dead Code, Inline Function, Collapse Hierarchy |
| Temporary Field | Extract Class, Introduce Special Case |
| Message Chains | Hide Delegate, Move Function |
| Middle Man | Remove Middle Man, Inline Function |
| Insider Trading | Move Function, Move Field, Hide Delegate |
| Large Class | Extract Class, Extract Superclass |
| Alternative Classes with Different Interfaces | Change Function Declaration, Extract Superclass |
| Data Class | Encapsulate Record, Move Function |
| Refused Bequest | Replace Subclass with Delegate, Push Down Method |
| Comments | Extract Function, Change Function Declaration, Introduce Assertion |
In Rust and Go, read "class" as a struct with its methods, or a module.
Each refactoring's mechanics: https://refactoring.com/catalog/<camelCaseName>.html, for example
extractFunction.
In the wild:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub killallgit/killall-craft --plugin killall-craft4 skills in this plugin
/house-rulesHouse rules for writing, changing, or reviewing code — simplicity, deletion, naming, comments, tests, verification. Load before touching code./make-the-change-easyA change fights the existing code — it needs edits scattered across many places, a flag threaded through, or a special case wedged in. Refactor first so the change becomes one small edit, then make it./parse-dont-validateInput crosses a trust boundary — CLI args, HTTP bodies, files, env vars, config. Turn it into a type that cannot hold an invalid value.2 plugins ship this exact skill · first indexed Nov 10, 2026