What problem does it solve?
This Skill helps developers ensure their Ruby code adheres to Sandi Metz's maintainability rules, preventing "code smells" and improving object-oriented design. It automates the process of identifying violations and suggesting refactorings, saving manual review time and reducing complexity.
Core Features & Use Cases
- Automated Code Review: Automatically identifies violations of Sandi Metz's four rules (class/method length, parameter count, controller object instantiation).
- Refactoring Guidance: Provides concrete, actionable refactoring strategies and code examples for each type of violation, making code easier to understand, test, and maintain.
- Use Case: A developer submits a Ruby codebase for review. This Skill analyzes the code, flags methods over 5 lines and classes over 100 lines, and suggests specific refactorings like "Extract sub-methods with descriptive names" or "Introduce Parameter Object."
Quick Start
Review the attached Ruby file 'my_service.rb' for Sandi Metz rule violations and suggest refactorings.