inertia-rails avatar

Inertia Rails Architecture

This is the entry point for any Inertia Rails project. It's a decision matrix that stops you from reaching for SPA patterns that break Inertia's server-driven model. The core insight is simple: the server owns routing, data, and auth; React just renders. So no useEffect fetching, no React Query, no client-side routing. Instead you get a lookup table for common needs (forms, navigation, data refresh) and which Inertia primitive solves each one. Load this first when building features, then it routes you to the specific skill you need. The rules section is worth scanning even if you've used Inertia before, especially the bit about why fetch breaks CSRF and error handling that the Form component handles automatically.

skills.sh installs
545
GitHub stars
70
last updated
Aug 21, 2026

Install

$ npx -y skills add inertia-rails/skills --skill inertia-rails-architecture --agent claude-code

Installs into .claude/skills of the current project.

Files

Inertia Rails Architecture

Server-driven architecture for Rails + Inertia.js + React when building pages, forms, navigation, or data refresh. Inertia is NOT a traditional SPA — the server owns routing, data, and auth. React handles rendering only.

The Core Mental Model

The server is the source of truth. React receives data as props and renders UI. There is no client-side router, no global state store, no API layer.

Before building any feature, ask:

  • Where does the data come from? → If server: controller prop. If user interaction: useState.
  • Who owns this state? → If it's in the URL or DB: server owns it (use props). If it's ephemeral UI: React owns it.
  • Am I reaching for a React/SPA pattern? → Check the decision matrix below first — Inertia likely has a server-driven equivalent.

Decision Matrix

Sponsors

Details

Repository
github.com/inertia-rails/skills
Categories
Frontend Development, Backend & APIs, Code Review & Quality, Productivity & Planning, PHP & Laravel
First seen
Jun 3, 2026

More from inertia-rails/skills

All 9
1jezweb avatartanstack-routerjezweb/claude-skillsBuild type-safe, file-based React routing with TanStack Router. Supports client-side navigation, route loaders, and TanStack Query integration. Prevents 20 docu544skills.sh installs
2seed-hypermedia avatarxstateseed-hypermedia/seedUse when designing, implementing, reviewing, or migrating XState v5 state machines, statecharts, actors, invoked services, @xstate/react hooks, or Stately diagr541skills.sh installs
3kindy avatarprimevuekindy/skillsSetup and use PrimeVue UI component library in Vue/Vite projects with auto-import, theming, and component configuration. Use when working with PrimeVue componen536skills.sh installs
4connorads avatarweb-animation-designconnorads/dotfilesDesign and implement web animations that feel natural and purposeful. Use this skill proactively whenever the user asks questions about animations, motion, easi521skills.sh installs
5jezweb avatarai-sdk-uijezweb/claude-skillsBuild React chat interfaces with Vercel AI SDK v6. Covers useChat/useCompletion/useObject hooks, message parts structure, tool approval workflows, and 18 UI err517skills.sh installs
6aaronontheweb avatarmjml-email-templatesaaronontheweb/dotnet-skillsBuild responsive email templates using MJML markup language. Compiles to cross-client HTML that works in Outlook, Gmail, and Apple Mail. Includes template rende513skills.sh installs