
Refactor
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-codeInstalls 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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Structure & Decomposition | CRITICAL | struct- |
| 2 | Coupling & Dependencies | CRITICAL | couple- |
| 3 | Naming & Clarity | HIGH | name- |
| 4 | Conditional Logic | HIGH | cond- |
| 5 | Abstraction & Patterns | MEDIUM-HIGH | pattern- |
| 6 | Data Organization | MEDIUM | data- |
| 7 | Error Handling | MEDIUM | error- |
| 8 | Micro-Refactoring | LOW | micro- |
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- Expo561
- React496
- Tailwind Responsive Ui470
- Tailwind Ui Refactor467
- Zustand453
- Debug444
- Ios Design436
- Feature Spec431
- Feature Arch423
- React Testing Library418
- Jscodeshift416
- Expo React Native Coder415
- Tdd415
- Humanize409
- React Optimise403
- Knip Deadcode390
- Rails Hotwire380
- Ts Google378
- Nginx C Module Design369
- Vite367
- Nginx C Modules365
- Ios Animations355
- Dockerfile Optimise351
- Uniwind348