ruby-patterns
Ruby Patterns covers essential idioms and architectural approaches for Rails and Ruby development. Learn blocks, procs, lambdas, modules, metaprogramming techniques, pattern matching, and enumerable chains alongside testing strategies with RSpec, error handling patterns, and project structure conventions for gems and Rails apps.
Ruby Patterns teaches Rails and Ruby idioms including blocks, metaprogramming, ActiveRecord, testing, and error handling.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-27
Ruby Patterns teaches Rails and Ruby idioms including blocks, metaprogramming, ActiveRecord, testing, and error handling. Ruby Patterns covers essential idioms and architectural approaches for Rails and Ruby development. Learn blocks, procs, lambdas, modules, metaprogramming techniques, pattern matching, and enumerable chains alongside testing strategies with RSpec, error handling patterns, and project structure conventions for gems and Rails apps.
Use it when
- ruby-patterns explains Rails project structure best practices including conventional directory layouts, gem organization.
- ruby-patterns covers rails testing with rspec factorybot through comprehensive examples.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Similar skills
Install
softspark/ai-toolkit/ruby-patterns · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What does ruby-patterns cover for blocks, procs, and lambdas?
ruby-patterns teaches blocks, procs, and lambdas patterns as core Ruby idioms. The skill covers how to use blocks for iteration and callbacks, understand proc objects and their binding behavior, distinguish lambdas from procs through argument strictness and return semantics, and apply these patterns effectively in Rails and gem development. These foundational constructs underpin much of Ruby's functional programming style.
How does ruby-patterns help with Rails project structure?
ruby-patterns explains Rails project structure best practices including conventional directory layouts, gem organization, service layer architecture, and concern modules for code reuse. You'll learn how to structure both Rails applications and custom gems following community conventions, organize business logic into services, and use mixins and concerns to keep controllers and models clean and maintainable.
What testing strategies does ruby-patterns teach with RSpec?
ruby-patterns covers rails testing with rspec factorybot through comprehensive examples. The skill teaches RSpec fundamentals, mocking and stubbing with doubles, factory setup with FactoryBot, API testing with VCR and WebMock, and integration testing patterns. You'll learn how to write fast, isolated unit tests and realistic integration tests for Rails applications.
How does ruby-patterns address error handling and retry logic?
ruby-patterns teaches ruby error handling rescue exceptions and retry logic backoff exponential strategies. You'll learn custom exception hierarchies, rescue clauses and exception handling patterns, implementing exponential backoff for retries, and designing resilient systems. The skill covers both synchronous error handling and async patterns relevant to background job processing.
What advanced Ruby features does ruby-patterns include?
ruby-patterns covers ruby metaprogramming method_missing, pattern matching ruby 3, and enumerable chaining idioms. You'll explore metaprogramming techniques for dynamic method definition, pattern matching syntax for elegant control flow, advanced enumerable chains for functional data transformation, frozen string literals for performance, and type checking with Sorbet. These advanced features enable elegant, maintainable code.
Does ruby-patterns cover dependency management and linting?
ruby-patterns includes gemfile bundler dependency management and rubocop linting configuration. You'll learn Gemfile syntax, version constraints, bundler workflows, and gem dependency resolution. The skill also covers RuboCop setup for consistent code style, configuration best practices, and integration into development workflows to maintain code quality across teams.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Ruby Patterns
Project Structure
Gem Layout
my_gem/
├── lib/
│ ├── my_gem.rb # Entry point, require sub-files
│ └── my_gem/
│ ├── version.rb
│ ├── configuration.rb
│ ├── client.rb
│ └── errors.rb
├── spec/
│ ├── spec_helper.rb
│ ├── my_gem/
│ │ └── client_spec.rb
│ └── fixtures/
├── bin/
│ └── console # IRB with gem loaded
├── sig/ # RBS type signatures
├── Gemfile
├── Rakefile
├── my_gem.gemspec
├── .rubocop.yml
└── .ruby-version
Rails Standard Structure
``` app/ ├── controllers/ │ ├── application_controller.rb │ └── api/v1/ │ └── users_controller.rb ├── models/ │ ├── application_record.rb │ ├── user.rb │ └── concerns/ │ └── searchable.rb ├── services/ │ └── users/ │ ├── create_service.rb │ └── import_service.rb ├── jobs/ │ └── user_sync_job.rb ├── mailers/ ├──
(truncated - see the full file via the links below)
File tree — 1 file
app/skills/ruby-patterns/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Learn Ruby and Rails code patterns, idioms, and best practices”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Master Ruby language conventions and modern features (3.x+) for writing clean, performant code. This skill covers error handling strategies, pattern matching, and Ruby idioms like guard clauses and safe navigation. Use it when writing pure Ruby, optimizing performance, or establishing team conventions—separate skills handle Rails, design patterns, testing, and style.
This skill teaches core Ruby patterns including classes, modules, inheritance, and mixins alongside functional programming with blocks, procs, and lambdas. It covers enumerable operations, lazy evaluation, and metaprogramming techniques like method_missing and dynamic method definition, plus error handling strategies and RSpec testing.
Rspec Coder streamlines Ruby testing by automatically generating RSpec test files and cases tailored to your codebase. Skip manual test scaffolding and focus on test logic while the skill handles boilerplate creation and structure.
Ruby Patterns equips you with creational, structural, and behavioral design patterns alongside modern Ruby idioms and metaprogramming techniques. Reference common shortcuts for conditionals, enumerables, and strings, then dive into factory, builder, decorator, strategy, and observer patterns with working examples. Use it to refactor for clarity and apply proven architectural approaches.
cpp-rules provides comprehensive C++ development standards drawn from ai-toolkit's rule library. It covers naming conventions, modern language features, memory management with smart pointers, and framework guidance for CMake, Boost, Qt, and gRPC. The rules emphasize RAII patterns, error handling strategies, concurrency practices, and design patterns to maintain code quality and security across C++ projects.
PHP Rules enforces coding standards covering style, frameworks, patterns, security, and testing. It guides PSR-12 compliance, modern PHP 8.1+ syntax, Laravel and Symfony conventions, Eloquent and Doctrine patterns, and error handling best practices.
More skills java-rules (Apache-2.0)