[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FEGRP2F66JXEBGEYTXANM3":3,"skill-same:01M6FEGRP2F66JXEBGEYTXANM3":48},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M6FEGRP2F66JXEBGEYTXANM3","ruby-refactor",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fpproenca\u002Fdot-skills\u002Fruby-refactor\u002FSKILL.md",[],[18,19,20],"refactor","ruby","ruby refactor","2026-11-10 10:12:30",false,"# Community Ruby Refactoring Best Practices\n\nComprehensive 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.\n\n## When to Apply\n\nReference these guidelines when:\n- Refactoring Ruby code to reduce complexity and improve design\n- Extracting methods, classes, or value objects from large units\n- Simplifying complex conditionals and deep nesting\n- Reducing coupling between classes and modules\n- Adopting idiomatic Ruby patterns and modern Ruby 3.x features\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Prefix |\n|----------|----------|--------|--------|\n| 1 | Structure & Decomposition | CRITICAL | `struct-` |\n| 2 | Conditional Simplification | CRITICAL | `cond-` |\n| 3 | Coupling & Dependencies | HIGH | `couple-` |\n| 4 | Ruby Idioms | HIGH | `idiom-` |\n| 5 | Data & Value Objects | MEDIUM-HIGH | `data-` |\n| 6 | Design Patterns | MEDIUM | `pattern-` |\n| 7 | Modern Ruby 3.x | MEDIUM | `modern-` |\n| 8 | Naming & Readability | LOW-MEDIUM | `name-` |\n\n## Quick Reference\n\n### 1. Structure & Decomposition (CRITICAL)\n\n- [`struct-extract-method`](references\u002Fstruct-extract-method.md) - Extract Long Methods into Focused Units\n- [`struct-extract-class`](references\u002Fstruct-extract-class.md) - Extract Class for Single Responsibility\n- [`struct-parameter-object`](references\u002Fstruct-parameter-object.md) - Introduce Parameter Object for Long Signatures\n- [`struct-compose-method`](references\u002Fstruct-compose-method.md) - Compose Methods at Single Abstraction Level\n- [`struct-replace-method-with-object`](references\u002Fstruct-replace-method-with-object.md) - Replace Complex Method with Method Object\n- [`struct-single-responsibility`](references\u002Fstruct-single-responsibility.md) - One Reason to Change per Class\n- [`struct-flatten-deep-nesting`](references\u002Fstruct-flatten-deep-nesting.md) - Flatten Deep Nesting with Early Extraction\n\n### 2. Conditional Simplification (CRITICAL)\n\n- [`cond-guard-clauses`](references\u002Fcond-guard-clauses.md) - Replace Nested Conditionals with Guard Clauses\n- [`cond-decompose-conditional`](references\u002Fcond-decompose-conditional.md) - Extract Complex Booleans into Named Predicates\n- [`cond-replace-with-polymorphism`](references\u002Fcond-replace-with-polymorphism.md) - Replace case\u002Fwhen with Polymorphism\n- [`cond-null-object`](references\u002Fcond-null-object.md) - Replace nil Checks with Null Object\n- [`cond-pattern-matching`](references\u002Fcond-pattern-matching.md) - Use Pattern Matching for Structural Conditions\n- [`cond-consolidate-duplicates`](references\u002Fcond-consolidate-duplicates.md) - Consolidate Duplicate Conditional Fragments\n\n### 3. Coupling & Dependencies (HIGH)\n\n- [`couple-law-of-demeter`](references\u002Fcouple-law-of-demeter.md) - Enforce Law of Demeter with Delegation\n- [`couple-feature-envy`](references\u002Fcouple-feature-envy.md) - Move Method to Resolve Feature Envy\n- [`couple-dependency-injection`](references\u002Fcouple-dependency-injection.md) - Inject Dependencies via Constructor Defaults\n- [`couple-composition-over-inheritance`](references\u002Fcouple-composition-over-inheritance.md) - Replace Mixin with Composed Object\n- [`couple-tell-dont-ask`](references\u002Fcouple-tell-dont-ask.md) - Tell Objects What to Do, Don't Query Their State\n- [`couple-avoid-class-methods-domain`](references\u002Fcouple-avoid-class-methods-domain.md) - Avoid Class Methods in Domain Logic\n\n### 4. Ruby Idioms (HIGH)\n\n- [`idiom-prefer-enumerable`](references\u002Fidiom-prefer-enumerable.md) - Use map\u002Fselect\u002Freject Over each with Accumulator\n- [`idiom-keyword-arguments`](references\u002Fidiom-keyword-arguments.md) - Use Keyword Arguments for Clarity\n- [`idiom-duck-typing`](references\u002Fidiom-duck-typing.md) - Use respond_to? Over is_a? for Type Checking\n- [`idiom-predicate-methods`](references\u002Fidiom-predicate-methods.md) - Name Boolean Methods with ? Suffix\n- [`idiom-respond-to-missing`](references\u002Fidiom-respond-to-missing.md) - Always Pair method_missing with respond_to_missing?\n- [`idiom-block-yield`](references\u002Fidiom-block-yield.md) - Use yield Over block.call for Simple Blocks\n- [`idiom-implicit-return`](references\u002Fidiom-implicit-return.md) - Omit Explicit return for Last Expression\n\n### 5. Data & Value Objects (MEDIUM-HIGH)\n\n- [`data-value-object`](references\u002Fdata-value-object.md) - Replace Primitive Obsession with Value Objects\n- [`data-define-immutable`](references\u002Fdata-define-immutable.md) - Use Data.define for Immutable Value Objects\n- [`data-encapsulate-collection`](references\u002Fdata-encapsulate-collection.md) - Encapsulate Collections Behind Domain Methods\n- [`data-replace-data-clump`](references\u002Fdata-replace-data-clump.md) - Replace Data Clumps with Grouped Objects\n- [`data-separate-query-command`](references\u002Fdata-separate-query-command.md) - Separate Query Methods from Command Methods\n\n### 6. Design Patterns (MEDIUM)\n\n- [`pattern-strategy`](references\u002Fpattern-strategy.md) - Extract Algorithm Variations into Strategy Objects\n- [`pattern-factory`](references\u002Fpattern-factory.md) - Use Factory Method to Abstract Object Creation\n- [`pattern-template-method`](references\u002Fpattern-template-method.md) - Define Algorithm Skeleton with Template Method\n- [`pattern-decorator`](references\u002Fpattern-decorator.md) - Wrap Objects with Decorator for Added Behavior\n- [`pattern-null-object-protocol`](references\u002Fpattern-null-object-protocol.md) - Implement Null Object with Full Protocol\n\n### 7. Modern Ruby 3.x (MEDIUM)\n\n- [`modern-pattern-matching`](references\u002Fmodern-pattern-matching.md) - Use case\u002Fin for Structural Pattern Matching\n- [`modern-deconstruct-keys`](references\u002Fmodern-deconstruct-keys.md) - Implement deconstruct_keys for Custom Pattern Matching\n- [`modern-endless-methods`](references\u002Fmodern-endless-methods.md) - Use Endless Method Definition for Simple Methods\n- [`modern-hash-pattern-guard`](references\u002Fmodern-hash-pattern-guard.md) - Use Pattern Matching with Guard Clauses\n- [`modern-rightward-assignment`](references\u002Fmodern-rightward-assignment.md) - Use Rightward Assignment for Pipeline Expressions\n\n### 8. Naming & Readability (LOW-MEDIUM)\n\n- [`name-intention-revealing`](references\u002Fname-intention-revealing.md) - Use Intention-Revealing Names\n- [`name-consistent-vocabulary`](references\u002Fname-consistent-vocabulary.md) - Use One Word per Concept Across Codebase\n- [`name-avoid-abbreviations`](references\u002Fname-avoid-abbreviations.md) - Spell Out Names Except Universal Abbreviations\n- [`name-rename-to-remove-comments`](references\u002Fname-rename-to-remove-comments.md) - Rename to Eliminate Need for Comments\n\n## How to Use\n\nRead individual reference files for detailed explanations and code examples:\n\n- [Section definitions](references\u002F_sections.md) - Category structure and impact levels\n- [Rule template](assets\u002Ftemplates\u002F_template.md) - Template for adding new rules\n\n## Reference Files\n\n| File | Description |\n|------|-------------|\n| [references\u002F_sections.md](references\u002F_sections.md) | Category definitions and ordering |\n| [assets\u002Ftemplates\u002F_template.md](assets\u002Ftemplates\u002F_template.md) | Template for new rules |\n| [metadata.json](metadata.json) | Version and reference information |\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fpproenca\u002Fdot-skills\u002Fruby-refactor",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill ruby-refactor",{"tool":40,"command":41},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill ruby-refactor",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill ruby-refactor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fpproenca\u002Fdot-skills\u002Fruby-refactor\u002FSKILL.md",true,[],[49,58,67,76,82,88],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[55,56,57],"model","model hierarchy","model hierarchy skill",{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[64,65,66],"MCP","zoom","zoom mcp",{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[73,74,75,65],"sdk","zoom apps sdk","apps",{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[78],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[84],{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[90]]