Ruby patterns for keyword arguments, pattern matching, Data, frozen strings, 4.0 changes, unsafe input. Load before any edit to a .rb file, Gemfile, or gemspec, however small, and for Ruby questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ruby Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-ruby-patterns)
---
name: ruby-patterns
description: Ruby patterns for keyword arguments, pattern matching, Data, frozen strings, 4.0 changes, unsafe input. Load before any edit to a .rb file, Gemfile, or gemspec, however small, and for Ruby questions.
---
# Ruby patterns
Default assumption: Ruby 4.0, per the Ruby NEWS. 4.0 and 3.4 are in normal maintenance, 3.3 is in legacy maintenance until its expected end of life on 2027-03-31, and 3.2 is end of life.
A row applies when the project's Ruby version is at least the row's version.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing Ruby code, or raising the Ruby version | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing Ruby code | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing a value object, equality, a `case/in`, a frozen string, or a Gemfile `source` | [reference/practices.md](reference/practices.md) |
| Configuring RuboCop, Standard, or bundler-audit | [reference/tooling.md](reference/tooling.md) |