Inertia Rails Controllers
Rails controller patterns for Inertia.js covering render inertia, prop types, shared data, flash, and validation errors.
- CCM score
- 60 of 100
- skills.sh installs
- 505
- GitHub stars
- 72
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers
render inertia:data passing, prop types (defer, optional, merge, scroll, once), shared data, flash, and PRG redirects - Enforces
inertia_locationfor external URLs (Stripe, OAuth) anderrors.to_hash(true)for field-mapped validation errors - Warns that instance variables are not auto-passed as props without the
alba-inertiagem, and thatdefault_render: truealone sends no data - Designed for Rails controllers that load records or serve Inertia responses to React or other Inertia front ends
Install
$ npx -y skills add inertia-rails/skills --skill inertia-rails-controllers -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Inertia Rails Controllers
Server-side patterns for Rails controllers serving Inertia responses.
Before adding a prop, ask:
- Needed on every page? →
inertia_sharein a base controller (InertiaController), not a per-action prop - Expensive to compute? →
InertiaRails.defer— page loads fast, data streams in after - Only needed on partial reload? →
InertiaRails.optional— skipped on initial load - Reference data that rarely changes? →
InertiaRails.once— cached across navigations
Details
- Repository
- github.com/inertia-rails/skills
- Categories
- Backend & APIs, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the inertia-rails-controllers skill do?
inertia-rails-controllers gives patterns for Rails controllers that serve Inertia.js responses, covering render inertia, prop types such as defer, optional, merge and scroll, shared data, flash messages, redirects and validation errors. It tells the agent to pass data explicitly with render inertia rather than relying on instance variables. It also says external URLs such as Stripe or OAuth must use inertia_location instead of redirect_to.
How do I install the inertia-rails-controllers skill?
Run npx -y skills add inertia-rails/skills --skill inertia-rails-controllers -y in your project. After that, inertia-rails-controllers guides the agent when it writes controllers that load data, display records or serve Inertia responses.
Where does inertia-rails-controllers fit among Backend & APIs skills?
inertia-rails-controllers is listed under Backend & APIs on Claude Marketplaces, alongside entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Its focus is narrower than those, covering only Rails controller patterns for Inertia responses. It is part of the inertia-rails/skills repository.
Does inertia-rails-controllers pass instance variables to the frontend automatically?
No, inertia-rails-controllers warns that instance variables are not passed as props unless the alba-inertia gem is configured. Every action that sends data to the page must call render inertia with that data. Empty actions are only correct for pages that need no data.
More from inertia-rails/skills
All 9Similar to Inertia Rails Controllers
More Backend & APIsinertia-rails-typescriptSkillinertia-rails/skills482 installsTypeScript typing for Inertia Rails shared props, flash, and errors via InertiaConfig augmentation in globals.d.ts.
inertia-rails-architectureSkillinertia-rails/skills555 installsServer-driven patterns and decision matrix for building Inertia Rails + React pages, forms, and data flows.
laravel-inertia-reactSkillasyrafhussin/agent-skills2.1K installsPractical Laravel, Inertia.js, and React patterns for page components, useForm forms, shared data, and persistent layouts.
rails-hotwireSkillpproenca/dot-skills391 installsHotwire patterns for Rails covering Turbo Drive, Frames, Streams, morphing, and Stimulus controllers.
better-stimulusPluginobie/skills101 starsApply Better Stimulus best practices for writing maintainable, reusable StimulusJS controllers following SOLID principles