rails

Audit Rails 7.x and 8.x apps for N+1 queries, unsafe migrations, and failing tests.

26|8|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/arbazkhan971/godmode --skill rails-arbazkhan971
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails
Source: https://github.com/arbazkhan971/godmode/tree/main/skills/rails
Command: npx skills add https://github.com/arbazkhan971/godmode --skill rails-arbazkhan971

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps teams eliminate common Rails pitfalls like N+1 queries, unsafe migrations, inconsistent conventions, flaky background jobs, and insufficient test coverage so applications become reliable and production-ready.

Core Features & Use Cases

  • Enforce Rails conventions and code organization to reduce technical debt and improve maintainability.
  • Detect and remediate ActiveRecord N+1 issues, ensure foreign keys are indexed, and recommend includes/strict_loading for performance.
  • Validate background job idempotency, reversible migrations, and RSpec test suites for safe autonomous changes and rollbacks.

Quick Start

Run the rails skill to audit your Rails repository for convention violations, N+1 queries, irreversible migrations, and failing tests and produce an actionable remediation plan.

Frequently Asked Questions about rails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix ActiveRecord N+1 queries in Ruby on Rails?

Fix ActiveRecord N+1 queries by applying eager loading methods like includes and strict_loading to optimize database access. The Rails skill audits your application to detect these violations and recommends specific ActiveRecord optimizations to improve query performance.

How do I ensure background jobs in Sidekiq are idempotent?

Ensure Sidekiq background jobs are idempotent by validating job logic for safe autonomous retries and rollbacks. This skill audits Sidekiq configurations to prevent flaky jobs and confirm safe execution during concurrent processing.

How do I write reversible migrations in Rails?

Write reversible migrations by defining both up and down methods or using reversible blocks to ensure safe database rollbacks. The skill validates migration safety, enforces PostgreSQL production usage, and checks for missing foreign key indexes.

Does this Rails audit support Hotwire integration and API-only projects?

Yes, this Rails audit supports Hotwire integration and API-only projects running Rails 7.x and 8.x. It evaluates full-stack and API-only setups for convention violations, Hotwire configuration, and background job safety.

How do I verify RSpec test suites for Rails convention violations?

Verify RSpec test suites by running the skill to audit test coverage and enforce Rails conventions. It checks RSpec and FactoryBot configurations to catch failing tests and ensure consistent code organization.

What is the best way to prevent unsafe database migrations in Rails?

Prevent unsafe migrations by enforcing reversible migration blocks, indexing foreign keys, and validating PostgreSQL compatibility. The skill audits migration files to eliminate irreversible schema changes and reduce production deployment risks.