refactoring-analysis

Detect code smells and map them to Fowler-style refactoring techniques.

Updated May 15, 2026
One-click install
npx skills add https://github.com/JBonfim/skill-developer --skill refactoring-analysis-jbonfim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring-analysis
Source: https://github.com/JBonfim/skill-developer/tree/main/.agents/skills/refactoring-analysis
Command: npx skills add https://github.com/JBonfim/skill-developer --skill refactoring-analysis-jbonfim

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you identify maintainability issues in an existing codebase and turn them into a clear, prioritized refactoring plan.

Core Features & Use Cases

  • Code smell detection (Martin Fowler catalog): Detects common smell categories such as bloaters, change preventers, dispensables, couplers, conditional complexity, and DRY violations.
  • Actionable, structured refactoring output: Produces a prioritized report with severity tiers (P0–P3) and concrete refactoring recommendations.
  • Coupling and cohesion assessment: Flags risky modules by analyzing afferent/efferent coupling, circular dependencies, and mixed responsibilities.
  • DRY opportunity extraction guidance: Finds duplicated clusters, magic values/strings, and repeated parameter patterns to drive extraction work.
  • Optional SOLID/DDD guidance: Applies SOLID checks only when the target project shows meaningful domain/layered architecture signals.

Quick Start

Use the refactoring-analysis skill to audit the directory src and produce a prioritized refactoring report with actionable fixes saved under docs/_refacs/.

Frequently Asked Questions about refactoring-analysis

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

FAQPage Schema
How do I find code smells and plan refactoring in my codebase?

Code smell detection identifies maintainability issues like bloaters, change preventers, and DRY violations, then maps them to Fowler-style refactoring techniques to produce a prioritized report with severity tiers and before/after refactoring sketches.

What is the best way to assess coupling and cohesion before a refactor?

Assessing coupling and cohesion flags risky modules by analyzing afferent/efferent coupling, circular dependencies, and mixed responsibilities to target maintainability problems across directory or module boundaries.

How do I generate a prioritized refactoring report with severity tiers?

Generating a prioritized refactoring report involves detecting code smells and assigning severity tiers from P0 to P3, providing precise file-and-line findings and concrete refactoring recommendations.

When do I need SOLID or DDD evaluation during an architectural health review?

SOLID or DDD evaluation is needed when the target project shows meaningful domain or layered architecture signals, applying checks during refactoring sprints or pre-refactor audits.

Can I use static analysis to find DRY violations and duplicated clusters?

Static analysis can find DRY violations by extracting duplicated clusters, magic values/strings, and repeated parameter patterns to guide extraction work and eliminate dispensables.

What are the limitations of automated code smell detection for refactoring sprints?

Automated code smell detection focuses on structural maintainability problems and may not capture contextual business logic flaws, meaning complex architectural redesigns require manual evaluation beyond static analysis.