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
A network of animal shelters shares animals between locations. When a transfer is approved, the system must: (1) decrement the animal count at the source shelter, (2) increment the count at the target shelter, and (3) record a transfer log entry — all as a single atomic operation. If any step fails, the others should be rolled back. Additionally, the team needs to look up recent transfers for a given animal by tag number, and that query must be safe against injection since tag numbers are user-supplied strings from an external partner API.
Your task is to write a Ruby service for processing an animal transfer between two shelters. The service should accept source shelter ID, target shelter ID, and the animal's tag number. It should perform the multi-step update atomically, and also expose a method for querying transfer history by tag number using a raw SQL approach for performance reasons.
Produce the following files:
app/services/<module>/<service>.rb — the transfer servicespec/services/<mirrored_path>_spec.rb — specs covering: successful transfer, source shelter not found, database failure mid-transfer (transaction rollback scenario)Use stub comments where real ActiveRecord calls would occur (e.g. # TODO: Shelter.find_by!(id: ...)) so the service structure is clear without a running database.
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