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 logistics company needs a service to calculate shipping costs for packages. The business rules are: standard shipping is free above a weight threshold, express shipping has a per-kg surcharge with a minimum charge, and overnight shipping has a flat rate plus a fuel surcharge percentage. The team is expanding the shipping options and the code currently has magic numbers scattered throughout — the same weight limit appears in four different places, and the surcharge percentage is buried as a literal in a conditional. This has led to bugs when one occurrence was updated and another was not.
Additionally, the team needs a standalone validator that checks whether a package's dimensions are within allowed shipping limits. This validator will be used by both the shipping calculator and a separate customs declaration service, so it should be self-contained and stateless.
Your task is to write the Ruby service layer for the shipping cost calculator. The rules should be cleanly encoded so that changing a business parameter requires updating exactly one place. Document the public API so that future developers understand the accepted parameters and return values without reading the implementation.
Produce the following files:
app/services/<module>/shipping_cost_calculator.rb — main calculator serviceapp/services/<module>/package_validator.rb — the stateless package dimension validatorspec/services/<mirrored_path>/shipping_cost_calculator_spec.rb — specs for standard, express, and overnight shipping, and for packages above/below the weight thresholdDo not create a full Rails application. Use plain Ruby with realistic values. The focus should be on the structure, documentation style, and how business rules are encoded — not whether the application runs end-to-end.
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