refactor

Analyze codebases for structural weaknesses and generate prioritized refactoring plans.

4|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/alphaleonis/decaf-claude-config --skill refactor-alphaleonis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/alphaleonis/decaf-claude-config/tree/main/decaf-review/skills/refactor
Command: npx skills add https://github.com/alphaleonis/decaf-claude-config --skill refactor-alphaleonis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill identifies opportunities for structural improvement in code, generating a prioritized plan to enhance maintainability and reduce complexity.

Core Features & Use Cases

  • Code Analysis: Analyzes code for structural weaknesses and cross-file patterns.
  • Prioritized Refactoring Plan: Generates actionable, ranked recommendations for code changes.
  • Use Case: A developer needs to refactor a large, complex module. This Skill can quickly identify the most impactful areas for improvement, saving significant manual analysis time.

Quick Start

Run the refactor skill with the quick mode on the src/Services directory.

Frequently Asked Questions about refactor

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

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

Code analysis for refactoring identifies structural weaknesses across files, detecting code smells like duplicated logic, god functions, and scattered concerns to produce a prioritized improvement plan.

What is the best way to prioritize code quality improvements across multiple files?

The best way to prioritize code quality improvements is to consolidate cross-file pattern findings from multiple agents into a ranked, actionable refactoring plan that targets the most impactful structural changes first.

Can I analyze specific file paths and globs for code smells?

Yes, you can analyze specific file paths and globs for code smells using various scope resolutions, including targeted directory sampling or full project analysis, to detect structural issues like god functions and duplicated logic.

How do I generate a prioritized refactoring plan for a complex module?

You generate a prioritized refactoring plan by running structural analysis on the complex module, which evaluates cross-file patterns and ranks actionable recommendations to reduce complexity and save manual analysis time.

Does deep code analysis detect duplicated logic and god functions?

Yes, deep code analysis detects duplicated logic and god functions by evaluating structural improvement opportunities across the codebase, identifying specific code smells that degrade maintainability and increase complexity.

When should I use quick mode versus deep analysis for structural improvement?

Use quick mode for rapid identification of impactful structural improvement areas in specific directories, and use deep analysis for comprehensive cross-file pattern evaluation and consolidated findings across the entire project.