AgentSkillsCN

plan-refactoring

识别最具ROI的重构目标

SKILL.md
--- frontmatter
name: plan-refactoring
description: Identify highest-ROI refactoring targets
usage: /plan-refactoring [path]
arguments:
  - name: paths
    description: Paths to analyze
    required: false
    default: "."

Plan Refactoring Skill

Find refactoring targets in: {{.paths}}

Quick Start

bash
# Find hotspots (high churn + complexity)
omen -f json hotspot -n 10

# Find code clones
omen -f json clones --min-tokens 50

# Find acknowledged debt
omen -f json satd | jq '.items[] | select(.category == "design")'

Priority Matrix

FindingEffortROI
Hotspot with clonesMediumHigh
God componentHighHigh
Isolated cloneLowMedium
Low-churn debtLowLow

Effort Guide

  • Extract function: 30min - 2hr
  • Split class: 2hr - 1 day
  • Break cycle: 1-3 days
  • Extract module: 1-2 weeks

Sequencing

  1. Quick wins: hotspot + low complexity
  2. Clone extraction
  3. God components (dedicated sprint)