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.
98
99%
Does it follow best practices?
Impact
98%
1.38xAverage score across 26 eval scenarios
Passed
No known issues
Use this skill when the task is to move existing code out of a Rails app and into an engine.
Prefer incremental extraction over big-bang rewrites. Preserve behavior first, then improve design.
DO NOT extract and change behavior in the same step. Extraction must preserve existing behavior; refactoring and improvements belong in a separate step after the move is complete and verified.
Each slice must have: one coherent responsibility, minimal new public API, passing regression tests, and a clear next step.
| Pitfall | What to do |
|---|---|
| Extracting too much at once | One bounded slice per step; large extractions hide bugs and are hard to revert |
| Direct host references in engine | Use adapters or config; direct constants couple engine to host internals |
| Behavior changes mixed with extraction | Preserve behavior first; refactor only after the move is verified |
| Circular dependencies introduced | Verify import graph before moving each slice |
| Dummy app passes but host contract is implicit | Explicitly document and test the host app contract |
First slice (move PORO, no host model yet):
# Move the file into the engine and adjust the namespace
mkdir -p my_engine/app/services/my_engine
mv app/services/pricing/calculator.rb my_engine/app/services/my_engine/pricing_calculator.rb# Before (in host app): module Pricing; class Calculator
# After (in engine):
module MyEngine
class PricingCalculator
def initialize(line_items)
@line_items = line_items
end
def total
@line_items.sum { |item| item.price * item.quantity }
end
end
endVerify regression coverage still passes before proceeding to the next slice:
bundle exec rspec spec/services/pricing/ spec/requests/orders/Move engine-local models in the same slice, or keep host models and inject via an adapter in a later slice.
Adapter for host dependency:
# lib/my_engine/configuration.rb
module MyEngine
class Configuration
attr_accessor :current_user_provider
end
def self.config
@config ||= Configuration.new
end
def self.configure
yield config
end
end
# In engine: resolve user through config, not hardcoded constant
class OrderCreator
def initialize(user)
@user = user
end
def self.for_request(request)
new(MyEngine.config.current_user_provider.call(request))
end
end
# Host initializer (config/initializers/my_engine.rb)
MyEngine.configure do |config|
config.current_user_provider = ->(request) { request.env['warden'].user }
end| Skill | When to chain |
|---|---|
| rails-engine-author | Engine structure, host contract, namespace design after extraction |
| rails-engine-testing | Dummy app, regression tests, integration verification |
| refactor-safely | Behavior-preserving refactors before or after extraction slices |
api-rest-collection
create-prd
ddd-boundaries-review
ddd-rails-modeling
ddd-ubiquitous-language
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
generate-tasks
mcp_server
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-skills-orchestrator
rails-stack-conventions
rails-tdd-slices
refactor-safely
rspec-best-practices
rspec-service-testing
ruby-service-objects
strategy-factory-null-calculator
ticket-planning
yard-documentation