refactor

Improve the shape of existing code without changing behavior.

owainlewis/blueprint373 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: refactor
description: Improve the shape of existing code without changing behavior.
license: MIT
---

# Refactor

1. Identify the target from `$ARGUMENTS`, the current diff, latest commit, or recently touched files.
2. Read the code and tests. Understand what behavior must not change. For risky refactors, run focused tests first.
3. Make small behavior-preserving edits: delete, deduplicate, rename, simplify, extract or inline.
4. Don't change public interfaces, data shapes, errors, or user-visible output unless the user asks.
5. Run relevant checks, wider ones when shared behavior was touched.
6. Report what changed, what stayed the same, and checks run.

## Rules

- Refactoring is not feature work. Don't expand into unrelated cleanup.
- Don't change behavior to make the refactor easier.
- Keep an abstraction only when it reduces complexity or duplication.

More Refactoring skills

← All Refactoring skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY