refactoring-analysis

Analyze codebases for refactoring opportunities and structural code smells.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps analyze codebases for refactoring opportunities so teams can reduce complexity, lower change risk, and plan safer improvements.

Core Features & Use Cases

  • Code Smell Detection: Finds bloaters, dispensables, couplers, conditional complexity, and DRY violations.
  • Refactoring Guidance: Maps each finding to Fowler-style techniques with before/after sketches.
  • Report Generation: Creates a prioritized refactoring report with exact file-line references and saves it to docs/_refacs/.
  • Use Case: Use it when preparing a refactoring sprint, reviewing module health, or auditing a legacy feature for cleanup.

Quick Start

Ask the refactoring-analysis skill to review the specified codebase area and produce a prioritized refactoring report.

Frequently Asked Questions about refactoring-analysis

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

FAQPage Schema
How do I find refactoring opportunities in a legacy codebase?

To find refactoring opportunities in a legacy codebase, analyze the targeted modules to identify structural code smells, coupling issues, and DRY violations. This process detects bloaters and couplers, mapping each finding to recommended Fowler refactorings with precise file-line references.

What are common code smells detected during a maintainability audit?

Common code smells detected during a maintainability audit include bloaters, dispensables, couplers, conditional complexity, and DRY violations. Identifying these structural issues helps reduce complexity and lower change risk when planning safer architectural improvements.

How do I generate a prioritized refactoring report for my project?

Generate a prioritized refactoring report by analyzing your project for code smells and outputting the findings to docs/_refacs/. The report includes exact file-line references, coupling assessments, and before/after sketches mapping to Fowler-style techniques for actionable guidance.

Can I analyze specific modules instead of an entire project for code smells?

Yes, you can analyze specific modules instead of an entire project for code smells. The analysis applies to targeted modules, individual features, or the whole codebase, making it flexible for localized code quality audits and module health reviews.

What is the best way to plan a refactoring sprint for legacy code?

The best way to plan a refactoring sprint for legacy code is to run an architectural health review that identifies structural code smells and coupling issues. This produces a prioritized findings report with recommended Fowler refactorings to guide safer improvements.

Does refactoring analysis provide specific guidance on how to fix code smells?

Refactoring analysis provides specific guidance on fixing code smells by mapping each finding to Fowler-style techniques. It includes before/after sketches and DRY assessments to help teams understand the exact structural changes needed to reduce complexity.