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
Use this skill when the task is to write, review, or clean up RSpec tests.
Core principle: Prefer behavioral confidence over implementation coupling. Good specs are readable, deterministic, and cheap to maintain.
| Aspect | Rule |
|---|---|
| Spec types | Model: domain logic; Request: HTTP endpoints (prefer over controller); Job: background processing; Service/PORO: no Rails helpers; System: critical E2E only (slow) |
| Assertions | Test behavior, not implementation |
| Factories | Minimal — only attributes needed; use traits for optional states; prefer build/build_stubbed over create |
| Mocking | Stub external boundaries, not internal code |
| Isolation | Each example independent; no shared mutable state |
| Naming | describe for class/method, context for scenario |
| Service specs | Required: describe '.call' and subject(:result) for the primary invocation |
let vs let! | Default to let; let! ONLY when object must exist before example runs |
| External service mocking | allow(ServiceClass).to receive(:method) — not instance_double; instance_double only for injected collaborators |
| Example names | Present tense: it 'returns the user'; NEVER it 'should ...'; NEVER contains and — see One Behavior Per Example |
aggregate_failures | Use when asserting multiple related items in one example |
TESTS GATE IMPLEMENTATION:
DO NOT write implementation code before a failing test exists.
When writing tests for new behavior, follow the TDD workflow exactly:
1. Write spec
2. Run spec and verify it fails
3. Implement minimal code
4. Run spec and verify it passes
ONE BEHAVIOR PER EXAMPLE:
The word "and" in an `it` / `specify` description signals two behaviors in one example. Split it every time — no exceptions.When driving new behaviour with RSpec, follow this sequence:
e.g. failure examples in the final artifact.| Change type | Start with |
|---|---|
| Pure domain logic | Model or PORO service spec |
| HTTP endpoint behaviour | Request spec |
| Background processing | Job spec |
| Cross-layer user journey | System spec (sparingly) |
RSpec.describe Invoices::MarkOverdue do
describe '.call' do
subject(:result) { described_class.call(invoice: invoice) }
context 'when the invoice is overdue and unpaid' do
let(:invoice) { create(:invoice, due_date: 2.days.ago, paid_at: nil) }
it 'marks the invoice overdue' do
expect { result }.to change { invoice.reload.overdue? }.from(false).to(true)
end
end
end
end# BAD — two assertions; if the first fails, the second never runs
it 'returns 201 and creates the record' do; end
# GOOD — one observable outcome per example
it 'returns 201' do; end
it 'creates the record' do; end| Cause | Fix |
|---|---|
| Time-dependent logic | freeze_time / travel_to; never set past dates as shortcut |
| State leakage | Each example sets up own state; avoid before(:all) |
| Async jobs | queue_adapter = :test + have_enqueued_job; never assert side-effects imperatively |
| External HTTP | WebMock / VCR; never allow real network in CI |
| DB state bleed | Transactional fixtures or DatabaseCleaner; never share let! across contexts |
| Race conditions | Explicit Capybara waits; avoid sleep |
| Imprecise assertions | change.from().to() over final state; exact values over be_truthy/be_falsey; see rule 16 for updated_at |
Load these files only when their specific content is needed:
When asked to write or review RSpec specs, your output MUST satisfy each rule below. Each is graded independently — one violation drops the whole check.
app/foo/bar.rb → spec/foo/bar_spec.rb.# frozen_string_literal: true as the first line of every spec file.RSpec.describe uses the full constant path (RSpec.describe Module::Class do), not a string.describe '#method' / describe '.class_method' for each method under test.context 'when ...' / context 'with ...' for scenario variations — never use context to group methods.let for test data, let! ONLY when the object must exist before the action under test.let_it_be unless the project already depends on test-prof (check Gemfile.lock first).subject(:result) { ... } for service / PORO specs invoking .call.travel_to / freeze_time for any time-dependent assertion — never set past Time.now or stub Time.current directly.allow(SomeClient).to receive(:method)); ActiveRecord finders are NEVER mocked.e.g. before the failure message.build / build_stubbed unless persistence is required. Do not hide business-meaningful defaults in the factory.aggregate_failures when one behavior needs several related expectations, and show it in the produced spec when relevant.updated_at unless time is frozen and the timestamp change is the behavior under test.it/specify descriptions contain "and".let! is justified by a must-exist-before-action constraint.travel_to when the original timestamp matters.| Skill | When to chain |
|---|---|
| plan-tests | Choosing the best first failing spec for a Rails change |
| create-service-object | Providing test structure for the .call pattern |
| refactor-code | Adding characterization tests before refactoring |
| implement-graphql | Writing specs for GraphQL resolvers and mutations |
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