rails

Plan, implement, and verify Ruby on Rails features with ActiveRecord and Hotwire.

16|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/JCETools-Petra/JCE-Opencode-Tools --skill rails-jcetools-petra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails
Source: https://github.com/JCETools-Petra/JCE-Opencode-Tools/tree/main/config/skills/rails
Command: npx skills add https://github.com/JCETools-Petra/JCE-Opencode-Tools --skill rails-jcetools-petra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ruby on Rails work often gets stuck in architecture decisions, framework-specific implementation details, and verification gaps—this Skill helps you design, implement, and validate Rails (ActiveRecord/Hotwire) changes reliably.

Core Features & Use Cases

  • Rails architecture guidance: Choose appropriate patterns for CRUD, domain logic (service/form/query objects), background processing, caching, and deployment (e.g., Kamal 2).
  • Hotwire/Turbo implementation help: Set up Turbo Drive/Frames/Streams and provide controller + view patterns for real-time UI updates.
  • ActiveRecord best practices: Apply modern associations, scopes, validations, query optimization, batching, and bulk operations safely.
  • Frontend integration with Stimulus: Add structured JavaScript controllers for interactive features and partial updates.
  • Testing and verification checklists: Use RSpec/Minitest patterns and verify correctness using evidence-driven review steps.

Quick Start

Use the rails skill to design and implement a complete Rails feature with ActiveRecord models, Hotwire UI updates, and RSpec coverage for the critical path.

Frequently Asked Questions about rails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Rails feature with Hotwire and ActiveRecord from scratch?

To build a Rails feature, you plan ActiveRecord domain modeling, wire Turbo Streams for real-time UI updates, and verify changes using RSpec testing patterns. This involves choosing architecture patterns for CRUD development and implementing structured Stimulus JavaScript controllers for interactive frontend updates.

What's the best way to avoid N+1 queries in ActiveRecord?

Avoiding N+1 queries in ActiveRecord requires applying query optimization, batching, and safe bulk operations. You should follow evidence-driven verification and anti-pattern safeguards during implementation to ensure unsafe query construction is caught and resolved.

How do I set up Turbo Streams for real-time UI updates in Ruby on Rails?

Setting up Turbo Streams in Ruby on Rails involves configuring Turbo Drive and Frames, then applying specific controller and view patterns for real-time UI updates. You pair this with Stimulus controllers to manage interactive features and partial page updates efficiently.

When should I use service objects instead of ActiveRecord callbacks in Rails?

Use service objects instead of ActiveRecord callbacks when you need to prevent callbacks misuse and extract complex domain logic. Choosing appropriate architecture patterns for domain logic helps avoid anti-patterns, ensuring your CRUD development and background jobs remain maintainable and safely queryable.

Does this Rails guidance apply to version 7 and 8 features like Kamal 2?

Yes, this Rails guidance directly applies to Rails 7 and 8 tasks, including deployment architecture patterns for Kamal 2. It covers modern framework-specific implementation details for CRUD development, background jobs, caching strategy selection, and Hotwire UI behavior verification.

How do I test ActiveRecord models and Hotwire behavior with RSpec?

Testing ActiveRecord models and Hotwire behavior with RSpec requires applying specific testing patterns and evidence-driven review steps. You generate verification checklists for the critical path, ensuring your domain modeling and real-time UI updates pass RSpec coverage safeguards for correctness.