From refactor
Executes automated project-wide refactoring across all code files, focusing on cross-file optimizations, duplication reduction, and consistency. Produces change summary with rollback info.
How this command is triggered — by the user, by Claude, or both
Slash command
/refactor:SKILL (no arguments needed)refactor-project/This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Refactor Project Command Execute automated project-wide refactoring using `refactor:code-simplifier` agent with cross-file optimization focus. ## Pre-operation Checks **Goal**: Ensure project-wide execution is explicit and reproducible. **Actions**: 1. Run `git rev-parse --is-inside-work-tree`; if false, inform user that project-wide mode requires a git workspace 2. Record current revision with `git rev-parse --short HEAD` and include it in final summary for rollback context 3. Ignore command arguments and proceed with full-project discovery ## Phase 1: Analyze Project Scope **Goal**:...
Execute automated project-wide refactoring using refactor:code-simplifier agent with cross-file optimization focus.
Goal: Ensure project-wide execution is explicit and reproducible.
Actions:
git rev-parse --is-inside-work-tree; if false, inform user that project-wide mode requires a git workspacegit rev-parse --short HEAD and include it in final summary for rollback contextGoal: Discover all code files and display scope summary.
Actions:
node_modules/, .git/, dist/, build/, vendor/, .venv/See references/scope-analysis.md for exclusion patterns and edge cases.
Goal: Execute refactor:code-simplifier agent with project-wide scope and cross-file focus.
Actions:
refactor:code-simplifier agent with all discovered code filesrefactor:best-practices skill and applies language-specific patternsSee references/agent-configuration.md for detailed Task parameters.
Goal: Report comprehensive summary of project-wide changes.
Actions:
git restore --worktree --staged .)See references/output-requirements.md for detailed summary format.
npx claudepluginhub fradser/dotclaude --plugin refactor/refactor-reviewAnalyzes code quality and refactoring opportunities in project, files, git changes, or PRs; creates prioritized improvement plan saved as Markdown report.
/refactor-guidedPerforms safe incremental refactoring on target files directories or descriptions verifying tests at each step with git commits and reverts.
/SKILLCreates a conventional git commit using git-agent with intent from conversation, optionally co-authored by Claude model from argument.
/SKILLCreates a GitHub pull request with automated quality validation, security scanning, issue linking, and compliance checks. Accepts optional description or issue reference.
/SKILLSurfaces current session task from state file, evaluates clarity (prompts for clarification if needed), assesses completion, and verifies if fully done.