By mcrundo
Guides Claude Code through layered architecture patterns for Ruby on Rails applications, covering abstraction layer extraction, anti-pattern detection, and progressive refactoring from standard MVC to the Extended Rails Way.
Extract an operation model callback to an event-driven subscriber using ActiveSupport::Notifications.
Extract UI-specific validations and callbacks from a model/controller into a form object.
Extract inline authorization logic from controllers into a '<Model>Policy' object with standardized constructor and predicate methods.
Extract presentation logic from a model into a properly structured presenter object.
Extract a complex query method or scope from a model into a query object following The Extended Rails Way conventions.
Use this agent when a developer wants to progressively introduce abstraction layers into an existing Rails codebase. Helps with: sequencing a multi-step adoption plan, deciding which layers to introduce first using churn×complexity analysis, recommending extraction order (callbacks → service objects → query objects → form objects → presenters → policy objects → notifications → view components → configuration objects), respecting the gradual-refactoring principle (localize first, then improve), and avoiding premature abstraction. Applies The Extended Rails Way philosophy from Layered Design for Ruby on Rails Applications.
Use this agent when you want a code review of Rails code against The Extended Rails Way's anti-patterns and layer rules. Checks for: God object models, fat controllers, callback accumulation, concerns as code splitters, presentation logic in models, leaking decorators, direct third-party injection, ENV hell, Rails.env checks in application code, instance variable leakage in partials, authorization logic in wrong layers, anemic models, N+1 authorization, raw SQL stitching, over-scoping, notification delivery in wrong layers, puts-based logging, vendor-specific exception APIs, and more. Provides specific remediation guidance pointing to the relevant pattern references.
Uses power tools
Uses Bash, Write, or Edit tools
Runs pre-commands
Contains inline bash commands via ! syntax
Bash prerequisite issue
Uses bash pre-commands but Bash not in allowed tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code plugin based on Layered Design for Ruby on Rails Applications by Vladimir Dementyev.
Guides Claude Code through layered architecture patterns for Ruby on Rails applications, covering abstraction layer extraction, anti-pattern detection, and progressive refactoring from standard MVC to the Extended Rails Way.
claude plugin add owner/repo
Replace owner/repo with the GitHub repository after publishing with franklin push.
| Command | Purpose |
|---|---|
/layered-rails:extract-form-object | Step-by-step command to extract a form object from model/controller code: |
/layered-rails:extract-query-object | Step-by-step command to extract a query object from a model or controller: |
/layered-rails:extract-presenter | Step-by-step command to extract presentation logic from a model into a presenter: |
/layered-rails:extract-policy-object | Step-by-step command to extract authorization logic into a policy object: |
/layered-rails:extract-callback-to-event | Step-by-step command to extract an operation model callback to an event-driven subscriber: |
/layered-rails:introduce-config-object | Step-by-step command to introduce an Anyway Config configuration object for a service: |
/layered-rails:extract-view-component | Step-by-step command to extract a UI element into a view component: |
/layered-rails:identify-god-objects | Command to identify God object refactoring candidates: |
/layered-rails:spec-test | Applies the Specification Test technique to a given class or file. |
16 reference files organized into:
references/anti-patterns/ — catalogreferences/core/ — active-record-models, layered-architecture-principles, rails-way-extendedreferences/patterns/ — adapters-and-wrappers, authorization-layer, configuration-objects, filter-objects, form-objects, notifications-layer, presenters-and-serializers, query-objects-and-repositories, service-objects, view-componentsreferences/topics/ — callbacks-concerns-globals, infrastructure-and-cross-layersGenerated by Franklin from Layered Design for Ruby on Rails Applications.
npx claudepluginhub mcrundo/layered-railsReview and design Rails applications using sustainability principles from 'Sustainable Web Development with Ruby on Rails' by David Bryant Copeland
Design and review Rails applications using layered architecture principles from 'Layered Design for Ruby on Rails Applications'
Design and review Rails applications using Vanilla Rails philosophy from 37signals/Basecamp. Emphasizes thin controllers, rich domain models, and avoiding unnecessary service layers.
Agent that simplifies and refines Ruby on Rails code following 37signals patterns and the One Person Framework philosophy
Rails conventions for consistent architecture + implementation in real codebases
A collection of skills for Rails development and consulting, with an emphasis on learning, communication, and client success
ActiveRecord patterns for Rails models and queries