
Ruby Refactor
This is a comprehensive Ruby refactoring reference with 45 community-sourced rules organized by impact level, from critical structure changes down to naming conventions. You'd reach for it when extracting bloated methods, flattening nested conditionals, or modernizing code to Ruby 3.x patterns. The prioritization system is smart: it ranks guard clauses and method extraction as critical while keeping stylistic stuff like endless methods further down. Each rule links to detailed examples with before/after code. What I like is the focus on practical smells like feature envy and primitive obsession rather than abstract principles. It's essentially a decision tree for "I know this code is bad, but what specific refactoring should I apply?"
- skills.sh installs
- 299
- GitHub stars
- 222
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pproenca/dot-skills --skill ruby-refactor --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Structure & Decomposition | CRITICAL | struct- |
| 2 | Conditional Simplification | CRITICAL | cond- |
| 3 | Coupling & Dependencies | HIGH | couple- |
| 4 | Ruby Idioms | HIGH | idiom- |
| 5 | Data & Value Objects | MEDIUM-HIGH | data- |
| 6 | Design Patterns | MEDIUM | pattern- |
| 7 | Modern Ruby 3.x | MEDIUM | modern- |
| 8 | Naming & Readability | LOW-MEDIUM | name- |
Quick Reference
1. Structure & Decomposition (CRITICAL)
Sponsors
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Code Review & Quality, Design & UI/UX
- First seen
- Jun 3, 2026
More from pproenca/dot-skills
All 100- Ios Xcode298
- Restful Hateoas298
- Rails Dev293
- Ios Ui Refactor291
- Ruby Optimise286
- Swift Optimise285
- Ios Testing281
- Swift Refactor281
- Dev Rfc279
- Swift Ui Architect273
- Ios Taste272
- Ios Storyboard270
- Rails Design System270
- Swift Data268
- Ios Chaos Monkey267
- Ios Navigation267
- Nginx C Module Perf260
- React Native Elements258
- Effect Ts257
- Bug Review256
- Nginx C Module Debug253
- Rails Application Ui Blocks251
- Rust Write Tests248
- Rust Implement246