layered-rails
About layered-rails
Write, refactor, and review Rails code using layered architecture principles from “Layered Design for Ruby on Rails Applications”. Use when writing or refactoring Rails code—models, controllers, services, jobs, mailers, policies, forms, query objects, presenters, view components, state machines, serializers, or AI/LLM features—to apply correct patterns and avoid layer violations; and when reviewing Rails code, PRs, or diffs for layer violations, fat controllers/models, anemic models, callback misuse, god objects, or specification-test failures. Triggers on “layered design”, “architecture layers”, “abstraction layer”, “specification test”, “layer violation”, “fat controller/model”, “god object”, “anemic model”, “extract service/callback/policy/concern”, “service object”, “form/policy/query/value object”, “presenter”, “view component”, “state machine”, “Active Delivery”, “callback scoring”, “Rails refactor/review”, “Rails patterns/best practices”, “archspec”, or “architecture linter/enforcement”.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / evilmartians.com --skill layered-railsAfter installing, type/layered-railsin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
examples/authorization-to-policy.mdcallbacks-to-service.mdcomplex-input-to-form-object.mdcurrent-from-model.mdgod-object-decomposition.mdimplicit-to-explicit-state-machine.mdquery-to-query-object.mdview-logic-to-presenter.mdreferences/anti-patterns/callbacks.mdconcerns.mdhelpers.mdjobs.mdlayer-violations.mdservice-objects.mdtesting.mdreferences/core/architecture-layers.mdextraction-signals.mdspecification-test.mdreferences/gems/action-policy.mdactive-agent.mdactive-delivery.mdactive-job-performs.mdalba.mdanyway-config.mdarchspec.mdrubanok.mdview-component.mdworkflow.mdreferences/patterns/collaborator-objects.mdconcerns.md