Agent skill

rails-stack-profiles

Detects and applies Rails stack profiles (omakase, service-oriented, api-first) based on project conventions. Use when planning architecture, making design decisions, or when the recommended approach depends on the project's stack choices (Solid Queue vs Sidekiq, concerns vs service objects, Minitest vs RSpec, fixtures vs factories). NOT for implementation details — delegates to domain-specific skills.

Stars 4
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/ag0os/rails-dev-plugin/tree/main/skills/rails-stack-profiles

SKILL.md

Rails Stack Profiles

Detect the project's architectural profile before recommending patterns. Different Rails codebases follow different conventions — recommendations must match the project, not a single opinionated default.

See profiles.md for detailed profile definitions, detection signals, and per-profile recommendations.

Three Profiles

Profile Philosophy Key Markers
omakase Rails defaults, convention over gems Solid Queue, Minitest, fixtures, concerns, has_secure_password
service-oriented Explicit layers, extracted business logic Sidekiq, RSpec, FactoryBot, app/services/, Devise, Pundit
api-first Headless JSON backend ActionController::API, serializers, JWT, no app/views/

Detection Checklist

Run these checks against the project to determine its profile:

1. Read Gemfile for key gems
2. Check directory structure (app/services/, spec/ vs test/, app/views/)
3. Check config/database.yml adapter
4. Check test setup (RSpec vs Minitest, factories vs fixtures)
5. Check job backend (config/queue.yml vs config/sidekiq.yml)
6. Check auth approach (Devise, has_secure_password, JWT)

Quick Detection Matrix

Signal Omakase Service-Oriented API-First
gem "sidekiq" X X
gem "solid_queue" X
gem "rspec-rails" X X
test/ directory X
gem "factory_bot" X X
test/fixtures/ X
app/services/ exists X
gem "devise" X
has_secure_password X
gem "pundit" X
gem "jbuilder" X
gem "alba" or gem "blueprinter" X X
ActionController::API base X
app/views/ has ERB files X X
gem "jwt" X
config/solid_cache.yml X

Profile Mixing

Most real projects are hybrids. A project can be:

  • Omakase core with a service-oriented billing module
  • Service-oriented with an api-first namespace (/api/v1/)
  • Omakase that adopted RSpec early but kept everything else default

When signals conflict: weight the project's dominant pattern. A project with app/services/ containing 50 classes is service-oriented even if it uses Minitest.

How Profiles Affect Recommendations

Decision Point Omakase Service-Oriented API-First
Where does business logic go? Model methods + concerns Service objects Service objects or interactors
Fat controller fix Extract to model/concern Extract to service object Extract to service object
God model fix Extract concerns Extract service objects + value objects Extract query/command objects
Callbacks for side effects? Acceptable if simple Avoid — use services Avoid — use services
Testing framework Minitest RSpec RSpec
Test data Fixtures FactoryBot FactoryBot
Job backend Solid Queue Sidekiq Sidekiq or Solid Queue
Auth has_secure_password Devise JWT or token-based
Authorization Controller-level checks Pundit policies Token scopes or Pundit
Frontend Hotwire (Turbo + Stimulus) Hotwire (Turbo + Stimulus) None — JSON responses
Serialization Jbuilder or to_json Alba, Blueprinter Alba, Blueprinter, jsonapi-serializer
Real-time Solid Cable + Turbo Streams ActionCable + Turbo Streams WebSockets or SSE
Cache backend Solid Cache Redis Redis
DB default SQLite (dev), PostgreSQL (prod) PostgreSQL PostgreSQL

Output Format

When reporting a detected profile:

## Stack Profile: [omakase | service-oriented | api-first | hybrid]

**Detected from:**
- [signal]: [evidence]
- [signal]: [evidence]

**Hybrid notes:** [if applicable — which parts diverge and why]

**Recommendations will follow [profile] conventions.**

Expand your agent's capabilities with these related and highly-rated skills.

ag0os/rails-dev-plugin

rails-caching-patterns

Caching patterns for Rails applications including fragment caching, low-level caching, HTTP caching, Russian doll caching, and cache invalidation strategies. Automatically invoked when working with Rails.cache, cache stores, stale?/fresh_when, fragment caching, cache keys, or performance optimization through caching. Triggers on "cache", "caching", "Rails.cache", "fragment cache", "Russian doll", "stale?", "fresh_when", "cache key", "cache store", "Redis cache", "Solid Cache", "memcached", "ETag", "cache invalidation", "cache bust". NOT for CDN configuration (use rails-devops-patterns) or database query optimization (use rails-model-patterns).

4 0
Explore
ag0os/rails-dev-plugin

rails-graphql-patterns

Analyzes and recommends GraphQL patterns for Rails using graphql-ruby including schema design, types, resolvers, mutations, subscriptions, DataLoader, and query complexity. Use when building GraphQL APIs, defining types, writing mutations, optimizing N+1 queries, or structuring app/graphql. NOT for REST API controllers, ActiveRecord queries outside GraphQL, or Turbo Stream responses.

4 0
Explore
ag0os/rails-dev-plugin

ruby-object-design

Automatically invoked when making decisions about Ruby code structure and organization. Triggers on "class or module", "should this be a class", "struct vs class", "PORO", "data object", "design pattern", "class vs module", "when to use class", "module vs class", "stateless class", "value object", "data container", "object factory", "extend self", "singleton class". Provides guidance on choosing the right Ruby construct (class, module, Struct, Data, Hash). NOT for code smell identification or refactoring (use ruby-refactoring) or Rails-specific framework patterns.

4 0
Explore
ag0os/rails-dev-plugin

rails-views-patterns

Analyzes Rails view templates, partials, layouts, helpers, and form patterns for best practices. Use when reviewing ERB templates, improving view performance with fragment caching, fixing form helpers, organizing partials, adding accessibility attributes, or evaluating collection rendering. NOT for Stimulus/Turbo logic (use hotwire-patterns), controller concerns, or API-only responses.

4 0
Explore
ag0os/rails-dev-plugin

rails-architecture-patterns

Provides architectural planning, design decisions, and coordination guidance for Rails applications. Use when planning new features, choosing between design approaches (STI vs polymorphic, service vs concern, monolith vs engine), evaluating system architecture, or deciding which domain skill or agent to delegate to. NOT for implementation details within a single domain (use the domain-specific skill instead).

4 0
Explore
ag0os/rails-dev-plugin

rails-mailer-patterns

Action Mailer patterns for Rails applications. Automatically invoked when working with email delivery, mailer classes, email templates, mailer previews, interceptors, or delivery configuration. Triggers on "mailer", "email", "ActionMailer", "deliver_later", "deliver_now", "mail template", "email preview", "SMTP", "SendGrid", "Postmark", "notification email". NOT for push notifications, SMS, or in-app messaging.

4 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results