
Refactor
Runs multi-round refactoring on branch changes, verifying tests and lint each round
Refactor is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 5
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Refactor
This skill walks the agent through refactoring the files changed on a branch against its base branch. It works in at least three passes: structural cleanup such as removing duplication and extracting methods, then readability work on names and nesting, then checks against project conventions. Each pass is followed by running the project's tests and lint, and the agent keeps going while it still finds improvements.
The skill detects the base branch from the git remote or common branch names, collects the diff, and reads CLAUDE.md or AGENTS.md when present to pick up local conventions. Test code is refactored alongside source code. Behavior is meant to stay the same, and the agent is asked to note correctness issues it spots without fixing them, collecting them for a separate code review step.
It expects a git repository with a configured base branch and a project whose test and lint commands can be found in its configuration files. The output is a before-and-after report, and the skill is intended to run after implementation and before code review.
When your agent uses it
Run iterative refactoring on changed files (minimum 3 rounds). Round 1: structural improvements (DRY, method extraction). Round 2: readability (naming, nesting reduction). Round 3: convention compliance. Continues until no improvements found. Generates a before/after report. Use after implementation, before code review.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 3 files (10 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the dev-workflow plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add kzytateishi/spikeee-plugins-marketplace
/plugin install dev-workflow@spikeee-pluginsOr copy only this skill to ~/.claude/skills/refactor:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kzytateishi/spikeee-plugins-marketplace.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/refactor &&
cp -R "$tmp/plugins/dev-workflow/skills/refactor" ~/.claude/skills/refactor &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/refactor inside it instead.
Copy the skill folder to ~/.agents/skills/refactor to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kzytateishi/spikeee-plugins-marketplace.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/refactor &&
cp -R "$tmp/plugins/dev-workflow/skills/refactor" ~/.agents/skills/refactor &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/refactor inside it instead.
Copy the skill folder to ~/.cursor/skills/refactor to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kzytateishi/spikeee-plugins-marketplace.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/refactor &&
cp -R "$tmp/plugins/dev-workflow/skills/refactor" ~/.cursor/skills/refactor &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/refactor inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/kzytateishi/spikeee-plugins-marketplace.git --path plugins/dev-workflow/skills/refactorOr copy the folder to ~/.gemini/skills/refactor yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/refactor:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kzytateishi/spikeee-plugins-marketplace.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/refactor &&
cp -R "$tmp/plugins/dev-workflow/skills/refactor" ~/.copilot/skills/refactor &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/refactor inside it instead.
Get the folder:
git clone --depth 1 https://github.com/kzytateishi/spikeee-plugins-marketplace.gitThen copy spikeee-plugins-marketplace/plugins/dev-workflow/skills/refactor into your agent's skills folder as refactor. Agents that support SKILL.md read one folder per skill.
What it does
- Multi-round refactoring passes
- Runs structural, readability and convention rounds in sequence, repeating until no further changes are found.
- Changed-file detection
- Identifies the base branch and collects the diff so only files touched on the branch are refactored.
- Test and lint verification
- Runs the project's test and lint commands after each round to confirm behavior is preserved.
- Convention alignment
- Checks code against CLAUDE.md, AGENTS.md and patterns used in sibling files.
- Before and after report
- Produces a summary of the changes made, plus a list of issues flagged for later review.
Good for
- Clean up a feature branch before opening a pull request
- Remove duplicated code from recently implemented changes
- Improve naming and reduce nesting in files I just edited
- Check my branch changes against the project's coding conventions
Refactor FAQ
What does Refactor need to run?
A git repository with a base branch it can detect, and a project with discoverable test and lint commands. It reads CLAUDE.md and AGENTS.md when they exist.
Does Refactor change how the code behaves?
The skill instructs the agent not to change behavior, only structure, and to run tests after each round. Logic bugs it notices are listed for review rather than fixed.
When should Refactor be used?
The skill describes running after implementation and before code review.
How do I install Refactor in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/refactor to use it in all your projects, or to .claude/skills/refactor in one project. Or install the dev-workflow plugin, which includes it: /plugin marketplace add kzytateishi/spikeee-plugins-marketplace, then /plugin install dev-workflow@spikeee-plugins.
Does Refactor run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Refactor?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Refactor?
The closest alternatives to Refactor are Branch refactor planner, Code simplifier, Review workflow, Code review and Refactoring guide.
Where this comes from
- Description: from the skill's own SKILL.md.
More from kzytateishi/spikeee-plugins-marketplace

Runs a parallel, located code review of a branch before you open a pull request
- Open source
- 5 GitHub stars
- Developer tools

Chains spec, implementation, refactoring, review and PR summary steps for a feature
- Open source
- 5 GitHub stars
- Developer tools

Runs spec-driven implementation of order.md and todo.md tasks with quality gates
- Open source
- 5 GitHub stars
- Developer tools

Generates a spec document and implementation task checklist before coding starts
- Open source
- 5 GitHub stars
- Developer tools

Builds Flutter screens from Figma designs using exact values pulled via Figma MCP
- Open source
- 5 GitHub stars
- Design and media

Builds a frontend page or component from a Figma design, checked with Playwright
- Open source
- 5 GitHub stars
- Design and media




