Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude loads one when your task matches it, or you run it by name.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Advanced refactoring orchestration with rollback automation, test generation, synergy detection, and incremental refactoring support.
Transform large-scale refactoring from a risky manual process into a safe, automated, and observable workflow. The refactor skill provides:
# Create junction (Windows - no admin required)
# Run from the skills parent directory
mklink /J "P:\.claude\skills\refactor" "P:\.claude\skills\refactor"
# Or create symlink (macOS/Linux)
ln -s "$(pwd)" ~/.claude/skills/refactor
The skill is accessed via /refactor in Claude Code.
IMPORTANT: This package supports three different deployment modes. Choose the right one for your use case.
For: When you're actively developing this package and want instant feedback.
Setup:
# Windows (Junction - No admin required)
# For plugins with skills: Junction to the skills/ subdirectory
# IMPORTANT: Sanitize the junction name to remove problematic characters
$junctionName = "refactor" -replace '[@?*:<>|+]', ''
New-Item -ItemType Junction -Path "P:\.claude\skills\$junctionName" -Target "P:\packages\refactor\skills\refactor"
Key points:
P:/packages/refactor/, changes work immediatelyP:/.claude/skills/For: When this package has hook files (.py files in scripts/hooks/) you want to test.
Setup:
# Symlink individual hook files to P:/.claude/hooks/
cd P:/.claude/hooks
cmd /c "mklink HookName.py P:/packages/refactor/scripts/hooks/HookName.py"
For: Distributing this package to other users via marketplace or GitHub.
Setup:
# End users install via /plugin command
/plugin P:/packages/refactor
graph TD
A[User invokes /refactor] --> B[Skill Interface]
B --> C{Mode Selection}
C -->|Discovery| D[Pattern Detection]
C -->|TDD| E[Test Generation]
C -->|Rollback| F[Git State Capture]
C -->|Analysis| G[Complexity Triage]
C -->|Incremental| H[State Persistence]
D --> I[Synergy Detector]
E --> J[Test Generator]
F --> K[Rollback Manager]
G --> L[Complexity Scorer]
H --> M[State Manager]
I --> N[Report Generation]
J --> N
K --> N
L --> N
M --> N
style B fill:#e1f5ff
style N fill:#c8e6c9
refactor/
├── SKILL.md # Skill definition and usage
├── __init__.py # Public API exports
├── README.md # This file
├── CHANGELOG.md # Version history
├── LICENSE # MIT License
├── plan.md # Implementation roadmap
│
├── lib/ # Python skill modules
│ ├── plan_review.py # Plan review and validation
│ └── refactor_plan.py # Refactoring plan generation
│
└── scripts/ # Utility scripts
├── code_scanner.py # Code analysis scanner
└── install-dev.bat # Windows junction automation
| Module | Responsibility | Key Features |
|---|---|---|
| RefactorConfig | Configuration management | CLI + YAML/JSON, threshold customization |
| RollbackManager | Git-based safety | State capture, rollback script generation, cleanup |
| TestGenerator | TDD orchestration | RED → GREEN → REFACTOR phases, test result tracking |
| SynergyDetector | Cross-file analysis | DRY violation detection, extraction opportunity finding |
| ComplexityTriage | Risk prioritization | Cyclomatic complexity scoring, priority levels (P0-P3) |
| StateManager | Incremental progress | Terminal-isolated state persistence, atomic writes |
Invoke the refactor skill from Claude Code:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills: Invalid input
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Plugins from other owners that cover similar ground