What problem does it solve?
This Skill solves the common pain point of inconsistent code quality, unnecessary duplication, and poor structural design that makes codebases hard to maintain, debug, and extend over time.
Core Features & Use Cases
- Anti-Duplication Guidelines: Enforce DRY principles, eliminate redundant code, and prevent duplicated logic, parallel inheritance hierarchies, and shotgun surgery across modules.
- Decomposition Best Practices: Break down large files, classes, and functions into single-responsibility components aligned with SOLID principles and domain-driven design boundaries.
- Extraction Patterns: Identify and extract magic numbers, repeated logic, shared utilities, and configuration values into centralized, reusable locations.
- Use Case: For example, when reviewing a pull request with duplicated validation logic across 3 API endpoints, use this Skill to identify the duplication, extract the shared validator into a central module, and split the large endpoint handler into smaller, focused functions.
Quick Start
Use the code-quality-rules skill to review the recent changes in the src/api/ directory for duplication, poor decomposition, and missing extractions, then provide a prioritized list of refactoring actions.