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 marketing platform sends bulk email campaigns to user segments. The Campaigns::DeliveryService service object coordinates the process: it retrieves the campaign and user segment from the database, then calls an external email provider (SendgridClient) to dispatch the emails. A junior developer wrote the initial implementation but left it entirely untested. The service is going into production next week and the team needs full spec coverage before the release.
You have been asked to write RSpec specs for this service along with the FactoryBot factory definitions needed to support the tests. The service needs to be thoroughly tested, including the success path, failures from the email provider, and record-not-found scenarios for a missing campaign or segment.
The following file is provided. Extract it before beginning.
=============== FILE: app/services/campaigns/delivery_service.rb ===============
module Campaigns class DeliveryService def self.call(campaign_id:, segment_id:) new(campaign_id: campaign_id, segment_id: segment_id).call end
def initialize(campaign_id:, segment_id:)
@campaign_id = campaign_id
@segment_id = segment_id
end
def call
campaign = Campaign.find(@campaign_id)
segment = UserSegment.find(@segment_id)
recipients = segment.users
result = SendgridClient.deliver(
to: recipients.map(&:email),
subject: campaign.subject,
body: campaign.body
)
if result[:success]
{ success: true, response: { delivered_count: recipients.count } }
else
{ success: false, response: { error: result[:error] } }
end
rescue ActiveRecord::RecordNotFound => e
{ success: false, response: { error: e.message } }
endend end
Produce:
spec/services/campaigns/delivery_service_spec.rb — comprehensive RSpec spec for the servicespec/factories/campaigns.rb — FactoryBot factory definitions needed to support the specsThe spec must cover: successful email delivery, a delivery failure returned by the email provider, and a not-found error for a missing campaign or segment.
For the FactoryBot factories, define only what the tests actually need — the factories should be lean and focused on the attributes the specs depend on.
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