sandi-metz-rules

Originally fromnateberkopec/dotfiles
Installation
SKILL.md

Sandi Metz Rules

Overview

This skill helps apply Sandi Metz's four rules for writing maintainable object-oriented code to Ruby codebases. These rules are heuristics that encourage good design practices, making code easier to understand, test, and maintain.

The Four Rules

  1. Classes can be no longer than 100 lines of code
  2. Methods can be no longer than 5 lines of code
  3. Pass no more than 4 parameters into a method
  4. Controllers can instantiate only one object

When to Use This Skill

Apply this skill when:

  • Users explicitly request applying Sandi Metz's rules
  • Reviewing Ruby code for maintainability and code quality
  • Refactoring existing Ruby code to improve design
Related skills
Installs
12
GitHub Stars
302
First Seen
Mar 25, 2026