refactor-java
Installation
SKILL.md
Java Refactoring Catalog Skill
A comprehensive, technique-by-technique catalog of refactoring best practices for Java, sourced from Martin Fowler's Refactoring: Improving the Design of Existing Code (2nd Edition) and Alexander Shvets' Refactoring in Java (Refactoring Guru).
Core Philosophy
Refactoring is the process of changing the internal structure of code without altering its observable behavior. It is a disciplined technique, not a random cleanup. The golden rule is: Cover → Modify → Refactor (always have tests before you start).
How to Use This Skill
- Diagnose first: Identify the code smell (see
techniques/00-code-smells-diagnostic.md) - Select technique: Each smell maps to one or more refactoring techniques
- Read the technique file: Each technique has its own markdown file in
techniques/with problem description, motivation, step-by-step mechanics, and Java 8 + Java 11 examples - Apply incrementally: Small steps, test after each change, commit frequently
Technique Categories
The techniques are organized in 7 groups. Each technique has its own file in the techniques/ directory.
Related skills