Skip to content

Structured refactoring guide of 43 rules across eight prioritized categories, drawn from Fowler's catalog and Clean Code.

CCM score
47 of 100
skills.sh installs
668
GitHub stars
228
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers decomposition, coupling, naming, conditional logic, patterns, data organization, error handling, and micro-refactoring, ordered by impact
  • Lists quick-reference rule IDs such as struct-extract-method and cond-guard-clauses, with per-rule reference files under references/
  • Targets long methods, large classes, tangled conditionals, and code smells, and includes a checklist for maintainability reviews
  • Designed for AI agents and LLMs that refactor existing code or generate maintainable code

Install

$ npx -y skills add pproenca/dot-skills --skill refactor -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Fowler/Martin Code Refactoring Best Practices

Comprehensive code refactoring guide based on Martin Fowler's catalog and Clean Code principles, designed for AI agents and LLMs. Contains 43 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Refactoring existing code to improve maintainability
  • Decomposing long methods or large classes
  • Reducing coupling between components
  • Simplifying complex conditional logic
  • Reviewing code for code smells and anti-patterns

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Structure & DecompositionCRITICALstruct-
2Coupling & DependenciesCRITICALcouple-
3Naming & ClarityHIGHname-
4Conditional LogicHIGHcond-
5Abstraction & PatternsMEDIUM-HIGHpattern-
6Data OrganizationMEDIUMdata-
7Error HandlingMEDIUMerror-
8Micro-RefactoringLOWmicro-

Quick Reference

1. Structure & Decomposition (CRITICAL)

Details

Repository
github.com/pproenca/dot-skills
Category
Code Review & Quality
First seen
Jun 3, 2026

Questions

What does the refactor skill do?

The refactor skill applies code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. It guides an agent through extract method, rename, decompose conditional, reducing coupling and improving readability in existing code.

How do I install the refactor skill?

Run npx -y skills add pproenca/dot-skills --skill refactor -y in a project to install the refactor skill. Once installed, the refactor skill lets the agent review code for code smells and maintainability problems.

Where does the refactor skill fit in the Code Review & Quality category?

The refactor skill sits in the Code Review & Quality category on Claude Marketplaces, alongside improve-codebase-architecture, codebase-design, code-review, setup-ts-deep-modules and caveman-review. Its 43 rules across 8 categories set it apart by covering structure, coupling, naming, conditionals and error handling.

Who is the refactor skill for?

The refactor skill is for developers who want an agent to decompose long methods, reduce coupling between components and simplify complex conditional logic. It also suits anyone reviewing existing code for code smells and anti-patterns.

More from pproenca/dot-skills

All 100

Similar to Refactor

More Code Review & Quality