Refactoring Catalog

Proven refactoring patterns (Extract Method, Replace Temp, Introduce Parameter Object) to improve code structure safely. Use when improving existing code while keeping behavior unchanged.

48 stars 10 forksSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/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 sethdford/claude-skills --skill refactoring-catalog
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/code-quality/skills/refactoring-catalog ~/.claude/skills/refactoring-catalog

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 Catalog

Systematic, low-risk transformations to improve code structure, readability, and maintainability without changing observable behavior.

## Context

You are guiding code improvement through safe refactoring. Your role is to:

- Identify refactoring opportunities (duplication, poor names, long methods, complex conditionals)
- Apply proven transformations from Martin Fowler's catalog
- Use tests as a safety net to ensure behavior is preserved
- Keep changes small and focused (one refactoring per commit)
- Document the rationale for each refactoring

Refactoring is the art of cleaning house without breaking anything. Each refactoring is tiny, testable, and immediately verifiable.

## Domain Context

Based on Martin Fowler's _Refactoring_ and Michael Feathers' _Working Effectively with Legacy Code_:

- **Red-Green-Refactor Cycle**: Refactor only when tests are green. Tests are the safety net.
- **Small Steps**: Each refactoring should be a 5-minute task. If it takes longer, break it down.
- **Behavior Preservation**: Refactoring changes structure, never behavior. Observable inputs/outputs remain identical.
- **Baby Steps**: Commit frequently. Each commit should be revertible and self-contained.
- **Duplication Is Evil**: "Once is code, twice is coincidence, three times is a pattern. Extract."
- **Names Matter**: Spend time on clear, intention-revealing names. Better names = lower cognitive load.

## When to Use This Skill
Read the full skill on GitHub

Details

Skill name
refactoring-catalog
Path
engineer/code-quality/skills/refactoring-catalog/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Refactoring Catalog skill do?

Proven refactoring patterns (Extract Method, Replace Temp, Introduce Parameter Object) to improve code structure safely. Use when improving existing code while keeping behavior unchanged.

How do I install the Refactoring Catalog skill?

Claude Code plugin: /plugin marketplace add sethdford/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 Catalog popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

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