vue-refactor

Diagnoses Vue SFCs and prescribes compiler-driven refactors with TypeScript + Volar.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/liuzhengdongfortest/skills-plus --skill vue-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-refactor
Source: https://github.com/liuzhengdongfortest/skills-plus/tree/main/vue-refactor
Command: npx skills add https://github.com/liuzhengdongfortest/skills-plus --skill vue-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill acts as a diagnostic and coaching assistant for refactoring Vue code. It analyzes a given Vue component or SFC, identifies common pain points like a too-fat main branch, UI/IO entanglement, or reactive-business entanglement, and prescribes one of three safe decoupling strategies. It guides through compiler-driven steps to keep behavior equivalent and to return the codebase to a green state, always prioritizing incremental, auditable moves with rollbacks.

Core Features & Use Cases

  • Diagnostic decision tree: detects fat trunk, UI/IO entanglement, and reactive-business coupling.
  • Prescription-driven refactor: chooses one of three safe recipes (outward move, humble/controller split, thin composable) and guides step-by-step.
  • Compiler-guided execution: ensures each micro-move preserves external behavior with green compilations and clear rollback points.
  • Collaboration rhythm: presents a paused, decision-point workflow for incremental, auditable changes.

Quick Start

Paste a Vue component path or code snippet; the Skill will diagnose the fat trunk and IO/reactivity entanglements and propose a prescription with incremental steps.

Frequently Asked Questions about vue-refactor

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

FAQPage Schema
How do I safely refactor a Vue component with UI and IO entanglement?

To safely refactor a Vue component with UI and IO entanglement, use a compiler-driven approach that diagnoses the fat trunk and prescribes a decoupling strategy like the humble or controller split, guiding step-by-step to preserve external behavior.

When do I need to extract composables from a fat Vue SFC main branch?

You need to extract composables from a fat Vue SFC main branch when reactive-business coupling makes the component hard to maintain, requiring a thin composable prescription to separate concerns while keeping compiler feedback green.

Does Vue refactoring with compiler-driven steps require TypeScript and Volar?

Yes, Vue refactoring with compiler-driven steps requires TypeScript and Volar to ensure each semantic unit per step preserves external behavior and provides clear rollback points through green compiler feedback.

What is the best way to decouple reactive business logic in Vue without breaking behavior?

The best way to decouple reactive business logic in Vue without breaking behavior is applying an outward move or thin composable recipe, executing micro-moves with green compilations and committing each step to enable traceability and rollback.

Why does my Vue refactor strategy pause at decision points during execution?

Your Vue refactor strategy pauses at decision points to enforce a collaboration rhythm, ensuring incremental, auditable changes where each micro-move is validated by green compiler feedback before proceeding to the next semantic unit.

Can I use incremental refactoring recipes for Vue SFCs with mixed IO and UI code?

Yes, you can use incremental refactoring recipes for Vue SFCs with mixed IO and UI code; the diagnostic decision tree detects the entanglement and selects from three safe prescriptions to guide step-by-step decoupling with rollback support.