Skillshub ruby-refactor

Community Ruby Refactoring Best Practices

install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/ruby-refactor" ~/.claude/skills/comeonoliver-skillshub-ruby-refactor && rm -rf "$T"
manifest: skills/pproenca/dot-skills/ruby-refactor/SKILL.md
source content

Community Ruby Refactoring Best Practices

Comprehensive refactoring guide for Ruby applications, maintained by the community. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Refactoring Ruby code to reduce complexity and improve design
  • Extracting methods, classes, or value objects from large units
  • Simplifying complex conditionals and deep nesting
  • Reducing coupling between classes and modules
  • Adopting idiomatic Ruby patterns and modern Ruby 3.x features

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Structure & DecompositionCRITICAL
struct-
2Conditional SimplificationCRITICAL
cond-
3Coupling & DependenciesHIGH
couple-
4Ruby IdiomsHIGH
idiom-
5Data & Value ObjectsMEDIUM-HIGH
data-
6Design PatternsMEDIUM
pattern-
7Modern Ruby 3.xMEDIUM
modern-
8Naming & ReadabilityLOW-MEDIUM
name-

Quick Reference

1. Structure & Decomposition (CRITICAL)

2. Conditional Simplification (CRITICAL)

3. Coupling & Dependencies (HIGH)

4. Ruby Idioms (HIGH)

5. Data & Value Objects (MEDIUM-HIGH)

6. Design Patterns (MEDIUM)

7. Modern Ruby 3.x (MEDIUM)

8. Naming & Readability (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information