sandi-metz-rules
This skill should be used when users request code review, refactoring, or code quality improvements for Ruby codebases. Apply Sandi Metz's four rules for writing maintainable object-oriented code - classes under 100 lines, methods under 5 lines, no more than 4 parameters, and controllers instantiate only one object. Use when users mention "Sandi Metz", "code quality", "refactoring", or when reviewing Ruby code for maintainability.
Security Assessment
About sandi-metz-rules
The 'sandi-metz-rules' skill is designed to help developers apply Sandi Metz's four key rules for writing maintainable object-oriented code in Ruby codebases. The skill focuses on ensuring that classes, methods, and controllers adhere to best practices for simplicity and maintainability, making it easier for developers to create clean, testable, and understandable Ruby applications. By applying these principles, developers can avoid common pitfalls such as overly complex code, which can become difficult to maintain or extend over time. This skill streamlines the process of refactoring code to improve readability, reduce complexity, and enforce better design patterns.
The skill specifically targets code reviews, refactoring, and code quality improvements. It uses the four rules as a set of heuristics for evaluating and improving Ruby code. The rules include ensuring that classes are small (under 100 lines), methods are concise (under 5 lines), parameters are limited (no more than 4), and controllers only instantiate one object. This tool is essential for Ruby developers working to improve their object-oriented design or refactor existing code for maintainability. It is highly useful for teams or individuals looking to improve code quality and reduce technical debt in large or complex Ruby projects.
This skill is best suited for developers, code reviewers, and team leads who work with Ruby codebases and are looking to enforce good design principles. It is useful in scenarios where code quality, maintainability, or refactoring is a priority. Developers working with legacy code or teams conducting regular code reviews can also benefit from using this skill to ensure their code adheres to best practices in object-oriented design.
FAQ
How do I use the sandi-metz-rules skill?
You can use this skill during code reviews or refactoring sessions for Ruby codebases. Simply apply the four Sandi Metz rules to evaluate classes, methods, parameters, and controller logic for maintainability.
Is this skill compatible with all Ruby versions?
The skill applies to Ruby codebases in general, but it is recommended to use it with modern Ruby versions that support object-oriented design best practices.
Does the skill work for non-Ruby codebases?
No, the skill is specifically designed for Ruby codebases and focuses on Ruby-specific conventions and object-oriented design principles.
What are the limitations of this skill?
The skill focuses primarily on the four Sandi Metz rules and does not provide broader code analysis or support for other design patterns outside of the specified principles.
Install sandi-metz-rules
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nateberkopec/dotfiles