From refactor
Automates refactoring of files, directories, semantic queries, or recent git changes using code-simplifier agent. Applies best practices and removes dead code in limited scopes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/refactor:refactorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute automated refactoring for $ARGUMENTS using `refactor:code-simplifier` agent.
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 filesSee 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 fradser/dotclaude --plugin refactorRefactors code to improve structure without changing behavior. Automatically activates when asked to simplify, clean up, or reduce duplication.
Orchestrates multi-target refactoring across code and docs with auto-detection, scoring, and incremental loops. Use for cleanup, simplification, and restructuring.
Executes automated refactoring across all project code files, optimizing cross-file duplication, consistency, and patterns via code-simplifier agent. Requires git repo; use for full codebase cleanups.