Gives Claude a structured approach to refactoring based on Martin Fowler's catalog and Clean Code principles. You get 43 rules across 8 categories, from critical structure issues like extracting long methods to micro-refactorings like removing dead code. Each rule has a priority level and prefix, so you can focus on high impact changes first. The categorization is solid: structure, coupling, naming, conditionals, patterns, data organization, error handling, and micro-refactoring. Most useful when you're dealing with legacy code, reviewing PRs, or trying to reduce complexity systematically. It's prescriptive in a good way, with specific triggers like "decompose conditional" or "reduce coupling" that map directly to cataloged techniques.

skills.sh installs
651
GitHub stars
222
last updated
Aug 21, 2026

Install

$ npx -y skills add pproenca/dot-skills --skill refactor --agent claude-code

Installs into .claude/skills of the current project.

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)

Sponsors

Details

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

More from pproenca/dot-skills

All 100
1alirezarezvani avatarrag-architectalirezarezvani/claude-skillsUse when the user asks to design a RAG pipeline, choose a chunking strategy or embedding model, pick a vector database, or evaluate retrieval quality (precision646skills.sh installs
2davila7 avatarsoftware-architecturedavila7/claude-code-templatesGuide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that re531skills.sh installs
3jwynia avatarcode-reviewjwynia/agent-skillsProvide structured code review guidance for catching defects and improving quality. This skill should be used when the user asks to 'review this code', 'check f504skills.sh installs
4agno-agi avatarcode-reviewagno-agi/agnoCode review assistance with linting, style checking, and best practices475skills.sh installs
5davila7 avatarcode-reviewdavila7/claude-code-templatesPerform code reviews following Sentry engineering practices. Use when reviewing pull requests, examining code changes, or providing feedback on code quality. Co457skills.sh installs
6mblode avatardefine-architecturemblode/agent-skillsGenerates folder structures, module contracts, middleware pipelines, and frontend/backend boundaries for TypeScript full-stack applications, and finds domain-in448skills.sh installs