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.
95
97%
Does it follow best practices?
Impact
91%
2.21xAverage score across 3 eval scenarios
Passed
No known issues
Use this skill when the task is to create or improve test coverage for a Rails engine.
Prefer integration confidence over isolated test quantity. The main goal is to prove the engine behaves correctly inside a host app.
| Spec Type | Purpose |
|---|---|
| Request | Proves mounted endpoints work; exercises real routing and controller |
| Routing | Verifies engine route expectations and mount behavior |
| Generator | Covers install commands, copied files, idempotency |
| Config | Verifies engine respects host configuration overrides |
| Reload-safety | Regression tests for decorators, patches, and to_prepare hooks |
EVERY engine MUST have a dummy app for testing. This ensures the engine behaves correctly within a host application environment, proving its boot and mount process.
For a non-trivial engine, aim for:
If generators exist, add generator specs. If decorators or reload hooks exist, add reload-focused coverage.
| Mistake | Reality |
|---|---|
| No dummy app | Engines must be tested inside a host; unit tests alone cannot prove mount and integration work |
| Testing against real host instead of dummy | Use spec/dummy; real host apps are environment-specific and slow |
| Skipping reload-safety tests | Decorators and patches can break in development; add regression coverage for reload behavior |
Use the dummy app for:
Do not rely only on isolated unit tests when the behavior depends on Rails integration.
Minimal dummy-app request spec (engine mounted):
# spec/requests/my_engine/root_spec.rb or spec/integration/engine_mount_spec.rb
require 'rails_helper'
RSpec.describe 'MyEngine mount', type: :request do
it 'mounts the engine and returns success for the engine root' do
get my_engine.root_path
expect(response).to have_http_status(:ok)
end
endConfiguration spec (engine respects host config):
# spec/my_engine/configuration_spec.rb
RSpec.describe MyEngine::Configuration do
around do |example|
original = MyEngine.config.widget_count
MyEngine.config.widget_count = 3
example.run
MyEngine.config.widget_count = original
end
it 'uses configured value' do
expect(MyEngine.config.widget_count).to eq(3)
end
endWhen asked to help with tests:
| Skill | When to chain |
|---|---|
| rails-engine-author | When structuring the engine for testability or adding configuration seams |
| rails-engine-reviewer | When validating test coverage adequacy or identifying gaps |
| rspec-best-practices | When improving spec structure, matchers, or shared examples |
api-rest-collection
create-prd
ddd-boundaries-review
ddd-rails-modeling
ddd-ubiquitous-language
evals
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