重构助手

Guides refactoring decisions and provides step-by-step execution workflows for code modernization.

70|13|Updated Dec 24, 2025
One-click install
npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill -asiaostrich
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 重构助手
Source: https://github.com/AsiaOstrich/universal-dev-standards/tree/main/locales/zh-CN/skills/refactoring-assistant
Command: npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill -asiaostrich

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers make informed decisions about refactoring code, choosing the right strategies for different scenarios, and safely handling legacy code.

Core Features & Use Cases

  • Refactoring vs. Rewriting: Guides you through a decision tree to determine the best approach.
  • Strategy Recommendation: Suggests tactical, strategic, and safety-focused refactoring patterns.
  • Legacy Code Handling: Provides specific techniques for working with code that lacks tests.
  • Use Case: You've identified a complex, poorly tested module that's blocking new feature development. This Skill can help you decide whether to refactor it, rewrite it, or use a Strangler Fig pattern to gradually replace it, while guiding you on how to add tests safely.

Quick Start

Use the refactor skill to decide whether to refactor or rewrite the current codebase.

Frequently Asked Questions about 重构助手

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

FAQPage Schema
How do I decide whether to refactor or rewrite legacy code?

To decide whether to refactor or rewrite legacy code, use a decision tree that evaluates code complexity, test coverage, and business risk. This Skill guides you through evaluating refactoring versus rewriting to determine the safest approach for code modernization.

What is the best strategy for refactoring code with no tests?

The best strategy for refactoring code with no tests is applying safety-focused refactoring patterns. This Skill provides specific techniques for handling legacy code and safely adding tests before modifying complex modules.

When should I use the Strangler Fig pattern for code modernization?

You should use the Strangler Fig pattern for code modernization when a module blocks new feature development and a full rewrite is too risky. This approach allows you to gradually replace legacy code while maintaining system stability.

How do I manage technical debt without halting feature development?

To manage technical debt without halting feature development, apply strategic refactoring patterns that integrate modernization into your regular workflow. This Skill recommends step-by-step workflows to address debt while keeping systems functional.

Can I get a step-by-step execution workflow for code refactoring?

Yes, you can get a step-by-step execution workflow for code refactoring. This Skill provides structured workflows that guide tactical, strategic, and safety-focused refactoring patterns for safe code modernization.