All skills
asyrafhussin avatar

/laravel-inertia-react

@ac26821

Laravel + Inertia.js + React integration patterns. Use when building Inertia page components, handling forms with useForm, managing shared data, or implementing persistent layouts. Triggers on tasks involving Inertia.js, page props, form handling, or Laravel React integration.

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/laravel-inertia-react

This session only. Nothing lands on disk.

README.md

≈434 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Laravel + Inertia.js + React

Patterns for building modern monolithic applications with Laravel, Inertia.js, and React.

Overview

This skill provides guidance for:

  • Page component structure and typing
  • Form handling with useForm
  • Navigation and partial reloads
  • Shared data and authentication
  • Persistent layouts
  • File uploads

Categories

1. Page Components (Critical)

Structure, typing, and best practices for Inertia pages.

2. Forms & Validation (Critical)

useForm hook, error handling, and form state management.

3. Navigation & Links (High)

Link component, preserve state, and partial reloads.

4. Shared Data (High)

Authentication, flash messages, and global props.

5. Layouts (Medium)

Persistent layouts for better UX and performance.

6. File Uploads (Medium)

Handling file uploads with progress tracking.

Quick Start

// Page component with form
import { useForm } from '@inertiajs/react'

export default function Create() {
  const { data, setData, post, processing, errors } = useForm({
    title: '',
    body: '',
  })

  const handleSubmit = (e) => {
    e.preventDefault()
    post(route('posts.store'))
  }

  return (
    <form onSubmit={handleSubmit}>
      <input
        value={data.title}
        onChange={(e) => setData('title', e.target.value)}
      />
      {errors.title && <span>{errors.title}</span>}
      <button disabled={processing}>Submit</button>
    </form>
  )
}

Usage

This skill triggers automatically when:

  • Building Inertia.js pages
  • Handling forms with useForm
  • Managing shared data
  • Implementing layouts

References

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a comprehensive set of best practices and patterns for building applications with Laravel, Inertia.js, and React. The content consists of architectural guidance and code examples that follow official framework standards and do not exhibit any malicious behavior or security risks.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    30 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at ac26821. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 7 months ago
Other metadata
metadata
{
  "author": "AsyrafHussin",
  "version": "1.0.2",
  "laravelVersion": "13.x",
  "phpVersion": "8.3+"
}

README badge

README badge for asyrafhussin/agent-skills/laravel-inertia-react