pproenca avatar

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-code

Installs 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

PriorityCategoryImpactPrefix
1Structure & DecompositionCRITICALstruct-
2Conditional SimplificationCRITICALcond-
3Coupling & DependenciesHIGHcouple-
4Ruby IdiomsHIGHidiom-
5Data & Value ObjectsMEDIUM-HIGHdata-
6Design PatternsMEDIUMpattern-
7Modern Ruby 3.xMEDIUMmodern-
8Naming & ReadabilityLOW-MEDIUMname-

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
1ersinkoc avatarproject-architectersinkoc/project-architectDocumentation-first project planning that produces implementation-ready blueprints and single-shot coding agent prompts. Generates 4 interconnected docs — SPECI261skills.sh installs
2davila7 avatarweb-quality-auditdavila7/claude-code-templatesComprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run ligh232skills.sh installs
3rysweet avatarpr-review-assistantrysweet/amplihackPhilosophy-aware PR reviews checking alignment with amplihack principles. Use when reviewing PRs to ensure ruthless simplicity, modular design, and zero-BS impl225skills.sh installs
4jamesrochabrun avataranthropic-architectjamesrochabrun/skillsDetermine the best Anthropic architecture for your project by analyzing requirements and recommending the optimal combination of Skills, Agents, Prompts, and SD216skills.sh installs
5jezweb avatargemini-peer-reviewjezweb/claude-skillsGet a second opinion from Gemini on code, architecture, debugging, or security. Uses direct Gemini API calls — no CLI dependencies. Trigger with 'ask gemini', '200skills.sh installs
6personamanagmentlayer avatarcode-review-expertpersonamanagmentlayer/pclExpert-level code review focusing on quality, security, performance, and maintainability. Use this skill for conducting thorough code reviews, identifying issue189skills.sh installs