rails-controller
π―Skillfrom thibautbaissac/rails_ai_agents
Generates idiomatic Rails controller code following best practices, with a focus on clean, concise CRUD actions and RESTful routing conventions.
Installation
npx skills add https://github.com/thibautbaissac/rails_ai_agents --skill rails-controllerSkill Details
Overview
# Rails AI Suite (Agents, Commands, Skills)
A curated collection of specialized AI agents for Rails development, organized into four complementary components:
- 37signals Agents - Inspired by DHH's "vanilla Rails" philosophy from the Fizzy codebase
- Standard Rails Agents - Modern Rails patterns with service objects, query objects, and presenters
- Feature Specification Agents - High-level planning and feature management
- Skills Library - Reusable knowledge modules for specific Rails patterns and technologies
Built using insights from [GitHub's analysis of 2,500+ agent.md files](https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/) and [37signals' Fizzy codebase analysis](https://gist.github.com/marckohlbrugge/d363fb90c89f71bd0c816d24d7642aca).
Why This Exists
Most AI coding assistants lack deep Rails context. This suite provides three distinct architectural philosophies:
- π― 37signals Style: Rich models, concerns, CRUD-everything approach
- ποΈ Standard Rails: Service objects, query objects, presenters, form objects
- π Feature Planning: Requirements analysis and implementation orchestration
- π Skills Library: Deep knowledge modules for Rails patterns and technologies
Choose the style that fits your team's philosophy, or mix and match as needed.
---
37signals Agents
Inspired by the [37signals/DHH coding style guide](https://gist.github.com/marckohlbrugge/d363fb90c89f71bd0c816d24d7642aca) extracted from the Fizzy codebase. These agents follow the "vanilla Rails is plenty" philosophy.
Core Philosophy
- Rich models over service objects - Business logic lives in models
- Everything is CRUD - New resource over new action
- State as records - Not boolean columns (e.g.,
Closuremodel instead ofclosed: true) - Concerns for composition - Horizontal behavior sharing (e.g.,
Closeable,Watchable) - Minimal dependencies - Build it yourself before reaching for gems
- Database-backed everything - No Redis, Solid Queue/Cache/Cable
Available Agents
@37signals/model_agent- Rich models with concerns (Closeable, Watchable, etc.)@37signals/crud_agent- Enforce everything-is-CRUD routing@37signals/concerns_agent- Model & controller concerns for composition@37signals/state_records_agent- State as records pattern (not booleans)@37signals/auth_agent- Custom passwordless authentication (~150 LOC)@37signals/migration_agent- Simple, pragmatic migrations@37signals/test_agent- Minitest with fixtures@37signals/turbo_agent- Hotwire/Turbo patterns@37signals/stimulus_agent- Focused Stimulus controllers@37signals/events_agent- Event tracking system@37signals/multi_tenant_agent- URL-based multi-tenancy@37signals/jobs_agent- Solid Queue background jobs@37signals/mailer_agent- Simple mailers@37signals/caching_agent- Fragment & HTTP caching@37signals/api_agent- REST API with JSON format@37signals/refactoring_agent- Incremental refactoring@37signals/review_agent- Code review for consistency@37signals/implement_agent- General implementation agent
37signals Workflow Example
```
- @37signals/crud_agent design routes for card closures (resource, not boolean)
- @37signals/state_records_agent create Closure model
- @37signals/concerns_agent add Closeable concern to Card model
- @37signals/test_agent write Minitest tests
- @37signals/implement_agent implement the feature
- @37signals/review_agent check for 37signals conventions
```
Key Patterns
State as Records:
```ruby
# β Not This
class Card < ApplicationRecord
# closed: boolean
scope :closed, -> { where(closed: true) }
end
# β This
class Closure < ApplicationRecord
belongs_to :card, touch: true
belongs_to :user
end
class Card < ApplicationRecord
i