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
Use this skill when documenting Ruby classes and public methods with YARD.
Core principle: Every public class and public method has YARD documentation so the contract is clear and tooling can generate API docs.
YARD is not optional polish. After any feature or fix that adds or changes
public Ruby API (classes, modules, public methods):
1. Add or update YARD on those surfaces before the work is considered done.
2. Do not skip YARD because "the PR is small" or "I'll do it later."
3. All YARD text (descriptions, examples, tags) must be in English unless
the user explicitly requests another language.
Task lists from generate-tasks MUST include explicit YARD sub-tasks after
implementation. If you only wrote specs + code, stop and document before PR.| Scope | Rule |
|---|---|
| Classes | One-line summary; optional @since if version matters |
| Public methods | @param, @option for hash params, @return, @raise when applicable; @example required on .call — show realistic usage AND the expected return value (e.g., result[:success] # => true) |
Public initialize | Add @param for constructor inputs when initialization is part of the public contract |
| Exceptions | One @raise tag per exception class — list each separately |
| Private methods | Document only if behavior is non-obvious; same tag rules |
# Responsible for validating and executing animal transfers between shelters.
# @since 1.2.0
module AnimalTransfers
class TransferService# Performs the transfer and returns a standardized response.
# @param params [Hash] Transfer parameters
# @option params [Hash] :source_shelter Shelter hash with :shelter_id
# @option params [Hash] :target_shelter Target shelter with :shelter_id
# @return [Hash] Result with :success and :response keys
def self.call(params)Document @raise for every exception a method can raise — even if the method rescues it internally:
# Processes the billing update for the given plan.
# @param plan_id [Integer] ID of the target plan
# @raise [InvalidPlanError] when the plan does not exist or is inactive
# @raise [PaymentGatewayError] when the payment provider rejects the charge
# @return [Hash] Result with :success and :response keys
def self.call(plan_id:)Prefer at least one @example on .call or the main public entry point of the object.
# @example Basic usage
# result = TransferService.call(source_shelter: { shelter_id: 1 }, target_shelter: { shelter_id: 2 })
# result[:success] # => trueGood:
# Validates source and target shelters and returns the first validation error.
# @param source_id [Integer] Source shelter ID
# @param target_id [Integer] Target shelter ID
# @return [nil, String] nil if valid, error message otherwise
def self.validate_shelters!(source_id, target_id)Bad:
# Validates stuff. (Too vague; no @param/@return)
def self.validate_shelters!(source_id, target_id)Bad (wrong language):
# Valida los refugios origen y destino. (Must be in English)
def self.validate_shelters!(source_id, target_id)| Pitfall | What to do |
|---|---|
| Documenting only the class, not public methods | Callers need param types and return shape for every public method |
Skipping @option for hash params | Without it, consumers don't know valid keys or types |
Only one @raise for multiple exceptions | List EVERY exception type — one @raise per class, even if rescued internally |
| YARD text in a language other than English | Write in English unless the user explicitly requests otherwise |
Run validation before considering documentation complete:
yard stats --list-undocyard docFor advanced tags (@abstract, @deprecated, @api private, @yield, @overload) see ADVANCED_TAGS.md.
| Skill | When to chain |
|---|---|
| ruby-service-objects | When implementing or documenting service objects |
| ruby-api-client-integration | When documenting API client layers (Auth, Client, Fetcher, Builder) |
| rails-engine-docs | When documenting engine public API or extension points |
| rails-code-review | When reviewing that public interfaces are documented |
| generate-tasks | Generated task lists include YARD parents after implementation |
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