/major-ai-skills:railsfrom major-ai-skills
Ship Rails 8 apps with Active Record migrations, strong parameters, credentials/ENV secrets, Solid Queue workers, and Puma deploy patterns agents routinely miss.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Rails is convention-over-configuration: Router → Controller → Active Record → View/JSON. Schema changes ship only via migrations. Secrets live in credentials (RAILS_MASTER_KEY) or ENV—never plaintext in git. Rails 8 defaults production Active Job to Solid Queue (DB-backed); agents either run bin/jobs or enable the Puma solid_queue plugin with SOLID_QUEUE_IN_PUMA. Pair primary DB with @postgresql (or SQLite for small apps) and optional @redis only when you choose Redis adapters/cache deliberately.
┌─────────────────────────────────────────────────────────────┐
│ Rails request + job topology │
│ │
│ Client → reverse proxy / LB (@nginx) │
│ → Puma (web) │
│ → Router → Controller (strong params) │
│ ├── Active Record → primary DB (@postgresql) │
│ └── render JSON / HTML (Hotwire optional) │
│ │
│ Active Job │
│ ├── adapter: solid_queue (Rails 8 prod default) │
│ ├── queue DB (database.yml :queue) │
│ └── bin/jobs OR Puma plugin (SOLID_QUEUE_IN_PUMA) │
│ │
│ Secrets: credentials.yml.enc + RAILS_MASTER_KEY / ENV │
└─────────────────────────────────────────────────────────────┘
Use when
includes).Do not use when
@express / @spring-boot / @fastapi.config/master.key, raw credentials YAML, or skip strong params → refuse.@postgresql.bin/rails g model|migration|controller) then edit; keep folder conventions.params.require(…).permit(…); never mass-assign raw params.disable_ddl_transaction! + concurrent indexes on Postgres when needed; no hand-editing prod schema.Rails.application.credentials / ENV; set RAILS_MASTER_KEY in deploy—never invent or commit master keys.includes / preload / eager_load on list endpoints; add Bullet or query assertions in tests.bin/jobs (or Puma plugin) in prod.bin/rails db:prepare, assets/Propshaft/importmap as configured, RAILS_ENV=production with SECRET_KEY_BASE or credentials present.Controller + model:
# app/controllers/items_controller.rb
class ItemsController < ApplicationController
def create
item = Item.new(item_params)
if item.save
OrderMailer.receipt(item).deliver_later
render json: item, status: :created
else
render json: { errors: item.errors.full_messages }, status: :unprocessable_content
end
end
private
def item_params
params.require(:item).permit(:sku, :qty)
end
end
# app/models/item.rb
class Item < ApplicationRecord
validates :sku, presence: true, length: { maximum: 64 }
validates :qty, numericality: { greater_than_or_equal_to: 0 }
end
config/database.yml (Postgres + queue DB — passwords from ENV):
production:
primary: &primary_production
adapter: postgresql
encoding: unicode
url: <%= ENV["DATABASE_URL"] %>
queue:
<<: *primary_production
url: <%= ENV.fetch("QUEUE_DATABASE_URL", ENV["DATABASE_URL"]) %>
migrations_paths: db/queue_migrate
config/environments/production.rb (Rails 8 style):
config.active_job.queue_adapter = :solid_queue
config.solid_queue.connects_to = { database: { writing: :queue } }
config/puma.rb (small deploys):
plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
Commands:
bin/rails db:migrate
bin/rails db:prepare # ensures queue schema too
bin/rails credentials:edit # needs local master.key — do not commit
RAILS_ENV=production bin/rails assets:precompile
RAILS_ENV=production bin/rails s # or puma -C config/puma.rb
# dedicated worker: bin/jobs
# tests: bin/rails test
N+1 fix:
# bad: Item.all.each { |i| i.account.name }
Item.includes(:account).limit(100)
| Signature | Likely cause | Fix path |
|---|---|---|
ActiveSupport::MessageEncryptor::InvalidMessage / can't decrypt | Wrong/missing RAILS_MASTER_KEY | Set key from secure store matching credentials env |
| Jobs enqueued but never run | No bin/jobs / Solid Queue plugin; queue DB missing | Start workers; db:prepare on queue DB |
| Puma boot fails with Solid Queue in dev | Plugin always on | Gate with SOLID_QUEUE_IN_PUMA |
ActiveRecord::PendingMigrationError | Migrate not run | db:migrate / db:prepare in release |
| Mass-assignment / unexpected attrs | Skipped strong params | permit allowlist |
| Slow index actions | N+1 | includes / counter caches / indexes (@postgresql) |
| PG lock timeout on migrate | Long index in transaction | Concurrent index migration pattern |
| Credentials edit opens empty/fails | Missing config/master.key | Load key from secrets manager locally—never invent |
belongs_to required by default—set optional: true deliberately.@redis topology explicitly.@docker images: pass RAILS_MASTER_KEY, run migrations as a release step, separate worker process when jobs are heavy.config.filter_parameters.RAILS_MASTER_KEY, queue DB URL, or worker topology is missing.@postgresql — primary store, indexes, concurrent migrations@redis — optional cache/Sidekiq when not on Solid defaults@docker — Puma + jobs containers, persistent volumes for SQLite/storage@nginx — TLS and upstream to Puma@graphql-apis — GraphQL on Rails when REST is insufficientMANDATORY: Strong params on every write. Migrations only for schema. Never invent or commit
RAILS_MASTER_KEY/ credentials plaintext. Configure Solid Queue (or documented adapter) with a running worker (bin/jobsor Puma plugin). Fix N+1 on list endpoints. Validate withdb:prepare+ boot underRAILS_ENV=productionsettings before declaring deploy success.
database.yml + bin/jobs or SOLID_QUEUE_IN_PUMAWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job