refactor

Plan and execute structured code refactors to improve maintainability.

3|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/alpoxdev/claude-code --skill refactor-alpoxdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/alpoxdev/claude-code/tree/main/.claude/skills/refactor
Command: npx skills add https://github.com/alpoxdev/claude-code --skill refactor-alpoxdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to plan and execute code refactors, improving maintainability, reducing complexity, and strengthening type safety through a guided multi-agent workflow.

Core Features & Use Cases

  • Structured, multi-agent refactor workflow analyzes code, evaluates alternatives, and creates implementation plans.
  • Parallel execution and verification across agents to expedite refactoring while preserving safety.
  • Documentation generation (ANALYSIS.md, PLAN.md, METRICS.md) and traceable roll-back plans for changes.

Quick Start

Immediate actions to start refactoring:

  • Direct handling: /refactor <path> - provide a clear scope
  • Delegate to @refactor-advisor: Task({ subagent_type: 'refactor-advisor', model: 'sonnet', prompt: '리팩토링 계획 수립', description: '인증 모듈 리팩토링' }) The actual steps will create a new folder under .claude/refactor/00.[module]/ with ANALYSIS.md, PLAN.md, METRICS.md and begin implementation after plan confirmation.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I plan and execute a structured code refactor to improve maintainability?

To plan and execute a structured code refactor, you provide a module path to trigger a multi-agent workflow that analyzes code, generates implementation plans, and applies gradual architecture improvements with traceable roll-back plans.

Can I improve type safety and architecture across multiple modules in parallel?

Yes, you can improve type safety and architecture in parallel by distributing refactoring tasks across agents, enabling parallel execution and verification while preserving safety across independent modules.

How does the refactor workflow handle documentation and change tracking?

The refactor workflow handles documentation by automatically generating ANALYSIS.md, PLAN.md, and METRICS.md files under a dedicated directory, ensuring changes are documented and providing traceable roll-back plans.

Do I need a specific environment setup to delegate refactoring tasks to an advisor?

To delegate refactoring tasks to an advisor, you need an environment supporting subagent delegation where you can specify the advisor type, model, prompt, and description to initiate the structured refactoring workflow.

What is the best way to ensure safe gradual architecture improvements without breaking existing code?

The best way to ensure safe gradual architecture improvements is using a guided multi-agent workflow that evaluates alternatives, creates structured implementation plans, and verifies changes in parallel before execution.

When should I avoid using an automated multi-agent workflow for code refactoring?

You should avoid an automated multi-agent workflow for code refactoring when the scope is unclear, as the system requires a clear module path and defined scope to generate accurate analysis and implementation plans.