refactor-smell

Solid

Use when code shows duplication, long functions, or confusing control flow and you want safe refactors that preserve behaviour.

AI & Automation 1 stars 0 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
10
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
39
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Refactor Smell ## When to use Invoke this skill when reviewing code that is hard to read, duplicated, or risky to change. ## Steps 1. Name the smell: duplication, long method, god class, primitive obsession, shotgun surgery. 2. Confirm there are tests; if not, add a characterization test first. 3. Apply the smallest safe transform (extract, rename, move, replace conditional). 4. Keep behaviour identical; verify with the test suite after each step. 5. Stop when the code is clear; do not gold-plate or rewrite working logic. ## Examples - "Refactor this 200-line function" - "Remove duplication between these two modules" ## References Refactor in small, committable steps with passing tests between each; never mix behavioural change with restructuring in one edit.

Details

Author
NSBen
Repository
NSBen/skillfoundry
Created
4 days ago
Last Updated
4 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category