laravel
Skill4 starsChanged 4 months agoMITView on GitHub
Brownfield Laravel audit — scan an existing app for facade abuse, missing FormRequests, sync queues in production, leaked .env secrets, and N+1 queries, then emit evidence-backed FINDINGS ranked by ROI so remediation is prioritised, not guessed. Use when the user wants an audit of an existing Laravel application — find facade abuse, missing FormRequests, sync queues in production, leaked .env secrets, or N+1 queries; the user wants to find N+1 query problems, eager-loading gaps, or a sync queue driver running in production across an existing Laravel codebase; the user wants to check a Laravel app for controllers that validate inline instead of using FormRequests, or for secrets and credentials leaked into a committed .env file. Keywords: audit, report, laravel, findings, roi, brownfield, facade, formrequest, queue, env, secrets, n+1, eloquent, security, анализ, laravel-аудит.
- Reads credentials
14 other projects use a version of this.
Adopted by
Most recently taken up by
- hmj1026/dhpktheir own version, first seen Nov 6, 2026
- reisi007/agents-skillstheir own version, first seen Nov 5, 2026
- turkeryildirim/ai-skillstheir own version, first seen Nov 1, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- Mindrally/skillstheir own version, first seen Oct 8, 2026
- gingerminds/claude-skillstheir own version, first seen Sep 23, 2026
Used with
Projects with it also use wordpress, react and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
iamandrewpetersSkillwordpress
Use this skill when working on WordPress development tasks including plugins, themes, shortcodes, hooks, WP-CLI commands, multisite, custom post types, meta boxes, the REST API, or debugging WordPress issues.
Also in 3 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 6 projects that use this
OpenAISkillnextjs
Next.js App Router expert guidance. Use when building, debugging, or architecting Next.js applications — routing, Server Components, Server Actions, Cache Components, layouts, middleware/proxy, data fetching, rendering strategies, and deployment on Vercel.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- Mindrally/skills★ 275same name
- youlaitech/youlai-skills★ 63same name
- rawveg/skillsforge-marketplace★ 40same name
- G1Joshi/Agent-Skills★ 15same name
- ulpi-io/browse★ 15same name
- turkeryildirim/ai-skills★ 4same name
- dafaalz/agent-skills★ 2same name
- gingerminds/claude-skills★ 2same name
- hmj1026/dhpk★ 2same name
- hawk-digital-environments/ai-skills★ 1same name
4 more not listed
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 repository119 other files it gives its agents.
- strategy-bitrix-d7-incrementalSkill
- strategy-explicit-over-magicSkill
- strategy-framework-conventionsSkill
- strategy-legacy-safe-editsSkill
- strategy-minimal-diffSkill
- strategy-no-untested-refactorSkill
- strategy-preserve-public-apiSkill
- strategy-readonly-immutabilitySkill
- strategy-security-firstSkill
- strategy-test-drivenSkill
- openapiSkill
- paginationSkill
- rest-designSkill
- versioningSkill
- cqrsSkill
- dependency-inversionSkill
- hexagonalSkill
- repository-patternSkill
- service-layerSkill
- bitrixSkill
- findings-reportSkill
- performanceSkill
- phpSkill
- project-analysisSkill
- refactoringSkill
- roi-prioritizationSkill
- securitySkill
- stack-detectionSkill
- cache-layersSkill
- component-engineSkill
- d7-eventsSkill
- d7-loaderSkill
- d7-orm-queriesSkill
- iblock-elementsSkill
- kernel-main-moduleSkill
- localizationSkill
- controllersSkill
- ormSkill
- validationSkill
- controllersSkill
- query-builderSkill
- routingSkill
- autoload-psr4Skill
- dependency-managementSkill
- scriptsSkill
- connection-poolingSkill
- mysql-indexingSkill
- redisSkill
- transactionsSkill
- ci-github-actionsSkill
- deployment-strategiesSkill
- docker-phpSkill
- env-configSkill
- associationsSkill
- entities-mappingSkill
- orm-basicsSkill
- entity-apiSkill
- module-developmentSkill
- routing-controllersSkill
- formsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 84
Do not use this skill on a non-Laravel PHP app (Symfony, Bitrix, plain PHP).
- Distinctive: line 86
Do not run this audit when the user asks to implement one Laravel feature or fix one specific bug.
- Distinctive: line 142
Verify: Every finding has all required fields populated, a path:line in evidence, and no live secrets echoed.
- Distinctive: line 145
Verify: The report is ordered by roi_score descending with the score shown on each finding.
- Distinctive: line 149
Verify: Each remediation names a next step.
- Distinctive: line 169
Verify: You have candidate locations for missing FormRequests, facade abuse, sync queues, secrets, and N+1.
- Distinctive: line 173
Verify: Every retained candidate has a confirmed path:line and, for N+1, a measured query count.
- Distinctive: line 177
Verify: Each candidate has severity, impact, effort (1-5) and confidence (0.5-1.0) grounded in its evidence.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- generated: do not edit — source: knowledge/atoms/audit/laravel/ --><!-- schema: atomVersion=3 skillVersion=2 graphVersion=1 --><!-- compile: @php-skills/compiler v1.0.0 (deterministic build) -->Audit — Laravel Smells
When to use
- The user wants an audit of an existing Laravel application — find facade abuse, missing FormRequests, sync queues in production, leaked .env secrets, or N+1 queries.
- The user wants to find N+1 query problems, eager-loading gaps, or a sync queue driver running in production across an existing Laravel codebase.
- The user wants to check a Laravel app for controllers that validate inline instead of using FormRequests, or for secrets and credentials leaked into a committed .env file.
When NOT to use
- Do not use this skill on a non-Laravel PHP app (Symfony, Bitrix, plain PHP); its checks target Laravel facades, FormRequests, Eloquent, and the queue config that only exist there.
- Do not run this audit when the user asks to implement one Laravel feature or fix one specific bug; make the minimal targeted change instead of scanning the whole app.
Core guidance
- Emit structured FINDINGS, not prose — Report each Laravel smell as a FINDING with
id(AUD-LARAVEL-{nnn}),title,evidence(path:line),domain,severity,impact,effort(1-5),confidence(0.5-1.0),roi_score,remediation, andtags— never a free-form paragraph. - Never emit a finding without evidence — Every finding MUST carry concrete
evidenceaspath:line— a controller action, a config key, an .env entry, or an Eloquent loop you actually read; no location, no finding. - Rank findings by ROI score — Compute
roi_score = (impact * severity * confidence) / effortfor every finding and sort the report descending, so leaked secrets and hot-path N+1 rise above cosmetic facade cleanups.
Decision Engine
Walk this section before choosing an implementation path.
For the smell you found, does it expose data or credentials (security), degrade
production behavior (reliability/performance), or is it purely a maintainability concern?
├── Pure maintainability concern: → Lower severity — facade abuse in domain code or business logic in controllers that hurts
testability but does not break production. Emit a finding with modest impact; remediation
is inject dependencies / move logic into services, ranked below security and reliability.
├── Degrades production behavior: → High impact — a sync queue driver in production or an N+1 query on a hot endpoint.
Emit a finding; remediation is switch to a real queue driver / add eager loading, scored
by request volume and user-facing latency.
└── Exposes data or credentials: → Highest severity — a leaked .env secret or a controller taking unvalidated input straight
from the request. Emit a security finding; remediation is rotate the secret / add a
FormRequest, and this outranks pure maintainability items at equal effort.
Full engine: references/decision-engine.md — Decision Tree, Priority Matrix, Decision Table.
Workflows
Workflow: Emit Report
Progress:
- [ ] Build one finding per confirmed smell with `id` (`AUD-LARAVEL-{nnn}`), `title`, `evidence`,
`domain`, `severity`, `impact`, `effort`, `confidence`, `remediation`, and `tags`, redacting
any secret values
- [ ] Compute `roi_score = (impact * severity * confidence) / effort` for each finding and sort
the report descending so leaked secrets and hot-path N+1 lead
- [ ] For each finding, write remediation that names the fix and links to the Laravel
implementation skill that performs it (queues, eloquent-relationships,
service-container), then hand the ranked report off as input to scoped fix tasks- Build one finding per confirmed smell with
id(AUD-LARAVEL-{nnn}),title,evidence,domain,severity,impact,effort,confidence,remediation, andtags, redacting any secret values.- Verify: Every finding has all required fields populated, a path:line in evidence, and no live secrets echoed.
- Compute
roi_score = (impact * severity * confidence) / effortfor each finding and sort the report descending so leaked secrets and hot-path N+1 lead.- Verify: The report is ordered by roi_score descending with the score shown on each finding.
- For each finding, write remediation that names the fix and links to the Laravel
implementation skill that performs it (queues, eloquent-relationships,
service-container), then hand the ranked report off as input to scoped fix tasks.
- Verify: Each remediation names a next step; queue and N+1 items reference the matching implementation skill.
Workflow: Scan Laravel
Progress:
- [ ] Grep controllers for `$request->all()` / inline validation, domain classes for facade
calls, config and .env for `QUEUE_CONNECTION` and committed secrets, and Eloquent loops
for per-row relation access
- [ ] Open each candidate and confirm the smell — read the controller, check the production
config value, verify the secret is real (not a placeholder), and measure the N+1 with the
query log — recording the exact path:line
- [ ] Walk the Decision Engine to classify each confirmed smell as security, reliability, or
maintainability, then set severity and impact from that class and estimate effort and
confidence- Grep controllers for
$request->all()/ inline validation, domain classes for facade calls, config and .env forQUEUE_CONNECTIONand committed secrets, and Eloquent loops for per-row relation access.- Verify: You have candidate locations for missing FormRequests, facade abuse, sync queues, secrets, and N+1.
- Open each candidate and confirm the smell — read the controller, check the production
config value, verify the secret is real (not a placeholder), and measure the N+1 with the
query log — recording the exact path:line.
- Verify: Every retained candidate has a confirmed path:line and, for N+1, a measured query count.
- Walk the Decision Engine to classify each confirmed smell as security, reliability, or
maintainability, then set severity and impact from that class and estimate effort and
confidence.
- Verify: Each candidate has severity, impact, effort (1-5) and confidence (0.5-1.0) grounded in its evidence.
Best practices
- Assess queue, cache, session, and debug settings against the production config and
environment, not the local
.env.example - Confirm a suspected N+1 by observing the query count — Laravel Debugbar, Telescope, or
DB::enableQueryLog()— rather than assuming a loop over a relation is always N+1; some relations are already eager-loaded upstream or resolved once - In each finding's
remediation, point to the implementation skill that performs the fix — the queues skill for sync-in-prod, the eloquent-relationships skill for N+1, the service-container skill for facade injection — so the reader knows exactly how to act
Anti-patterns
| Anti-pattern | Why it fails | Do instead |
| Auto-fixing smells during the audit | Mixing analysis with edits blurs scope, produces unreviewed changes, and hides which smells were present. | Keep the audit read-only; emit findings and remediation, then let scoped fix tasks under<br>the relevant Laravel skills apply the top-ranked changes. |
| Emitting findings without evidence | Reviewers cannot verify, action, or track a finding that points at nothing concrete. | Attach path:line evidence to every finding; if you cannot cite a location, drop it or<br>lower its confidence and mark it as needing manual confirmation. |
| Reprinting the secret in the finding | The audit output is itself shared and stored, so echoing live secrets widens the exposure it is meant to close. | Cite only the file:line and the secret's name (e.g. DB_PASSWORD at .env:14); redact the<br>value and recommend rotation. |
See references/anti-patterns.md.
Debugging
- Flagging .env.example placeholders as leaks — The template file is meant to be committed; only real values that grant access are actual leaks. Fix: Confirm the file is a real committed
.env(not.env.example) and that the value is a working credential before raising a secret-leak finding. - Flagging idiomatic facade use as abuse — Facade abuse is about global state leaking into domain logic, not the framework's intended HTTP and CLI glue. Fix: Scope facade-abuse findings to domain and service classes where injection would improve testability; leave idiomatic glue-layer usage alone or note it at low severity.
- Reporting local sync queue as a prod issue — The finding measures production risk, so the deployed config is what matters, not a developer's machine. Fix: Verify the production environment or deployment config before flagging sync-in-prod; if production uses a real driver, drop the finding or downgrade it to an informational note.
Performance notes
- Confirm N+1 with the query log, not by eye — Confirm a suspected N+1 by observing the query count — Laravel Debugbar, Telescope, or
DB::enableQueryLog()— rather than assuming a loop over a relation is always N+1; some relations are already eager-loaded upstream or resolved once.
Production checklist
- Every finding carries concrete path:line evidence pointing at code or config that was actually read.
- Queue, cache, session, and debug findings are assessed against the deployed production config, not local defaults.
- The pass produces findings and remediation guidance only; it does not apply fixes or edit the app as a side effect.
- Each finding's remediation names a concrete next step and, where one exists, the Laravel implementation skill that performs it.
- The report lists findings sorted descending by roi_score with impact, severity, effort, and confidence shown.
- Any committed or hard-coded secret is raised as a high-severity finding whose remediation includes rotation, not just removal.
Version notes
- preventLazyLoading available from Laravel 8 (PHP >=7.4) —
Model::preventLazyLoading()for surfacing N+1 in non-production has been available since Laravel 8 and works across the 9.x–12.x range this audit targets; on older apps rely on the query log or Telescope instead.
Security
- Prioritise input validation and secret exposure — Treat missing FormRequests and leaked secrets as the security core of the audit: unvalidated request input is an injection and mass-assignment vector, and a committed credential is an immediate breach. Cite the file:line, redact secret values, and always recommend rotation for exposed credentials, never mere deletion.
Testing
- Activation and decision behavior are verified in
eval/scenarios/audit/laravel.yaml.
Additional resources
- references/anti-patterns.md
- references/core.md
- references/decision-engine.md
- references/examples.md
- references/pitfalls.md
- references/recipes.md
- references/version-differences.md
Knowledge graph
Related: audit/project-analysis, laravel/eloquent-relationships, laravel/queues
<!-- graph-fragment: graph/fragments/audit/laravel.yaml -->Skill contract
Produces: audit.laravel-findings
Requires: repo.laravel-app
Risk: medium · Confidence: 0.9
<!-- contract-fragment: contracts/fragments/audit/laravel.yaml -->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
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.

