npx skillsauth add arbazkhan971/godmode railsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/godmode:rails, "rails app", "ruby on rails"Rails version: <7.2.x or 8.0.x>
Ruby version: <3.3.x>
Architecture: Full-stack (Hotwire)|API-only|Hybrid
Database: PostgreSQL (ALWAYS for production)
Jobs: Sidekiq|Solid Queue|Good Job
Real-time: Action Cable|Turbo Streams|None
Auth: Devise|has_secure_password|Rails 8 built-in
Assets: Propshaft + Import Maps|esbuild|Vite
cat Gemfile | grep -E "rails|ruby"
cat config/database.yml | grep adapter
IF Rails 8: prefer built-in generators (auth, jobs). IF < heavy JS: Import Maps (no build step). IF heavy JS: esbuild or Vite.
| Convention | Rule |
| Model | Singular CamelCase (Order) |
| Table | Plural snake_case (orders) |
| Controller | Plural CamelCase (OrdersController) |
| File | snake_case (order.rb) |
| Foreign key | <model>_id (customer_id) |
| Join table | Alphabetical (labels_orders) |
| Timestamps | created_at, updated_at (auto) |
NEVER violate naming conventions (framework superpower). Extract to services when model > 200 LOC.
| Pattern | When |
| includes(:assoc) | Default N+1 prevention |
| preload(:assoc) | Separate queries (large joins) |
| eager_load(:assoc) | Need WHERE on association |
| select(:col1,:col2) | Reduce data transfer |
| find_each(batch:1000) | Process large datasets |
| counter_cache: true | Avoid COUNT queries |
ALWAYS use includes for associations in views. ALWAYS enable strict_loading in development. NEVER .all.each for large datasets — use find_each. IF foreign key exists: MUST have database index.
| Need | Use |
| SPA-like navigation | Turbo Drive (automatic) |
| Update one section | Turbo Frames |
| Real-time broadcast | Turbo Streams |
| Toggle/dropdown/count | Stimulus controller |
| Full SPA (React/Vue) | Rails API-only + SPA |
IF < 90% of interactivity: Hotwire handles it. IF complex client state: Rails API + React/Vue.
| Processor | When |
| Solid Queue (Rails 8) | Default, DB-backed, simple |
| Sidekiq | High throughput, Redis-backed |
| Good Job | PostgreSQL-backed, no Redis |
Jobs MUST be idempotent (safe to retry). NEVER process > 200ms tasks inline. ALWAYS set retry limits with exponential backoff.
| Layer | Approach |
| Models | RSpec + FactoryBot + Shoulda |
| Requests | RSpec request specs (not controller) |
| System | Capybara (critical flows only) |
| Jobs | ActiveJob::TestHelper |
Use build over create when DB not needed.
Use traits for common variations.
IF coverage < 60%: write tests before refactoring.
[ ] Rails conventions followed
[ ] N+1 eliminated (strict_loading enabled)
[ ] Foreign keys indexed
[ ] Jobs idempotent
[ ] Tests pass (RSpec green)
[ ] Credentials managed (Rails credentials)
[ ] No default_scope, no logic in callbacks
# Rails development and testing
rspec --format progress
rails db:migrate:status
bundle audit check
Append .godmode/rails.tsv:
timestamp action files models migrations tests status
KEEP if: tests pass, no new N+1, migrations reversible.
DISCARD if: tests fail, Bullet detects N+1,
migration irreversible.
STOP when FIRST of:
- bin/rails test passes with zero failures
- No pending migrations, all FKs indexed
- No default_scope, no callback logic
- Bullet reports zero N+1 alerts
On failure: git reset --hard HEAD~1. Never pause.
<!-- tier-3 -->| Failure | Action | |--|--| | Tests fail | db:test:prepare, check fixtures, --seed | | Migration fails | Add down method, use strong_migrations | | N+1 detected | Add includes at query site, Bullet verify | | Bundle audit vuln | Update gem or document + pin version |
development
Web performance optimization. Lighthouse, bundle analysis, code splitting, image optimization, critical CSS, fonts, service workers, CDN.
development
Webhook design, delivery, retry, HMAC verification, event subscriptions, dead letter queues.
development
Vue.js mastery. Composition API, Pinia, Vue Router, Nuxt SSR/SSG, Vite optimization, testing.
development
Evidence gate. Run command, read full output, confirm or deny claim. No trust, only proof.