一键导入
review
Run a complete code review of the Inertia bundle. Checks protocol compliance and Symfony bundle conventions via static analysis (no automated tools).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run a complete code review of the Inertia bundle. Checks protocol compliance and Symfony bundle conventions via static analysis (no automated tools).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Complete PHP API reference for all Inertia.js v3 prop types (optional/lazy, always, defer, once, merge, deepMerge, scroll). Auto-loaded when working on Props/, Service/Inertia.php, or InertiaResponse.php.
Complete reference for the Inertia.js v3 server-side protocol. Auto-loaded when working on InertiaResponse, InertiaListener, Inertia service, or any HTTP response handling.
Start a TDD cycle for a new Inertia bundle feature or bug fix. Write the test first, then implement.
Plan the implementation of a new Inertia bundle feature before writing any code. Creates a detailed implementation plan.
Reference patterns for creating Symfony 6.4+ reusable bundles using AbstractBundle. Auto-loaded when working on InertiaBundle.php, config/definition.php, config/services.yaml, or any DI configuration.
| name | review |
| description | Run a complete code review of the Inertia bundle. Checks protocol compliance and Symfony bundle conventions via static analysis (no automated tools). |
| allowed-tools | Read, Grep, Glob |
Run this review in parallel using sub-agents:
Use agent protocol-validator on:
src/Response/InertiaResponse.phpsrc/EventListener/InertiaListener.phpsrc/Service/Inertia.phpUse agent bundle-reviewer on:
src/InertiaBundle.phpconfig/definition.phpconfig/services.yamlcomposer.jsondump() and dd() in src/Testing/AssertableInertiaPage.php — intentional testing DSL methods,
same as Laravel's Debugging trait. Acceptable in src/Testing/.Assert::assertTrue(true) in assertPropMissing() — intentional, prevents PHPUnit "risky test"
(no assertions) warning on the "path not found = key is missing" early-return branch.static return type on final class factory methods — equivalent to self, PHPStan does not flag it.X-Inertia-Location header value is the absolute URL ($request->getUri()) — this is correct per
protocol and matches Laravel's $request->fullUrl(). It is NOT a page object url field (which must be relative).Vary: X-Inertia on first-visit HTML responses (InertiaResponse.php:142) — intentional cache protection.
Laravel sets it unconditionally on ALL responses (Middleware.php:139). Without it, a CDN/proxy could serve
a cached JSON response to a real browser (or vice-versa). Do NOT remove.X-Inertia guard on 302→303 conversion (InertiaListener.php:99) — intentional divergence from Laravel.
Laravel uses opt-in middleware (only Inertia routes); Symfony listener fires globally on ALL requests.
Removing the guard would convert 302→303 on non-Inertia API routes too. The guard is correct in Symfony's
architecture. Native browser PUT/PATCH/DELETE forms don't exist in HTML, so the "missed conversion" risk is nil.In InertiaListener::onKernelRequest(), the version mismatch 409 check must run BEFORE any
FlashBag::get() call. get() consumes flash entries; if 'errors' is consumed before the
reflash block, it will be silently lost on the 409 hard-reload cycle.
Summarize findings as:
List all issues with file:line references and suggested fixes.