Skip to content
Back to skills

laravel-review

ASecurity

Reviews uncommitted or staged Laravel changes for framework-specific bugs and anti-patterns (mass assignment, N+1, unscoped tenant queries, fat controllers, missing validation/authorization, secrets, irreversible migrations). Use when the user asks to review their Laravel diff, check changes before committing, or audit recent work.

  • 0 votes
  • 0 copies
  • 3 views
  • Added June 8, 2026
securitygobashgitapisecurity

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned June 8, 2026

npx -y skills add nm-digitalhub/Laravel-skills --skill laravel-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of laravel-review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for laravel-review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nm-digitalhub-laravel-review/badge)](https://www.skillsdirectory.com/skills/nm-digitalhub-laravel-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: laravel-review
description: Reviews uncommitted or staged Laravel changes for framework-specific bugs and anti-patterns (mass assignment, N+1, unscoped tenant queries, fat controllers, missing validation/authorization, secrets, irreversible migrations). Use when the user asks to review their Laravel diff, check changes before committing, or audit recent work.
compatibility: Designed for Claude Code (uses context:fork with the Explore agent). Requires git.
disable-model-invocation: true
context: fork
agent: Explore
allowed-tools: Bash(git diff*), Bash(git status*), Bash(git log*), Read, Grep, Glob
---

# Laravel change review

This runs as a read-only review in an isolated context. Do not modify files — report findings only.

## Changes to review

Staged:
```!
git diff --staged
```

Unstaged:
```!
git diff
```

If both diffs are empty, state that there are no changes to review and stop.

## Review checklist (Laravel 13)

Go through each changed file and flag concrete issues with file:line references. Prioritize correctness and security over style.

**Security & data safety**
- Mass assignment: `Model::create($request->all())` or unguarded fill — should use validated data against `$fillable`/`#[Fillable]`.
- Tenant scoping: any query on tenant-owned tables that isn't scoped to the current tenant/team (global scope, `team_id`, Spatie team context). Cross-tenant leakage is critical.
- Missing validation or authorization at the boundary (no Form Request rules/`authorize()`, no Policy/`$this->authorize()` on a state-changing action).
- Hardcoded secrets/keys; `env()` called outside config files (returns null once config is cached).
- Unescaped output (`{!! !!}`) with user-controlled data.

**Correctness**
- N+1 queries: relations accessed in a loop without `with()`/`load()`/`withCount()`.
- External side effects (API calls, queue dispatch, mail) inside an uncommitted DB transaction without `afterCommit`.
- Non-idempotent writes where retries can double-apply (esp. payment/reconciliation paths) — should use `updateOrCreate`/`upsert`/idempotency keys.
- Migrations: editing an already-applied migration instead of adding a new one; missing or non-reversible `down()`; missing indexes on filtered/joined columns.

**Structure**
- Business logic in controllers or Livewire `mount()`/`render()` instead of an Action/Service.
- Fat model accumulating unrelated logic.
- Duplicated validation instead of a shared Form Request.
- Raw models returned from API endpoints instead of a Resource.
- New helper duplicating a first-party/package capability.

**Tests**
- Behavior changed without a corresponding test; faking missing for external calls; tenant-isolation untested for multi-tenant changes.

## Output format

```
## Review summary
[1–2 sentences on overall risk]

## Blocking issues
- file:line — issue — why it matters — suggested fix

## Suggestions (non-blocking)
- file:line — note

## Looks good
- [what's solid]
```

If there are no blocking issues, say so clearly.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.