ruby-idioms

Refactor outdated Ruby code patterns to modern idioms across app directories.

7|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/slbug/claude-ruby-grape-rails --skill ruby-idioms-slbug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruby-idioms
Source: https://github.com/slbug/claude-ruby-grape-rails/tree/main/plugins/ruby-grape-rails/skills/ruby-idioms
Command: npx skills add https://github.com/slbug/claude-ruby-grape-rails --skill ruby-idioms-slbug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Many Ruby codebases still rely on outdated patterns, excessive metaprogramming, and global state, causing bugs, performance regressions, and maintenance headaches.

Core Features & Use Cases

  • Guidance on modern idioms: value objects, service objects, result objects, and adapter pattern.
  • Pattern matching and it keyword: concise data destructuring examples.
  • Performance tips: enable YJIT, leverage frozen strings, and use efficient collection handling.
  • Structured error handling: standardized error classes and retry strategies.
  • Applicable paths: scans files in app/errors, types, contracts, events, clients, and Chewy directories across the project.

Quick Start

Invoke the ruby-idioms skill to analyze and improve my Ruby service object code.

Frequently Asked Questions about ruby-idioms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor outdated Ruby code to modern idioms?

Refactor outdated Ruby code by adopting modern idioms like value objects, service objects, and result objects to replace excessive metaprogramming and global state for maintainable code.

What is the best way to use pattern matching in Ruby?

Pattern matching in Ruby enables concise data destructuring using the `it` keyword, allowing you to extract and bind values from complex data structures cleanly and efficiently.

How do I enable YJIT and frozen strings for Ruby performance?

Improve Ruby performance by enforcing YJIT activation and leveraging frozen string usage, alongside efficient collection handling, to prevent performance regressions in your codebase.

Does this Ruby refactoring approach work with specific app directories?

Yes, this approach scans files in app directories including errors, types, contracts, events, clients, and Chewy definitions across your project to identify outdated patterns.

How do I implement structured error handling in Ruby?

Implement structured error handling in Ruby by using standardized error classes and retry strategies to replace outdated patterns and reduce maintenance headaches and bugs.