← all plugins

Refactor Code Safely

curated by SkillMD · plugin · 9 skills

Restructure code while preserving behavior: confirm tests are green, refactor in small steps, keep tests green, review, and commit.

Install the whole plugin (CLI)
npx skillmds add addyosmani/code-simplification npx skillmds add addyosmani/test-driven-development npx skillmds add obra/verification-before-completion npx skillmds add tinh2/dead-code npx skillmds add pwdev-solucoes/flow-quick npx skillmds add pwdev-solucoes/flow-simplify npx skillmds add sdiamante13/tidy npx skillmds add sdiamante13/sweep npx skillmds add sdiamante13/dry
⬇ Download

Skills in this plugin

  1. code-simplification · addyosmani
    Simplify code by reducing complexity while preserving exact behavior, making it easier to read, understand, modify, and debug.
    69.5k
    repo stars
  2. test-driven-development · addyosmani
    Drive development with tests by writing a failing test before implementing code, and reproduce bugs with tests before fixing them.
    69.5k
    repo stars
  3. verification-before-completion · obra
    Enforces running verification commands and confirming output before claiming work is complete, fixed, or passing, to prevent false success claims.
    247k
    repo stars
  4. dead-code · tinh2
    Finds and safely removes dead code across a codebase: unreachable paths, unused exports, functions, variables, CSS selectors, dependencies, env vars, and commented-out blocks. Builds an import graph, verifies no dynamic references, and runs build and tests after cleanup.
    13
    repo stars
  5. flow-quick · pwdev-solucoes bundle
    Delivers a small, bounded code change through inspection, a mini-plan, implementation, testing, review, and adversarial verification. Use for bug fixes, configuration changes, and features expected to touch no more than five files.
    2
    repo stars
  6. flow-simplify · pwdev-solucoes bundle
    Analyzes a completed phase diff for high-confidence behavior-preserving simplifications and applies only explicitly approved proposals, reducing duplication, dead code, needless complexity, or avoidable inefficiency.
    2
    repo stars
  7. tidy · sdiamante13 bundle
    Refactors production code with test coverage using a TDD workflow that applies approved refactorings one at a time, gates each on passing tests, and commits or reverts accordingly.
    7
    repo stars
  8. sweep · sdiamante13
    Reviews a codebase for structural smells and refactors them with provable safety, using micro commits and green-bar discipline.
    7
    repo stars
  9. dry · sdiamante13
    Refactors duplicated code by extracting helper methods, shared abstractions, or reusable structures, with automated testing and commits after each extraction.
    7
    repo stars