alba-inertia

Installation
SKILL.md

Alba + Typelizer for Inertia Rails

Requires: alba, typelizer, alba-inertia gems in Gemfile.

Alba serializers for Inertia props with auto-generated TypeScript types. Replaces as_json(only: [...]) with structured, type-safe resources.

Before creating a resource, ask:

  • Reusable data shape (user, course)? → Entity resource (UserResource) — shared across pages
  • Page-specific props bundle? → Page resource (UsersIndexResource) — one per controller action
  • Global data (auth, notifications)? → Shared props resource (SharedPropsResource)

NEVER:

  • Use as_json when Alba is set up — it bypasses type generation and creates untyped props
  • Skip typelize_from when resource name differs from model — Typelizer can't infer column types and generates unknown
  • Put declare module augmentations in serializers/index.ts — Typelizer-generated types go in serializers/index.ts, manual InertiaConfig goes in globals.d.ts

Setup

Related skills
Installs
122
GitHub Stars
48
First Seen
Feb 13, 2026