Ruby has a distinct culture around idiomatic code. The language is designed so that well-written Ruby reads almost like English — concise, expressive, and elegant. AI-generated Ruby often misses this: the code works, but it reads like Ruby written by someone who learned Python first. A CLAUDE.md file at your repo root tells your AI assistant what "good Ruby" looks like for your project. Here are 13 rules that matter most. Rule 1: Ruby version and runtime environment Ruby version: 3.3+. Use YJIT in production ( `RUBY_YJIT_ENABLE=1` or `--yjit` ). Bundler manages all gems — no manual `require` for anything in the Gemfile. `.ruby-version` file is authoritative for local development. Enter fullscreen mode Exit fullscreen mode Ruby 3.x has significant performance improvements and new syntax. AI often generates code compatible with Ruby 2.x. Specifying the version prevents outdated patterns like proc { } where -> {} (lambda) is cleaner, or missing pattern matching syntax available since 3.0.…