plan-refactor

Identify refactoring opportunities in Python, JavaScript, and Java codebases.

20|2|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/xdg/xdg-claude --skill plan-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plan-refactor
Source: https://github.com/xdg/xdg-claude/tree/main/refactoring-agent/skills/plan-refactor
Command: npx skills add https://github.com/xdg/xdg-claude --skill plan-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This ensures developers can systematically identify refactoring opportunities that improve maintainability and reduce technical debt across codebases.

Core Features & Use Cases

  • Detects common code smells and anti-patterns
  • Proposes concrete refactor options (e.g., extract method, rename, modularization) with rationale and expected impact
  • Supports planning during code reviews, refactor sprints, or onboarding to accelerate quality improvements

Quick Start

Provide the target codebase path or files and run the plan-refactor skill to receive prioritized refactoring recommendations.

Frequently Asked Questions about plan-refactor

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

FAQPage Schema
How do I identify code refactoring opportunities to reduce technical debt?

Identify code refactoring opportunities by analyzing codebases to detect common code smells and anti-patterns. This process returns a prioritized list of suggested refactorings with concrete rationale and estimated impact to systematically reduce technical debt.

Can I run static analysis to find code smells in Python and JavaScript codebases?

Yes, you can find code smells in Python and JavaScript codebases through static analysis. The process evaluates medium-to-large codebases, detecting anti-patterns and proposing concrete refactor options like extract method or modularization to improve maintainability.

What is the best way to plan refactoring sprints during code reviews?

The best way to plan refactoring sprints during code reviews is to generate a prioritized list of suggested refactorings. This provides expected impact and rationale for each code smell detected, accelerating quality improvements and guiding development workflows.

Does automated refactor planning work for onboarding new contributors to large codebases?

Automated refactor planning works for onboarding new contributors by evaluating large codebases and returning prioritized refactoring recommendations. This highlights areas with technical debt and design improvement opportunities, helping newcomers understand code quality issues.

What types of concrete refactor options are proposed for detected anti-patterns?

Concrete refactor options proposed for detected anti-patterns include extract method, rename, and modularization. Each refactoring suggestion includes specific rationale and estimated impact to guide design improvements and reduce technical debt.

When should I not use an automated tool for code refactoring recommendations?

You should not use automated code refactoring recommendations for small scripts or codebases outside the supported languages like Python, JavaScript, and Java. The process targets medium-to-large codebases where systematic technical debt reduction and design improvements are required.