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
A project management Rails application allows teams to collaborate on Projects. A security audit found serious authorization gaps: the current implementation only checks current_user.present? before allowing destructive operations — meaning any authenticated user can delete any project, not just their own. The auditors flagged this as a critical vulnerability.
The User model has an admin boolean attribute. The Project model has a owner_id foreign key linking to the user who created it. Business rules are: project owners may read, update, and destroy their own projects; admins may perform any action on any project; authenticated non-owners may read projects but not modify or destroy them; unauthenticated visitors cannot access projects at all.
Your job is to replace the existing flawed authorization with a proper implementation using Pundit, and deliver comprehensive specs that prove every role and edge case is covered.
The following files are provided as inputs. Extract them before beginning.
=============== FILE: app/controllers/projects_controller.rb =============== class ProjectsController < ApplicationController before_action :authenticate_user! before_action :set_project, only: [:show, :update, :destroy]
def index @projects = Project.all end
def show render json: @project end
def create if current_user.present? @project = current_user.projects.build(project_params) if @project.save render json: @project, status: :created else render json: @project.errors, status: :unprocessable_entity end else render json: { error: 'Unauthorized' }, status: :unauthorized end end
def update if current_user.present? if @project.update(project_params) render json: @project else render json: @project.errors, status: :unprocessable_entity end else render json: { error: 'Unauthorized' }, status: :unauthorized end end
def destroy if current_user.present? @project.destroy head :no_content else render json: { error: 'Unauthorized' }, status: :unauthorized end end
private
def set_project @project = Project.find(params[:id]) end
def project_params params.require(:project).permit(:name, :description) end end
Produce the following files:
app/policies/project_policy.rb — the corrected Pundit policyapp/controllers/projects_controller.rb — the refactored controllerspec/policies/project_policy_spec.rb — comprehensive policy specspec/requests/projects_spec.rb — request spec exercising all roles against the most sensitive actions (update and destroy)implementation_notes.md — a brief description of what was wrong with the original code and how it was fixeddocs
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