Curated library of AI agent skills for Ruby on Rails development. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and workflow automation.
98
99%
Does it follow best practices?
Impact
98%
1.38xAverage score across 26 eval scenarios
Passed
No known issues
When reviewing Rails code, analyze it against the following areas. When writing new code, follow rails-code-conventions (principles, logging, path rules) and rails-stack-conventions (stack-specific UI and Rails patterns).
Core principle: Review early, review often. Self-review before PR. Re-review after significant changes.
After green tests + linters pass + YARD + doc updates:
1. Self-review the full branch diff using the Review Order below.
2. Fix Critical items; resolve or ticket Suggestion items.
3. Only then open the PR.
generate-tasks must include a "Code review before merge" task.| Area | Key Checks |
|---|---|
| Routing | RESTful, shallow nesting, named routes, constraints |
| Controllers | Skinny, strong params, before_action scoping |
| Models | Structure order, inverse_of, enum values, scopes over callbacks |
| Queries | N+1 prevention, exists? over present?, find_each for batches |
| Migrations | Reversible, indexed, foreign keys, concurrent indexes |
| Security | Strong params, parameterized queries, no html_safe abuse |
| Caching | Fragment caching, nested caching, ETags |
| Jobs | Idempotent, retriable, appropriate backend |
Work through the diff in this sequence. See REVIEW_CHECKLIST.md for the full per-area check criteria.
Configuration → Routing → Controllers → Views → Models → Associations → Queries → Migrations → Validations → I18n → Sessions → Security → Caching → Jobs → Tests
Critical checks to spot immediately:
# N+1 — one query per record in a collection
posts.each { |post| post.author.name } # Bad
posts.includes(:author).each { |post| post.author.name } # Good
# Privilege escalation via permit!
params.require(:user).permit! # Bad — never in production
params.require(:user).permit(:name, :email) # GoodAdditional Critical patterns:
Use these levels when reporting findings:
| Level | Meaning | Action |
|---|---|---|
| Critical | Security risk, data loss, or crash | Block merge — must fix before approval; mandatory re-review after fix |
| Suggestion | Convention violation or performance concern | Fix in this PR; create a tracked follow-up ticket only if the fix requires significant redesign |
| Nice to have | Style improvement, minor optimization | Optional — author's discretion; no follow-up required |
When critical or significant findings were addressed, re-review before merging:
Review → Categorize findings (Critical / Suggestion / Nice to have)
→ Developer addresses findings
→ Critical findings fixed? → Re-review the diff
→ Suggestion items resolved or ticketed?
→ All green → Approve PRRe-review triggers:
Skip re-review only when: All findings were Nice to have or single-line fixes with zero logic change.
| Pitfall | What to do |
|---|---|
| "Skinny controller" means move to model | Move to services — avoid fat models |
| Skipping N+1 check because "it's just one query" | One query per record in a collection is N+1 |
permit! for convenience | Privilege escalation risk — always whitelist attributes |
| Index added in same migration as column | On large tables, separate migration with algorithm: :concurrent |
| Callbacks for business logic | Callbacks are for persistence-level concerns, not orchestration |
| Approving after Critical fix without re-reviewing | A fix can introduce new issues — re-review is mandatory |
| Controller action > ~15 lines | Extract to service — controllers orchestrate, not implement |
| Model with > 3 callbacks | Extract to service or observer |
html_safe/raw on user-provided content | XSS risk — escape or sanitize first |
| Migration combining schema change and data backfill | Split: schema migration first, then data migration |
| Skill | When to chain |
|---|---|
| rails-review-response | When the developer receives feedback and must decide what to implement |
| rails-architecture-review | When review reveals structural problems |
| rails-security-review | When review reveals security concerns |
| rails-migration-safety | When reviewing migrations on large tables |
| refactor-safely | When review suggests refactoring |
api-rest-collection
create-prd
ddd-boundaries-review
ddd-rails-modeling
ddd-ubiquitous-language
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
generate-tasks
mcp_server
rails-architecture-review
rails-background-jobs
rails-bug-triage
rails-code-conventions
rails-code-review
rails-engine-compatibility
rails-engine-docs
rails-engine-extraction
rails-engine-installers
rails-engine-release
rails-engine-reviewer
rails-engine-testing
rails-graphql-best-practices
rails-migration-safety
rails-review-response
rails-security-review
rails-skills-orchestrator
rails-stack-conventions
rails-tdd-slices
refactor-safely
rspec-best-practices
rspec-service-testing
ruby-service-objects
strategy-factory-null-calculator
ticket-planning
yard-documentation