agentleFS
zhd4nzhd4n/skills/laravel-inertia/SKILL.md

laravel-inertia

Skill0 starsChanged 7 months agoMITView on GitHub

Use when making app-level Inertia decisions in a Laravel application, especially around layouts, flash data, deferred props, prefetching, standalone HTTP requests, and Laravel adapter testing.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. STIFLEUR390/agent-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill for app-level Inertia decisions in Laravel.

    line 8
  2. Distinctive:

    Prefer official Inertia v3 documentation.

    line 12
  3. Very specific:

    Treat Inertia v3 packages as ESM-only.

    line 40
  4. Distinctive:

    Do not mix page visits and standalone HTTP requests without a clear reason.

    line 56
  5. Distinctive:

    Do not solve flash messages with shared props by default in new v3 code.

    line 57
  6. Distinctive:

    Do not hardcode prefetch everywhere.

    line 58
  7. Distinctive:

    Do not invent a custom layout state channel when layout props already cover the case.

    line 59
  8. Distinctive:

    Do not test deferred props or flash data with generic array assertions when the Laravel adapter already provides explicit helpers.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Inertia v3 for Laravel

Use this skill for app-level Inertia decisions in Laravel. It complements $shadcn-vue-laravel, which should stay focused on shadcn-vue component wiring rather than broader Inertia architecture.

Source of Truth

Prefer official Inertia v3 documentation. These are the pages this skill is built around:

Pick the Right Primitive

  • Full page navigation or standard server mutation: use <Link>, router.visit, <Form>, or useForm.
  • Standalone async request with no page visit: use useHttp.
  • Temporary one-time server data: use Inertia::flash(...), then page.flash, onFlash, or the global flash event.
  • Shared shell metadata such as page title or sidebar visibility: use default layouts, layout props, and the documented useLayoutProps() hook.
  • Expensive props that can arrive later: use Inertia::defer(...) and partial reloads.
  • List/detail speedups or likely-next navigation: use prefetching, usePrefetch, and cache tags.
  • Immediate local UI change before the server confirms: use optimistic updates instead of ad hoc rollback logic.
  • Feature or controller verification in Laravel tests: use the Laravel adapter assertions from the testing docs.

Laravel-Specific v3 Rules

  • Treat Inertia v3 packages as ESM-only. Do not reintroduce require() into app bootstrap or Vite config.
  • Expect an ES2022 baseline. If older browsers matter, solve that in Vite or deployment, not by downgrading patterns.
  • router.cancelAll() replaced router.cancel().
  • The old future config block is gone. Remove it rather than trying to carry it forward.
  • Initial page data now comes from a <script type="application/json"> element. Do not rebuild the old data-page flow.
  • For default layouts, prefer createInertiaApp({ layout: ... }) or mutation in the resolve callback.
  • For dynamic layout state, use layout props and useLayoutProps(), not ad hoc globals.

What This Skill Covers

  • Load references/forms-and-data.md for forms, flash data, deferred props, merge semantics, partial reloads, and state persistence.
  • Load references/async-and-navigation.md for useHttp, optimistic updates, layouts, events, prefetching, and cancellation behavior.
  • Load references/testing.md for Laravel adapter endpoint tests, flash assertions, partial reload assertions, and deferred-prop assertions.

Guardrails

  • Do not mix page visits and standalone HTTP requests without a clear reason. If the UI expects a new page object, stay inside Inertia visits.
  • Do not solve flash messages with shared props by default in new v3 code. Prefer the dedicated flash-data flow.
  • Do not hardcode prefetch everywhere. Use it where user intent is strong and invalidation is understood.
  • Do not invent a custom layout state channel when layout props already cover the case.
  • Do not test deferred props or flash data with generic array assertions when the Laravel adapter already provides explicit helpers.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.