What problem does it solve? Cleaning up messy code and documents across a repository is risky and tedious: each change needs behavioral verification, review, and lint/test gating. This Skill automates multi-target refactoring by detecting candidates, dispatching the right cleanup routine per file type, and enforcing verification gates before anything is marked committable. ## Core Features & Use Cases - Multi-Target Orchestration: Refactor specific files or directories with --target, or auto-detect up to 10 high-priority targets with --auto using a complexity/change-frequency/isolation scoring formula. - Behavioral Safety Gates: Code targets run /verify fast before and after refactoring to detect behavioral regressions; failing baselines or regressions are skipped with structured [REFACTOR_SKIPPED] logs. - Typed Dispatch: Routes code files to /simplify, AI-artifact docs to /de-ai-flavor, and structural docs to /doc-refactor, each followed by Codex review loops (max 3 rounds). - Reference-Stability Mode: A narrow --mode reference-stability pass converts bare path:line pointers into durable semantic anchors across at most 5 explicitly enumerated files. - Use Case: Run /refactor --auto --max-targets 5 before a release to clean up the five most complex, frequently changed files, then review the per-target result table and commit with /smart-commit --execute. ## Quick Start Ask the assistant to refactor a specific file or directory, for example by requesting to clean up and simplify src/utils.ts with verification and review gates applied.