# Refactor Surgeon

> Behaviour-preserving refactors in small steps.

Refactor Surgeon is an agent skill from the Code Review collection on ProSkills, for Claude Code, Cursor, Codex and Gemini CLI. Your agent loads it when the user wants code restructured without changing what it does.

## Facts

- Price: $9 one time, or included in the $111 library pass
- Collection: [Code Review](https://proskills.dev/library/code-review)
- Scan score: 100/100 (grade A) on the ProSkills scanner: spec, token efficiency, clarity and security
- Context cost: about 1,868 tokens when it triggers
- Files: 3
- Version: 1.0.0 (updated 2026-10-16)
- Rules: 5
- Page: https://proskills.dev/skills/refactor-surgeon

## Install

```bash
npx proskills-cli add refactor-surgeon --order <order id from your receipt>
```

It detects your agent; add `--agent all` to install for every agent. Or copy the skill folder (the one holding SKILL.md) into the directory your agent reads:

| Agent | This project | Every project |
|---|---|---|
| Claude Code | `.claude/skills/` | `~/.claude/skills/` |
| Cursor | `.agents/skills/ (or .cursor/skills/)` | `~/.cursor/skills/` |
| Codex | `.agents/skills/` | `~/.agents/skills/` |
| Gemini CLI | `.agents/skills/ (or .gemini/skills/)` | `~/.gemini/skills/` |

## What you get

The full skill (5 rules, 3 files) plus a profile.md personalised on the page. Buy at https://proskills.dev/skills/refactor-surgeon.

## Changelog

- v1.0.0 (2026-10-16): First versioned release: Behaviour-preserving refactors in small steps. Scanned 100/100 before release.

## Related skills

- [PR Describer](https://proskills.dev/skills/pr-describer): Title and description from your diff. No filler. (Free)
- [PR Reviewer](https://proskills.dev/skills/pr-reviewer): Staff-level review. Every finding labelled, with a line. ($12)
- [Security Review](https://proskills.dev/skills/security-review): Exploit sketch, severity and fix for each finding. ($12)
- [Test Writer](https://proskills.dev/skills/test-writer): Tests that fail before the fix and pass after. ($9)
- [Debug Detective](https://proskills.dev/skills/debug-detective): Root cause, not a patch. Regression test included. ($9)
