ruby-guide
Installation
SKILL.md
Ruby Guide
Applies to: Ruby 3.2+, Gems, APIs, CLIs, Web Applications
Core Principles
- Least Surprise: Code should behave as readers expect; prefer clarity over cleverness
- Everything is an Object: Leverage Ruby's object model; primitives are objects with methods
- Convention Over Configuration: Follow established naming and structure conventions
- Duck Typing with Confidence: Rely on behavior, not class checks; validate at boundaries
- Blocks Everywhere: Use blocks for resource management, iteration, and DSLs
Guardrails
Version & Dependencies
- Use Ruby 3.2+ with
# frozen_string_literal: truein every.rbfile - Manage dependencies with Bundler (
Gemfile+Gemfile.lock) - Pin gem versions with pessimistic operator:
gem "rails", "~> 7.1"
Related skills