refactoring-code

Detect code smells and apply Martin Fowler's refactoring patterns across files.

5|1|Updated Sep 6, 2009
One-click install
npx skills add https://github.com/bnadlerjr/dotfiles --skill refactoring-code-bnadlerjr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring-code
Source: https://github.com/bnadlerjr/dotfiles/tree/main/claude/skills/refactoring-code
Command: npx skills add https://github.com/bnadlerjr/dotfiles --skill refactoring-code-bnadlerjr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Identifies code smells and applies Martin Fowler's refactoring patterns to improve code structure and reduce technical debt.

Core Features & Use Cases

  • Detect code smells across a codebase using Fowler's taxonomy.
  • Apply common refactorings (Extract Function, Inline Function, Decompose Conditional, Introduce Parameter Object) to improve readability and maintainability.
  • Guide workflows for incremental debt reduction (TDD Refactoring, Litter-Pickup, Comprehension, Preparatory, Planned, Long-Term).

Quick Start

Run /refactoring on the current file or selection to begin analysis.

Frequently Asked Questions about refactoring-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify code smells in a codebase?

Refactor code safely using test-driven development by following structured workflows that emphasize testing, verification, and incremental commits. This approach ensures safe transformations while applying patterns like Extract Function or Introduce Parameter Object.

What is the best way to reduce technical debt across multiple files?

The best way to reduce technical debt across multiple files is through coordinated refactoring workflows like Litter-Pickup, Planned, and Long-Term debt reduction. These approaches guide incremental and safe transformations.

Can I apply Martin Fowler refactoring patterns like Decompose Conditional to improve readability?

You can apply Martin Fowler refactoring patterns like Decompose Conditional, Extract Function, and Inline Function to improve code readability. These transformations target specific code smells to enhance overall structure.

Do I need existing tests to start remediating code smells?

Existing tests are strongly recommended before remediating code smells, as the refactoring process enforces structured workflows that emphasize testing and verification to ensure safe, incremental commits.