design-patterns-ruby

Implement all 23 GoF design patterns with idiomatic Ruby code.

2|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/damacus/agent-skills --skill design-patterns-ruby
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-patterns-ruby
Source: https://github.com/damacus/agent-skills/tree/main/skills/design-patterns-ruby
Command: npx skills add https://github.com/damacus/agent-skills --skill design-patterns-ruby

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This collection provides idiomatic Ruby implementations of the Gang of Four design patterns to help software engineers design robust, decoupled architectures and reason about pattern applicability in Ruby projects.

Core Features & Use Cases

  • Full GoF coverage: Idiomatic Ruby implementations for Factory Method, Singleton, Adapter, Strategy, Observer, and more.
  • Practical guidance: Includes usage notes on selecting and applying patterns in real-world Ruby projects.
  • Educational examples: Concrete, runnable examples and explanations aligned with Ruby conventions.

Quick Start

Run a GoF pattern example from the provided Ruby src directory to observe an idiomatic Ruby implementation in action.

Frequently Asked Questions about design-patterns-ruby

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

FAQPage Schema
How do I implement Gang of Four design patterns in idiomatic Ruby?

Idiomatic Ruby implementations of all 23 Gang of Four design patterns are provided to guide software engineers through OO design and refactoring. The runnable code examples demonstrate patterns using Ruby conventions and include usage notes.

When should I use GoF patterns in a Ruby project?

You use GoF patterns in Ruby projects when you need to design robust, decoupled architectures. The provided selection guidance and usage notes help reason about pattern applicability during architecture discussions and refactoring.

What's the best way to learn Strategy or Observer patterns in Ruby?

The best way to learn Strategy or Observer patterns in Ruby is by running the provided concrete, runnable examples from the src directory. These demonstrate idiomatic Ruby implementations with aligned explanations for each pattern.

Do I need any external gems or dependencies to use these Ruby design patterns?

No external gems or dependencies are required. The Skill provides self-contained, idiomatic Ruby implementations of the design patterns that adhere to standard Ruby conventions without external libraries.

How do Ruby idioms change traditional GoF software design implementations?

Ruby idioms simplify traditional GoF software design by leveraging dynamic language features like blocks and modules, reducing boilerplate. The implementations demonstrate these idioms to achieve decoupled architectures naturally aligned with Ruby conventions.

Why use design patterns for object-oriented refactoring in Ruby?

Design patterns are used for object-oriented refactoring in Ruby to establish decoupled architectures and solve common structural problems. The provided pattern selection guidance helps engineers apply the correct structural solutions during refactoring.