Curated library of 41 public AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, and orchestration. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation. Repository workflows remain documented in GitHub but are intentionally excluded from the Tessl tile.
95
93%
Does it follow best practices?
Impact
96%
1.77xAverage score across 41 eval scenarios
Passed
No known issues
| Aspect | Rule |
|---|---|
| Entry point | def self.call(...) → new(...).call |
| Validation | Validate inputs at top of call; return error hash if invalid |
| Error handling | rescue → log + error hash; never re-raise to caller |
| Transactions | Only wrap multi-step DB operations that must be atomic |
call length | ≤20 lines; extract sub-services if longer |
| Scope | Return data only (no HTTP); single responsibility per service |
| SQL | sanitize_sql for any dynamic queries |
| Shared logic | Extract validators to class-only services (Pattern 3) |
| Response data | Serialize domain data; do not return raw ActiveRecord objects in response |
TESTS GATE IMPLEMENTATION:
EVERY service object MUST have its test written and validated BEFORE implementation.
1. Write the spec for .call (with contexts for success, error, edge cases)
2. Run the spec — verify it fails because the service does not exist yet
3. ONLY THEN write the service implementation
The final artifact must include the spec command and the RED failure message
before implementation. Use the observed failure when available; otherwise show
the exact expected failure class/message for the missing service.
See write-tests for the full gate cycle.spec/services/<module_name>/<service_name>_spec.rb. Write tests covering success and error paths for .call. Run it to ensure it fails.app/services/<module_name>/<service_name>.rb with the correct module namespace..call → new.call service, a batch processor, a static class-only helper, or an orchestrator (≤20 lines).self.call and #call methods. Ensure the response strictly returns { success: true, response: { ... } } or { success: false, response: { error: { message: '...' } } }.StandardError (and domain exceptions). Use Rails.logger.error to log both the message and backtrace. Use UPPER_SNAKE_CASE constants for error messages.self.call and every public method.app/services/<module_name>/README.md explaining the domain context..call Patterndef self.call(params)
new(params).call
end
def call
# ... processing ...
{ success: true, response: { data: result } }
rescue StandardError => e
Rails.logger.error("Processing Error: #{e.message}")
Rails.logger.error(e.backtrace.join("\n"))
{ success: false, response: { error: { message: ERROR_MESSAGE } } }
enddef call
results = @items.each_with_object({ successful: [], failed: [] }) do |item, acc|
# process...
rescue StandardError => e
Rails.logger.error("Unexpected item error: #{e.message}")
acc[:failed] << { sku: item[:sku], error: e.message }
end
{ success: true, response: results }
endWhen no instance state is needed, use ONLY class methods.
class Orders::QuantityValidator
def self.call(quantity:)
return { success: false, response: { error: { message: INVALID_QUANTITY } } } unless quantity.positive?
{ success: true, response: { valid: true } }
end
endUse no initialize and no instance variables for validators, formatters, or helpers that only transform their arguments.
call)def call
user_result = UserCreationService.call(@params)
return user_result unless user_result[:success]
# ... continue ...
endLoad these files only when their specific content is needed:
Every service-object task produces these artifacts:
app/services/<module_name>/<service_name>.rb (pragma on line 1, class wrapped in a module matching the directory name).self.call — @param for every argument, @return [Hash], plus @raise for any exception class that can escape. The self.call wrapper is documented separately from #call.@param / @return / @raise discipline.UPPER_SNAKE_CASE constants at the top of the class, never inline inside a rescue.app/services/<module_name>/README.md. Required even for single-service modules.spec/services/<module_name>/<service_name>_spec.rb written and failing BEFORE the implementation (see HARD-GATE).success: and response: top-level keys and the meaningful payload shape for the service.initialize and no instance variables.For class-only services (Pattern 3), the rules apply to the public class methods being documented; if the class returns a non-service shape (e.g. validators returning nil / error string), document that explicitly in YARD and the README.
| Skill | When to chain |
|---|---|
| write-yard-docs | Writing/reviewing inline docs |
| integrate-api-client | External API integrations |
| implement-calculator-pattern | Variant-based calculators |
| test-service | Testing service objects |
| write-tests | General RSpec structure |
| review-architecture | Architecture review involving service extraction |
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
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
mcp_server
skills
api
generate-api-collection
implement-graphql
code-quality
apply-code-conventions
apply-stack-conventions
assets
snippets
code-review
refactor-code
respond-to-review
review-architecture
security-check
context
load-context
setup-environment
ddd
define-domain-language
model-domain
review-domain-boundaries
engines
create-engine
create-engine-installer
document-engine
extract-engine
release-engine
review-engine
test-engine
upgrade-engine
infrastructure
implement-background-job
implement-hotwire
optimize-performance
review-migration
seed-database
version-api
orchestration
skill-router
patterns
create-service-object
implement-calculator-pattern
write-yard-docs
planning
create-prd
generate-tasks
plan-tickets
testing
plan-tests
test-service
triage-bug
write-tests
workflows