What problem does it solve?
This Skill restructures code without changing its behavior, reducing the risk of breaking functionality during large or complex refactors.
Core Features & Use Cases
- Isolated worktree refactoring: Creates an isolated git worktree from the latest main on a dedicated refactor branch to keep experiments contained.
- Environment-preserving setup: Copies .env* files and optional Claude local settings into the worktree while validating they match the source repo.
- Test-gated incremental transformation: Runs make test before and after each atomic change, reverting only the failed files to quickly recover.
- Workflow-safety PR flow: Opens the PR via /agent-dashboard:pr so cleanup, formatting, tests, and push are handled by the dashboard’s gatekeeper.
Quick Start
Ask your agent to run refactor with the goal "separate the business logic from the HTTP handlers and keep behavior identical" so it creates a safe worktree, verifies env files, establishes a passing test baseline, and performs test-checked atomic changes.