
Laravel Inertia React
Implement Inertia.js React pages, forms, layouts, and shared Laravel data with typed patterns instead of guessing framework conventions.
Overview
Laravel Inertia React is an agent skill most often used in Build (also Validate prototype, Ship review) that applies 24 structured rules for Inertia React pages, forms, and Laravel shared data.
Install
npx skills add https://github.com/asyrafhussin/agent-skills --skill laravel-inertia-reactWhat is this skill?
- 24 rules organized across 6 categories for Laravel + Inertia + React
- CRITICAL Page Components: 6 rules for structure, PageProps, Head, layouts, scroll, partial reloads
- CRITICAL Forms & Validation: 8 rules for useForm, errors, transforms, and file uploads
- Shared data via HandleInertiaRequests and persistent layout patterns
- TypeScript-first props typing and performance-oriented partial reload guidance
- 24 rules across 6 categories
- 6 CRITICAL page component rules
- 8 CRITICAL forms and validation rules
Adoption & trust: 717 installs on skills.sh; 42 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are mixing Laravel, Inertia, and React but lack consistent patterns for pages, useForm, layouts, and typed props.
Who is it for?
Indie SaaS builders on a Laravel + Inertia + React stack who want agent-assisted page and form work without a separate SPA API.
Skip if: Pure API-first SPAs, Livewire-only Laravel apps, or Next.js frontends without Inertia.
When should I use this skill?
Building or modifying Laravel apps with Inertia.js and React—pages, useForm, Link, shared data, layouts, uploads, or TypeScript props.
What do I get? / Deliverables
Your agent implements Inertia React features that match the skill’s CRITICAL page and form rules, reducing navigation and validation mistakes.
- Inertia React page components with typed props
- Form flows using useForm with validation handling
- Shared data and layout configuration consistent with skill rules
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Primary shelf is Build because the skill covers monolith implementation across Laravel routes and React pages. Frontend is canonical for Inertia page components, useForm, Link navigation, and layouts—the user-visible half of the stack.
Where it fits
Stand up a few Inertia React screens to test onboarding before committing to full module structure.
Create a typed dashboard page with Head tags, layout assignment, and partial reloads.
Align HandleInertiaRequests shared props and validation responses with React form error display.
Audit new pages against CRITICAL form and navigation rules before release.
How it compares
Monolithic Inertia patterns—not a REST-only React integration or a generic PHP Laravel backend skill.
Common Questions / FAQ
Who is laravel-inertia-react for?
Solo developers and small teams building Laravel applications with the Inertia.js adapter and a React frontend.
When should I use laravel-inertia-react?
Use it in Build for new pages and forms; in Validate when prototyping Inertia flows; in Ship when reviewing navigation, validation, or shared-data regressions.
Is laravel-inertia-react safe to install?
It is pattern documentation without mandatory shell or network access; review the Security Audits panel on this page before trusting third-party skill sources.
SKILL.md
READMESKILL.md - Laravel Inertia React
# Laravel + Inertia.js + React Skill for AI Agents This document provides guidance for AI agents on how to effectively use the Laravel + Inertia.js + React skill patterns. ## Overview This skill provides comprehensive patterns for building modern monolithic applications with Laravel backend, Inertia.js adapter, and React frontend. It covers 24 rules across 6 key categories. ## When to Apply This Skill Apply this skill when: - Building Laravel applications with Inertia.js and React - Creating or modifying Inertia page components - Implementing forms with the useForm hook - Setting up navigation with Inertia's Link component - Configuring shared data through HandleInertiaRequests - Implementing persistent layouts - Working with TypeScript in Inertia React apps - Handling file uploads, validation, or flash messages ## Skill Categories ### 1. Page Components (CRITICAL) **Priority**: CRITICAL | **Rules**: 6 Core patterns for structuring Inertia page components: - Component structure with TypeScript interfaces - Props typing extending PageProps - Head management for SEO and meta tags - Layout assignment using the layout property - Scroll preservation during navigation - Partial reloads for performance **When to reference**: Creating new pages, typing props, managing document head, or optimizing page loads. ### 2. Forms & Validation (CRITICAL) **Priority**: CRITICAL | **Rules**: 8 Complete form handling with Inertia's useForm hook: - Basic useForm setup and methods - Displaying Laravel validation errors - File uploads with progress tracking - Form state management (dirty, processing, errors) - Data transformation before submission - Reset and cleanup patterns **When to reference**: Building forms, handling validation, file uploads, or managing form state. ### 3. Navigation (CRITICAL-HIGH) **Priority**: CRITICAL to HIGH | **Rules**: 5 SPA-like navigation without full page reloads: - Link component for internal navigation - Programmatic navigation with router - External links and download handling - State preservation during navigation - History management with replace option **When to reference**: Implementing navigation, links, routing, or programmatic page transitions. ### 4. Shared Data (CRITICAL-HIGH) **Priority**: CRITICAL to HIGH | **Rules**: 4 Global props shared across all pages: - Authentication user data - Flash messages from Laravel - Ziggy routes for type-safe routing - App configuration and feature flags **When to reference**: Accessing user data, displaying flash messages, using Laravel routes in JS, or sharing global config. ### 5. Layouts (CRITICAL) **Priority**: CRITICAL | **Rules**: 1 Persistent layout implementation: - Layout property pattern - Nested layouts - State preservation across navigation - Performance benefits **When to reference**: Setting up layouts, preventing layout re-renders, or optimizing navigation performance. ### 6. Advanced Patterns (MEDIUM) **Priority**: MEDIUM | **Rules**: Covered in other sections Advanced techniques integrated into other categories: - Partial reloads (Page Components) - Scroll preservation (Page Components) - Progress indicators (Forms) - Dirty tracking (Forms) ## Integration Patterns ### Laravel Controller → Inertia Page ```php // Laravel Controller public function index(): Response { return Inertia::render('Users/Index', [ 'users' => User::paginate(10), 'filters' => request()->only('search', 'role'), ]); } ``` ```tsx // React Page Component interface Props extends PageProps { users: PaginatedData<User>; filters: { search: string; role: string }; } export default function Index({ users, filters }: Props) { // Implementation } ``` ### HandleInertiaRequests → Shared Props ```php // Laravel Middleware public function share(Request $request): array { return [ 'auth' => ['user' => $request->user()], 'flash' => ['success' => session('success')], ]; } ``` ```tsx // React Usage const { auth,