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.
73
91%
Does it follow best practices?
Impact
—
No eval scenarios have been run
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. All documentation content (descriptions, examples in comments) must be written in English.
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."
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 for non-obvious usage |
| Language | All YARD text (descriptions, examples) in English |
| Private methods | Document only if behavior is non-obvious; same tag rules |
All generated YARD content MUST be in English: class descriptions, method summaries,
@param/@return descriptions, @example blocks, and any other inline documentation.
Do not generate documentation in another language unless the user explicitly requests it.@example when the method has non-obvious usage, edge cases, or important options.# 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)# Fetches the token; caches it for subsequent calls.
# @raise [Client::Error] when credentials are missing or request fails
# @return [String] Bearer token
def token# @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)| Mistake | Reality |
|---|---|
| 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 |
| Writing docs in a language other than English | Standard is English; use it unless the user explicitly asks otherwise |
No @return for methods that return values | Always document the return type and meaning |
No @raise when the method can raise | Callers need to know what exceptions to rescue |
| Merging without YARD on new/changed public API | Post-implementation gate — document before PR |
@option for important keys@raise documented| 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
generate-tasks
rails-agent-skills
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-stack-conventions
rails-tdd-slices
refactor-safely
rspec-best-practices
rspec-service-testing
ruby-api-client-integration
ruby-service-objects
strategy-factory-null-calculator
ticket-planning
yard-documentation