Help us improve
Share bugs, ideas, or general feedback.
From dev-workflow
Performs iterative refactoring on git-changed files (3+ rounds: structural/DRY/extraction, readability/naming/nesting, conventions). Runs tests/lint after each round; generates before/after report. Use post-implementation, pre-review.
npx claudepluginhub kzytateishi/spikeee-plugins-marketplace --plugin dev-workflowHow this skill is triggered — by the user, by Claude, or both
Slash command
/dev-workflow:refactorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run iterative refactoring on files changed in `$ARGUMENTS` (or the current branch if no arguments are provided).
Orchestrates a multi-step refactoring pipeline: analyzes code quality, plans improvements, optionally writes tests, implements changes, and reviews results. Routes simple refactors to a lighter workflow.
Iteratively scans code for DRY, dead code, naming, and complexity issues, implements fixes, verifies with QA, and commits atomically until no improvements remain.
Safely refactors code test-first: verifies/writes tests, one structural change at a time, preserves behavior. Use for 'refactor this', 'clean this up', reorganization.
Share bugs, ideas, or general feedback.
Run iterative refactoring on files changed in $ARGUMENTS (or the current branch if no arguments are provided).
CRITICAL: Refactoring is NOT a one-pass process. You MUST execute at minimum 3 separate rounds. Do NOT combine rounds or skip ahead. After completing Round 3, evaluate if more rounds are needed and continue until no improvements remain.
Round 1: Structural improvements (DRY, method extraction)
↓ run tests + lint → verify
Round 2: Readability (naming, nesting reduction)
↓ run tests + lint → verify
Round 3: Convention compliance (patterns, best practices)
↓ run tests + lint → verify
Round N: Continue if improvements remain
Detect the base branch automatically:
git remote show origin → check HEAD branchmain, master, or develop branchesgit branch --show-current
git diff --name-only {base_branch}...HEAD
git diff {base_branch}...HEAD
Important: Refactor source code and related test code together. If no related tests exist, refactor source only and note the missing test coverage.
Auto-detect the project's test and lint commands from configuration files. If undetectable, ask the user.
Read project conventions from CLAUDE.md and AGENTS.md if present.
Continue iterating until ALL of the following are satisfied:
After completion, generate a report following the format in refs/report-template.md.
/code-review for quality review/pr-summary for PR description