Refactoring Surgeon

Expert code refactoring specialist for improving code quality without changing behavior. Activate on: refactor, code smell, technical debt, legacy code, cleanup, simplify, extract method, extract class, DRY, SOLID principles. NOT for: new feature development (use feature skills), bug fixing (use debugging skills), performance optimization (use performance skills).

272 stars 46 forksSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add curiositech/some_claude_skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add curiositech/some_claude_skills --skill refactoring-surgeon
Manual install
git clone --depth 1 https://github.com/curiositech/some_claude_skills.git /tmp/some_claude_skills
mkdir -p ~/.claude/skills
cp -r /tmp/some_claude_skills/.claude/skills/refactoring-surgeon ~/.claude/skills/refactoring-surgeon

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Refactoring Surgeon

Expert code refactoring specialist focused on improving code quality without changing behavior.

## Quick Start

1. **Ensure tests exist** - Never refactor without a safety net
2. **Identify the smell** - Name the specific code smell you're addressing
3. **Make small changes** - One refactoring at a time, commit frequently
4. **Run tests after each change** - Behavior must remain identical
5. **Don't add features** - Refactoring ≠ enhancement
6. **Document significant changes** - Explain the "why" for future maintainers

## Core Capabilities

| Category | Techniques |
|----------|------------|
| **Extraction** | Extract Method, Extract Class, Extract Interface |
| **Movement** | Move Method, Move Field, Inline Method |
| **Simplification** | Replace Conditional with Polymorphism, Decompose Conditional |
| **Organization** | Introduce Parameter Object, Replace Magic Numbers |
| **Legacy Migration** | Strangler Fig, Branch by Abstraction, Parallel Change |

## Code Smells Reference

### Bloaters
```
┌─────────────────────┐    ┌─────────────────────┐    ┌─────────────────────┐
│    Long Method      │    │    Large Class      │    │   Long Parameter    │
│  > 20 lines?        │    │  > 200 lines?       │    │       List          │
│  → Extract Method   │    │  → Extract Class    │    │  → Parameter Object │
└─────────────────────┘    └─────────────────────┘    └─────────────────────┘
```

### OO Abusers
Read the full skill on GitHub

Details

Skill name
refactoring-surgeon
Path
.claude/skills/refactoring-surgeon/SKILL.md
License
MIT
Repo updated
5 November 2026

FAQ

What does the Refactoring Surgeon skill do?

Expert code refactoring specialist for improving code quality without changing behavior. Activate on: refactor, code smell, technical debt, legacy code, cleanup, simplify, extract method, extract class, DRY, SOLID principles. NOT for: new feature development (use feature skills), bug fixing (use debugging skills), performance optimization (use performance skills).

How do I install the Refactoring Surgeon skill?

Claude Code plugin: /plugin marketplace add curiositech/some_claude_skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Refactoring Surgeon popular?

It lives in curiositech/some_claude_skills, which has 272 GitHub stars and 46 forks.

Related skills

Email Composer

272

curiositech/some_claude_skills

Draft professional emails for various contexts including business, technical, and customer communication. Use when the user needs help writing emails or composing professional messages.

Productivity & Notes46

2000s Visualization Expert

272

curiositech/some_claude_skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

Data & Analytics46

2026 Legal Research Agent

272

curiositech/some_claude_skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape. Activate on "find expungement data", "scrape state laws", "legal research", "court URLs", "statute sources", "Clean Slate laws", "automatic expungement research". NOT for interpreting laws (use national-expungement-expert), building UI, or legal advice.

Research & Science46

Rest API Design

272

curiositech/some_claude_skills

Design REST API endpoints with Zod validation and OpenAPI documentation. Use when creating new API routes, validating request/response schemas, or updating API documentation. Activates for endpoint design, schema validation, error handling, and API docs.

Software Development46

Monorepo Management

272

curiositech/some_claude_skills

Monorepo tooling, task orchestration, and workspace architecture for JavaScript/TypeScript repositories. Use when setting up Turborepo, Nx, pnpm workspaces, or npm workspaces; designing package boundaries; configuring remote caching; optimizing CI for affected packages; managing versioning with Changesets; or untangling circular dependencies. Activate on "monorepo", "turborepo", "nx", "pnpm workspace", "task pipeline", "remote cache", "changesets", "CODEOWNERS", "circular dependency", "affected packages", "workspace". NOT for git submodules or multi-repo federation strategies, non-JavaScript m

Software Development46

Senior Coding Interview

272

curiositech/some_claude_skills

Prepare for L6+ coding interviews — in-memory databases, concurrency, state management, iterative follow-ups. Use when practicing real-world system-building problems or preparing communication strategies for live coding. Activate on "coding interview", "staff interview", "codesignal", "live coding", "rate limiter interview". NOT for LeetCode/competitive programming, behavioral interviews, or system design whiteboard.

Software Development46

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.