npx claudepluginhub arbazkhan971/godmodeThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
/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.
| 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 |