mcpField
R
refactoring-analysis

refactoring-analysis

github.com/pedronauckTesting & quality644410 installsUpdated 1w ago
Repository

About refactoring-analysis

Refactoring Analysis is a code-review skill for developers seeking lower maintenance costs without changing behavior. It ties code smells to source evidence and concrete improvements, then ranks findings by impact and risk.

Key features

  1. 01Identify evidenced code smells
  2. 02Trace ownership, coupling, and call sites
  3. 03Rank by impact, frequency, risk, and effort
  4. 04Produce refactoring analysis reports

Use cases

  1. 01Review a codebase and prioritize refactoring
  2. 02Assess maintenance impact of specific changes
  3. 03Plan refactoring while preserving compatibility

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pedronauck/skills --skill refactoring-analysis

After installing, type/refactoring-analysisin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
refactoring-report-template.md
checklists/
analysis-checklist.md
references/
code-smells-catalog.md
refactoring-techniques.md
solid-ddd-context.md
scripts/
validate-metadata.py

Details

From the project README

Refactoring Analysis

Find changes that reduce demonstrated maintenance cost while preserving behavior. Name the code smell, source evidence, and concrete improvement; a textbook category without a practical consequence is not a finding.

  1. Resolve the scope from the request and active context. For a broad request, map the codebase and prioritize dependencies/hotspots; do not stop for confirmation merely because it exceeds 50 files. Disclose sampled or uninspected areas.
  2. Read the relevant sections of references/code-smells-catalog.md and references/refactoring-techniques.md for the candidates found. Catalog thresholds are signals, not mandatory edits or a requirement to produce findings in every category.
  3. Trace ownership, coupling, call sites, and public boundaries. Consult references/solid-ddd-context.md only for a domain-model question; ordinary code does not need a SOLID pass.
  4. Rank confirmed opportunities by user/maintenance impact, frequency, risk, and effort. For the highest-impact items, describe the before/after behavior and owning verification. Reuse existing coverage; missing tests do not automatically require a new suite at every layer.
  5. A requested report defaults to docs/_refacs/<YYYYMMDD>-<slug>.md. Adapt assets/refactoring-report-template.md; a narrow request can use a concise response. Check material citations and reasoning with checklists/analysis-checklist.md as applicable.
  6. If the user requested an audit only, report findings. If they already authorized refactoring, continue the selected work without asking again. Preserve published compatibility and unrelated changes.

Comments

Markdown supported