Use in Laravel projects when completing a feature, reviewing code, or preparing for merge. Checks Laravel-specific concerns: N+1 queries, mass assignment protection, authorization coverage, validation completeness, security, performance. In Laravel codebases, invoke this alongside superpowers:requesting-code-review. Trigger on any 'review', 'check', 'PR', 'done with feature', 'ready to merge' in a Laravel project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/laravel-vue-superpowers:laravel-code-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Catch Laravel-specific issues before they reach production. Run this **after** the generic `superpowers:requesting-code-review` flow, or as a standalone review for Laravel-specific concerns.
Catch Laravel-specific issues before they reach production. Run this after the generic superpowers:requesting-code-review flow, or as a standalone review for Laravel-specific concerns.
Work through each section. For every [ ] item, check the actual code — don't assume.
N+1 Queries
# Check for relationship access inside loops
grep -rn "foreach\|->each(" app/Http/ app/Services/ app/Actions/
# Then verify: is `with()` used before the loop?
hasMany/belongsToMany relationships loaded inside loops use eager loading (with())$collection->count() called on already-loaded collection (OK), not ->count() (fires query) — distinguish $user->posts->count() from $user->posts()->count()->exists() or ->doesntExist() used instead of counting for existence checksMass Assignment
$fillable defined (prefer) or $guarded = [] (intentional)$request->all() is NOT used for create()/fill() — use $request->validated() or $request->only([...])$fillableMigrations
constrained() and appropriate onDelete behaviorphp artisan migrate:fresh assumption in production migrationsQueries
Model::all() without pagination or explicit small-dataset justificationenv() is NOT called in application code — only config() (env() bypasses config cache)authorize() or uses a Policyauthorize() is called before querying the database (fail fast)guest middlewareauth middleware (not just relying on authorize() inside)# Check for missing authorization
grep -rn "public function " app/Http/Controllers/ | grep -v "__construct\|middleware"
# For each method, verify it calls $this->authorize() or has a policy
$request->validate() if reused)$request->input('field') without prior validation)'items.*.price' => 'required|numeric'$request->validated() used (not $request->all() or $request->input()) after validationDB::select("... WHERE id = '$id'") → use bindings{!! $var !!} (unescaped Blade) only used for explicitly trusted HTMLStorage::disk()config() not hardcoded@csrf or API routes use Sanctum/Passport->paginate(), ->simplePaginate(), ->cursorPaginate())cache()->remember(...))->toArray() for response shaping$tries, $backoff, and failed() method where appropriateHttp::get(...)) check ->failed() or ->throw()Exception or RuntimeException)Mail::fake() etc.)php artisan test --coverage # needs XDEBUG_MODE=coverage
php artisan pint (Laravel Pint) runs clean — no style violationshasMany → plural method name (posts()), belongsTo → singular (user())index, create, store, show, edit, update, destroymodule:action naming (orders:process-overdue)./vendor/bin/pint --test # check style without fixing
./vendor/bin/pint # fix style
After reviewing, report findings grouped by severity:
Blockers (must fix before merge):
Should fix (important but not blocking):
Nice to have (optional improvements):
Looks good (explicit sign-off areas):
php artisan test # run full test suite
./vendor/bin/pint --test # style check
php artisan route:list # verify routes
php artisan model:show Model # check schema/relationships
php artisan queue:failed # check for failed jobs
When the diff touches Inertia controllers or Vue page components, audit these specifically:
Inertia::share() overuse — every shared prop fires on EVERY response. Use page-specific props instead unless data is truly global (auth user, flash messages, app config).Inertia::lazy(fn() => ExpensiveQuery::all()) for partial-reload-only data and Inertia::defer(fn() => ...) for above-the-fold deferral.FormRequest not manual validate() for complex forms.redirect() after mutations; flash data via with().defineProps<{ user: User }>(), not defineProps({ user: Object }). Without TS, IDE + runtime help is lost.useForm for forms, not raw axios/fetch — useForm integrates with Precognition, validation errors, processing state, and Inertia's redirect handling. Raw axios bypasses all of it.<Link> for internal navigation, <a> for external URLs — <Link> triggers Inertia visit; external URLs cause silent 409. (The inertia-link-external-url hook catches this at edit-time.)usePoll for polling, not setInterval — usePoll respects tab visibility, batches with other Inertia visits. (The vue-setinterval-cleanup hook catches missing cleanup.)router.visit with Wayfinder-generated helpers, not hardcoded paths — when Wayfinder is installed, hardcoded paths bypass type safety. (The inertia-hardcoded-route hook catches this.)onUnmounted — manual addEventListener outside Vue's reactivity must be paired with cleanup.When in scope: invoke laravel-inertia-specialist agent for deep audit.
When the diff touches Vue components using Reka UI primitives, audit these specifically:
DialogRoot > DialogTrigger + DialogPortal > DialogContent). Skipping a layer breaks state propagation.v-model:open="state") for cross-component coordination.aria-* on Reka primitives — Reka ships ARIA-by-default. Manual aria-* conflicts with Reka's own management.data-[state=*]: Tailwind modifiers for state-based styling — instead of v-if toggling, use data-[state=open]:animate-in for smooth Reka-managed transitions.asChild correctness — when asChild used, the wrapped child must have exactly ONE root element.<DialogPortal> for floating content — without Portal, Dialog/Popover content can be clipped by parent overflow rules.<DropdownMenuTrigger #default="{ open }"> to access state in trigger.When in scope: invoke laravel-reka-ui-specialist agent for deep audit.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub altraweb/laravel-marketplace --plugin laravel-vue-superpowers