rails-dev

Applies opinionated Rails conventions for models, controllers, migrations, tests, and background jobs.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/Peterson-Benhame/agent-skills --skill rails-dev-peterson-benhame
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-dev
Source: https://github.com/Peterson-Benhame/agent-skills/tree/main/packages/skills-catalog/skills/%28development%29/rails-dev
Command: npx skills add https://github.com/Peterson-Benhame/agent-skills --skill rails-dev-peterson-benhame

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Rails codebases drift into inconsistent patterns: fat controllers, boolean state flags, ad-hoc error handling, and dependency bloat. This Skill enforces a coherent set of opinionated Rails conventions so every model, controller, migration, and test follows the same philosophy before any code is written or reviewed. ## Core Features & Use Cases - Convention enforcement across the stack: Rich models, CRUD-everything controllers, state-as-records instead of booleans, concerns for shared behavior, and schema-level invariants. - 24 topic references: Dedicated guidance for models, validators, auth, migrations, Minitest with fixtures, Turbo, Stimulus, Solid Queue jobs, caching, mailers, webhooks, logging, and error handling. - Minimal-dependency philosophy: Minitest over RSpec, fixtures over factories, Solid Queue/Cache/Cable over Redis, and no Devise, Pundit, or service objects. - Use Case: When designing a new feature like closing a card, the Skill directs you to model it as a Closure record with a Cards::ClosuresController (create/destroy) rather than adding a closed boolean and a custom post :close action. ## Quick Start Ask the agent to design or review any Rails model, controller, migration, or test and it will load the matching convention references before writing code.

Frequently Asked Questions about rails-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Rails controllers without custom actions?

Map every behavior to one of the seven REST actions by naming a new resource. Instead of `post :close` on cards, create a singular `resource :closure` routed to `Cards::ClosuresController` where create closes and destroy reopens.

How should I model state like closed or published in Rails?

Model state as records, not booleans. A `Closure` model with `has_one :closure` gives you timestamps, the acting user, and queryable history, while scopes like `where.missing(:closure)` replace flag checks.

Does this Rails approach work with RSpec or FactoryBot?

No, the conventions deliberately exclude RSpec, FactoryBot, Devise, and Pundit. Testing uses Minitest with fixtures at roughly a 1:1 test-to-code ratio, and authentication is built in with sessions and magic links.

Should Rails background jobs contain business logic?

No, a job's perform method only calls a `_now` method on a model, keeping logic testable and runnable synchronously. Solid Queue is the database-backed backend, with `retry_on` for transient errors and `discard_on` for permanent ones.

When should I not use these Rails conventions?

Do not apply them to non-Rails backends such as NestJS or to general architecture discussions. The conventions are scoped strictly to Rails code, from schema design through controllers, views, jobs, and tests.