From Refactor
Executes automated refactoring for specific files, directories, or semantic queries. This skill should be used when the user asks to refactor specific files or directories, simplify recently changed code, clean up dead code in a limited scope, or invokes "/refactor".
How this command is triggered — by the user, by Claude, or both
Slash command
/refactor:SKILL [files-or-directories-or-semantic-query]refactor/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 Command Execute automated refactoring for $ARGUMENTS using `refactor:code-simplifier` agent. ## Pre-operation Checks **Goal**: Ensure scope resolution is deterministic before launching the agent. **Actions**: 1. Run `git rev-parse --is-inside-work-tree` and continue even if false when explicit paths are provided 2. Normalize arguments by trimming whitespace and preserving quoted path segments 3. Treat an empty argument list as "recent changes" mode ## Phase 1: Determine Target Scope **Goal**: Identify files to refactor based on arguments or session context. **Actions**: 1. I...
Execute automated refactoring for $ARGUMENTS using refactor:code-simplifier agent.
Goal: Ensure scope resolution is deterministic before launching the agent.
Actions:
git rev-parse --is-inside-work-tree and continue even if false when explicit paths are providedGoal: Identify files to refactor based on arguments or session context.
Actions:
git diff --name-only to find recently modified code filesCRITICAL: Never include node_modules/, .git/, dist/, build/, lock files, or compiled artifacts in refactoring scope — use Grep --glob exclusions to enforce.
See references/scope-determination.md for search strategies and edge cases.
Goal: Execute refactor:code-simplifier agent with aggressive mode enabled.
Actions:
refactor:code-simplifier agent with target scope and aggressive mode flagrefactor:best-practices skill and applies language-specific patternsSee references/agent-configuration.md for detailed Task parameters.
Goal: Report comprehensive summary of changes.
Actions:
git restore --worktree --staged <files>)See references/output-requirements.md for detailed summary format.
/refactor-project for project-wide scopenpx claudepluginhub daisycatts/dotclaude --plugin refactor/SKILLEnables work verification for a task. Claude completes the work, verifies it, and appends a verified tag before session exit.
/SKILLResolves a GitHub issue by creating an isolated worktree, implementing a TDD fix, and opening a PR with auto-closing keywords.
/SKILLSurfaces the current session task from a state file and evaluates its clarity and completeness. Reports completion status or identifies remaining steps.