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
Testing strategies for Rails engines.
Engine testing requires two layers:
The dummy app is essential—it verifies routing, initialization, configuration, and host integration work correctly.
The dummy app is created automatically with rails plugin new. Ensure it has:
spec/dummy/
app/
controllers/
models/
views/
config/
routes.rb # Mount the engine
application.rb # Minimal Rails config
db/
schema.rb
config.ru# spec/dummy/config/routes.rb
Rails.application.routes.draw do
mount YourEngine::Engine => "/your_engine"
end
# spec/dummy/config/application.rb
require_relative 'boot'
require 'rails/all'
module Dummy
class Application < Rails::Application
config.load_defaults 7.0
config.eager_load = false
end
endVerify the engine configuration system works:
# spec/lib/your_engine/configuration_spec.rb
require 'rails_helper'
RSpec.describe YourEngine::Configuration do
describe 'defaults' do
it 'has sensible defaults' do
config = described_class.new
expect(config.user_class).to eq('User')
expect(config.enabled).to be true
end
end
describe 'configuration block' do
it 'allows configuration via block' do
YourEngine.configure do |config|
config.user_class = 'Admin'
end
expect(YourEngine.configuration.user_class).to eq('Admin')
end
end
endTest endpoints through the mounted engine:
# spec/requests/your_engine/widgets_spec.rb
require 'rails_helper'
RSpec.describe "Widgets", type: :request do
describe "GET /your_engine/widgets" do
it 'returns widgets' do
create_list(:widget, 3)
get your_engine.widgets_path
expect(response).to have_http_status(:success)
expect(response.body).to include('Widgets')
end
end
end# spec/routing/your_engine/routes_spec.rb
require 'rails_helper'
RSpec.describe "Engine routing", type: :routing do
it 'routes to engine' do
expect(get: '/your_engine/widgets').to route_to(
controller: 'your_engine/widgets',
action: 'index'
)
end
endIf your engine provides generators:
# spec/lib/generators/your_engine/install_generator_spec.rb
require 'spec_helper'
require 'generator_spec'
describe YourEngine::Generators::InstallGenerator, type: :generator do
destination File.expand_path('../../tmp', __dir__)
before do
prepare_destination
run_generator
end
it 'creates initializer' do
expect(destination_root).to have_structure {
directory 'config/initializers' do
file 'your_engine.rb' do
contains 'YourEngine.configure'
end
end
}
end
endTest that configurable class references work:
# spec/lib/your_engine/host_integration_spec.rb
require 'rails_helper'
RSpec.describe "Host Integration" do
before do
YourEngine.configure do |config|
config.user_class = 'CustomUser'
end
# Create test model in dummy app
stub_const('CustomUser', Class.new(ActiveRecord::Base))
end
it 'uses configured user class' do
user = CustomUser.create!(email: 'test@example.com')
# Engine code that references the configurable class
result = YourEngine::UserFinder.find(user.id)
expect(result).to eq(user)
end
endBefore releasing an engine, verify:
bundle exec rspec passes in engine directorycd spec/dummy && bundle exec rails routes shows engine routesgrep -r "::User\|::Account" lib/)| Issue | Cause | Solution |
|---|---|---|
| Routes not found | Engine not mounted in dummy app | Add mount to spec/dummy/config/routes.rb |
| Models not loading | Namespacing issue | Use isolate_namespace or fully qualified names |
| Config not applied | Loading order | Set config in initializer, not in class definition |
| Tests pass in isolation but fail together | Database state | Use DatabaseCleaner or transactional fixtures |
# .github/workflows/engine-ci.yml
name: Engine CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f
with:
ruby-version: '3.2'
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Verify dummy app
run: |
cd spec/dummy
bundle exec rails routesdocs
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