# Refactoring

Apply Martin Fowler-inspired refactoring rules when improving existing code structure...

- Repository: https://github.com/ciembor/agent-rules-books (3164 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-09-10
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ciembor/agent-rules-books --skill refactoring -g -a claude-code -y`
Codex: `npx skills add ciembor/agent-rules-books --skill refactoring -g -a codex -y`
Cursor: `npx skills add ciembor/agent-rules-books --skill refactoring -g -a cursor -y`
Gemini CLI: `npx skills add ciembor/agent-rules-books --skill refactoring -g -a gemini-cli -y`

## Description

Apply Martin Fowler-inspired refactoring rules when improving existing code structure while preserving observable behavior.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Refactoring Skill

Use this skill when a task involves behavior-preserving code improvement, code smells, small refactoring steps, test-backed cleanup, or separating refactoring from feature changes.

Before making design or code decisions, read and apply [refactoring.mini.md](refactoring.mini.md). Use [refactoring.md](refactoring.md) only as a deeper reference when the mini rules are not enough for the current refactoring tradeoff.

