What problem does it solve? Ruby and Rails codebases accumulate design friction—long methods, callback-heavy models, hidden N+1 queries, and duplicated business rules—that makes future changes risky and expensive. This Skill finds genuine refactoring opportunities, validates them against real change pressure, and produces a safe, sequenced plan of small behavior-preserving transformations instead of vague rewrite suggestions. ## Core Features & Use Cases - Fowler-grounded assessment: Detects code smells using Fowler's vocabulary, validates each candidate against evidence, counterevidence, and behavioral risk, then maps findings to named refactorings like Extract Function, Split Phase, and Replace Conditional with Polymorphism. - Bundled heuristic scanner: Ships a dependency-free Ruby script that scans repositories for long methods, deep nesting, flag arguments, callback chains, default_scope, bulk bypass APIs, and queries inside loops, with Markdown and JSON output. - Read-only by default with implementation mode: Produces a ranked P1/P2/P3 plan with verification steps by default, and only edits code when explicitly asked, keeping refactoring strictly separate from bug fixes, optimizations, and migrations. - Use Case: Ask the agent to review app/models and app/controllers in a Rails app; receive a ranked refactoring plan with file locations, behavioral boundaries to preserve, step-by-step transformation sequences, and a verification plan—without any code being changed. ## Quick Start Ask the agent to review your Rails app's models and controllers for refactoring opportunities using the Fowler Ruby/Rails refactoring skill and return a ranked behavior-preserving plan without editing code.