simplifying-ruby-code

Installation
SKILL.md

Simplifying Ruby Code

Core Principle

Prefer simple data structures (Hash, Array, Struct, Data) and pure functions over unnecessary classes and abstractions.

MANDATORY: Identify whether code is a decision (pure logic) or effect (I/O). Keep them separate. See writing-code skill.

When to Use

  • Command objects with single call method and no state
  • Value objects that just wrap data without behavior
  • Service classes that could be module functions
  • Custom classes for simple data (coordinates, ranges, tuples)
  • Deep inheritance where composition would work
  • Missing Ruby protocols (to_h, to_a, each)
  • Tests require extensive mocking (indicates mixed concerns)

Over-Engineering Patterns

Installs
1
GitHub Stars
12
First Seen
Apr 1, 2026
simplifying-ruby-code — bostonaholic/dotfiles