inertia-rails-typescript

Installation
SKILL.md

Inertia Rails TypeScript Setup

Type-safe shared props, flash, and errors using InertiaConfig module augmentation. Works identically across React, Vue, and Svelte — the globals.d.ts and InertiaConfig setup is the same for all frameworks.

Before adding TypeScript types, ask:

  • Shared props (auth, flash)? → Update SharedProps/FlashData in index.ts — InertiaConfig in globals.d.ts propagates them globally via usePage()
  • Page-specific props?type Props = { ... } in the page file only — never include shared props here

InertiaConfig Module Augmentation

Define shared props type ONCE globally — never in individual page components.

InertiaConfig property names are EXACT — do not rename them:

  • sharedPageProps (NOT sharedProps)
  • flashDataType (NOT flashProps, NOT flashData)
  • errorValueType (NOT errorBag, NOT errorType)
Related skills
Installs
163
GitHub Stars
48
First Seen
Feb 13, 2026