Curated library of 39 AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, orchestration, and workflows. Includes 5 callable workflow skills (rails-tdd-loop, rails-review-flow, rails-setup-flow, rails-quality-flow, rails-engines-flow) for complete development cycles. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation.
95
98%
Does it follow best practices?
Impact
95%
1.20xAverage score across 35 eval scenarios
Passed
No known issues
The operations team at Thornfield SaaS needs an admin endpoint to browse and export user accounts. They frequently need to view all users of a particular status (active, suspended, pending), and want to sort the list by different fields depending on what they are investigating — sometimes by sign-up date, sometimes by last activity, sometimes by email. The column and sort direction currently come directly from the request URL, because the original developer prioritized speed of delivery over everything else.
A recent internal security audit flagged this endpoint as high risk. The auditor's report noted that because query parameters flow directly into the database query, a crafted request could expose arbitrary table data or crash the query parser. The endpoint must be hardened before the next penetration test, which is scheduled in two weeks.
Implement a UserSearch service class that the controller can call with raw request parameters. The class must safely filter by user status and support column-based sorting from the parameters, while resisting injection attempts.
Create the following file:
app/services/user_search.rb — the UserSearch service classThe class should:
status, sort_by, and sort_direction parameters (which originate from HTTP request params)email, created_at, last_sign_in_atThe following files are provided as inputs. Extract them before beginning.
=============== FILE: db/schema.rb (excerpt) =============== ActiveRecord::Schema[7.1].define(version: 2024_03_01_000001) do create_table "users", force: :cascade do |t| t.string "email", null: false t.string "status", null: false, default: "pending" t.datetime "last_sign_in_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "encrypted_password" t.index ["email"], name: "index_users_on_email", unique: true t.index ["status"], name: "index_users_on_status" end end
=============== FILE: app/models/user.rb ===============
class User < ApplicationRecord STATUSES = %w[pending active suspended].freeze
validates :email, presence: true, uniqueness: true validates :status, inclusion: { in: STATUSES }
scope :by_status, ->(status) { where(status: status) if status.present? } end
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
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
mcp_server
skills
api
api-rest-collection
rails-graphql-best-practices
code-quality
rails-architecture-review
rails-code-conventions
rails-code-review
rails-review-response
rails-security-review
rails-stack-conventions
assets
snippets
refactor-safely
context
rails-context-engineering
rails-project-onboarding
ddd
ddd-boundaries-review
ddd-rails-modeling
ddd-ubiquitous-language
engines
rails-engine-compatibility
rails-engine-docs
rails-engine-extraction
rails-engine-installers
rails-engine-release
rails-engine-reviewer
rails-engine-testing
infrastructure
rails-api-versioning
rails-background-jobs
rails-database-seeding
rails-frontend-hotwire
rails-migration-safety
rails-performance-optimization
orchestration
rails-skills-orchestrator
patterns
ruby-service-objects
strategy-factory-null-calculator
yard-documentation
planning
create-prd
generate-tasks
ticket-planning
testing
rails-bug-triage
rails-tdd-slices
rspec-best-practices
rspec-service-testing