ruby-idioms
Installation
SKILL.md
Ruby Idioms
Iron Laws
- Prefer simple objects over metaprogramming
- Raise exceptions for failures; return values for expected branches
- Keep mutation narrow and obvious
- Wrap third-party APIs behind project-owned adapters
- Avoid global state and hidden thread-local coupling
- Consider
itfor simple single-argument blocks when clarity permits - Prefer pattern matching for complex data destructuring
- Enable YJIT in production (Ruby 3.2+; Rails 7.2+ enables by default on Ruby 3.3+)