From rails-agent-skills
Orchestrates Rails engine development workflow: scaffolds mountable engines, sets up testing, performs code review and dependency auditing, prepares for release. Use when creating, extracting, or maintaining engines.
npx claudepluginhub igmarin/rails-agent-skills --plugin rails-agent-skillsThis skill uses the workspace's default tool permissions.
Orchestrates the full lifecycle of Rails engine development from scaffolding to release.
Guides creating, scaffolding, or refactoring Rails engines, covering types (Plain, Railtie, Engine, Mountable), namespace isolation, host-app contracts, and file structure.
Writes idiomatic Ruby code using metaprogramming, Rails patterns, performance optimization. Specializes in gem development, RSpec/Minitest testing, and RuboCop.
Writes idiomatic Ruby code using metaprogramming, Rails patterns, and performance optimizations. Supports Rails apps, gem development, RSpec/Minitest testing, and refactoring.
Share bugs, ideas, or general feedback.
Orchestrates the full lifecycle of Rails engine development from scaffolding to release.
Scaffold and structure the engine:
Kickoff command:
rails plugin new my_engine --mountable --skip-test
Expected directory structure after scaffolding:
my_engine/
app/
config/routes.rb
lib/my_engine/engine.rb
lib/my_engine/version.rb
lib/my_engine.rb
my_engine.gemspec
test/dummy/
HARD GATE — Engine Structure Check:
# Verify namespace isolation
grep -r 'module MyEngine' lib/my_engine/engine.rb
# Verify gemspec metadata is complete
ruby -e "require 'rubygems'; spec = Gem::Specification.load('my_engine.gemspec'); puts spec.validate"
# Verify isolated migrations declared
grep 'isolate_namespace\|engine.config.isolate_namespace' lib/my_engine/engine.rb
MyEngine:: not ::)gem specification validationIf structure check FAILS: Return to rails-engine-author and fix.
Proceed only after structure check passes.
skills/engines/rails-engine-testing — Set up dummy app, spec helpers, factory isolation, and test database
Write initial characterization tests:
Run tests from engine root:
cd my_engine && bundle exec rspec
HARD GATE — Tests Run:
bundle exec rspec --format progress 2>&1 | tail -5
# Must show: no load errors, exit 0 or partial pass
Build engine features with quality gates:
Implement features using:
skills/engines/rails-engine-reviewer — Coupling assessment, API surface design, host app integration points
skills/engines/rails-engine-compatibility — Rails/Ruby version matrix and dependency constraints
Check gem dependencies:
bundle exec rake dependencies
bundle exec bundler-audit check --update
Prepare for publication:
skills/engines/rails-engine-docs — Installation, configuration, usage examples, changelog
skills/engines/rails-engine-release — Version bump (SemVer), changelog, upgrade notes, git tag
Release commands:
gem build my_engine.gemspec
gem push my_engine-1.0.0.gem
git tag v1.0.0 && git push origin v1.0.0
Optional:
3. skills/engines/rails-engine-installers — Idempotent rails g my_engine:install generator for host app configuration
Output: Published gem or releasable GitHub repository.
New engine? → rails-engine-author → rails-engine-testing
Extract from app? → rails-engine-extraction → rails-engine-author
Release engine? → rails-engine-reviewer → rails-engine-release
Not sure? → rails-skills-orchestrator
NEVER integrate engine into host app before:
Engine Release Checklist (abbreviated):
# Engine Release — v1.0.0
- [x] Namespace isolation: MyEngine::
- [x] Test suite: passing
- [x] README and Changelog updated
- [x] Git tag: v1.0.0
| Predecessor | This Skill | Successor |
|---|---|---|
| create-prd (engine requirements) | rails-engines-flow | rails-tdd-loop (engine features) |
| None (extract existing) | rails-engines-flow | Host app integration |
From AGENTS.md: This is the engine development workflow. Chain to rails-tdd-loop for feature development within the engine.