refactoring-patterns · v1.0 · 2026-05-08 · sha256 8093d91b931c7e92
refactoring-patterns v1.0A
Immutable. This exact content is served forever at /api/v1/blob/8093d91b931c7e92.
--- name: refactoring-patterns version: "1.0" description: Measurement-driven code refactoring — profile before changing, measure after, keep only if metrics improve. Covers complexity reduction, extraction patterns, and bulk refactoring for mechanical changes across many files. --- # Refactoring Patterns Measure before. Refactor. Measure after. Keep only if it improved. ## When to Activate - When the user says "refactor", "clean up", "simplify", "this code is messy" - When code has high complexity, deep nesting, or large functions - When extracting, renaming, or restructuring across multiple files - When consolidating duplicated code ## Process Read `skills/refactoring-process.md` for the measure-refactor-measure workflow, extraction patterns, and bulk refactoring mode. ## Behavioral Rules Read `guidelines.md` for measurement requirements, revert criteria, and scope limits.