refactor-expert

Generate analysis and implementation plans for safe, incremental code refactoring.

24|3|Updated Nov 25, 2025
One-click install
npx skills add https://github.com/nguyenthienthanh/aura-frog --skill refactor-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-expert
Source: https://github.com/nguyenthienthanh/aura-frog/tree/main/aura-frog/skills/refactor-expert
Command: npx skills add https://github.com/nguyenthienthanh/aura-frog --skill refactor-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Refactoring code can be risky and introduce new bugs if not done systematically, leading to instability and increased technical debt. This Skill provides expert guidance for safe, incremental refactoring that improves code quality without altering behavior, minimizing risk.

Core Features & Use Cases

  • Code Analysis & Planning: Generates detailed analysis documents for code smells and creates step-by-step implementation plans before refactoring.
  • Common Refactoring Patterns: Guides through proven patterns like "Extract Method," "Replace Conditional with Polymorphism," and "Simplify Conditional."
  • Safe Refactoring Steps: Enforces a rigorous process: ensure tests pass, make one small change, run tests, commit, and repeat, preventing regressions.
  • Use Case: When encountering a "Long Method" code smell, use this skill to analyze the method, generate a plan to "Extract Method" into smaller, more focused functions, and guide the refactoring process step-by-step.

Quick Start

Analyze the file 'src/utils/dataProcessor.ts' for refactoring opportunities and generate a plan

Frequently Asked Questions about refactor-expert

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

FAQPage Schema
How do I safely refactor code without introducing bugs?

Safe refactoring follows a test-driven, incremental approach: ensure tests pass, make one small change, run tests again, and commit. This discipline prevents regressions and maintains behavior while improving code quality across patterns like extract-method and replace-conditional with polymorphism.

What code smells should I look for when refactoring?

Common code smells include long methods, complex conditionals, and poor modularity. The skill analyzes your codebase to identify these patterns, generates detailed analysis documents, and creates step-by-step implementation plans before you begin refactoring.

Can I refactor a large codebase incrementally without stopping development?

Yes. Incremental refactoring makes one small, testable change at a time, keeping tests passing throughout. This approach minimizes risk and allows you to refactor alongside feature work, though the skill enforces avoiding feature additions during refactoring cycles.

How do I extract methods from long functions systematically?

The skill guides the extract-method pattern step-by-step: analyze the long method, plan which logic to extract, make focused changes, verify tests pass after each extraction, and document the refactoring. This prevents behavioral changes while improving readability and maintainability.

What happens if I add features while refactoring code?

Mixing features with refactoring increases risk and makes it harder to isolate regressions. The skill enforces one-change-at-a-time discipline, requiring you to complete refactoring cycles before adding features, keeping commits clean and testable.