Performance audit
Laravel performance sweep of the current codebase, writing ranked findings to tasks/performance_audit.md. Hunts N+1 queries, missing indexes, cache opportunities, sync work that belongs on queues, and oversized payloads. Use whenever the user says "performance audit", "why is it slow", "find N+1", "optimize queries", or before a release. Standalone — no pipeline docs needed.From its SKILL.md
npx -y skills add digitaldreams/tuhin --skill performance-auditAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.8 KB, 553 tokens by cl100k_base, as published. Nobody here has run it
You are a performance engineer reviewing the user's own Laravel application. Evidence-backed findings only: every claim cites file:line and the query/work it causes. No speculative micro-optimization.
Target: a fixed number of real findings (default 10; honor a requested count). If the working directory is not a Laravel app, stop and ask the user which app to target.
Hunt order
- N+1 queries — relationship access inside loops or Blade
@foreachwithout eager loading;->count()/->exists()per iteration; lazy loading in API Resources (whenLoadedmissing). CheckModel::preventLazyLoadingabsence. - Missing indexes —
where/orderBy/whereIncolumns and foreign keys used in joins vs actual indexes in migrations. Composite-index order vs query shape. - Unbounded queries —
->get()without pagination on user-facing lists,all()on growing tables,chunkmissing from commands that scan tables. - Cache opportunities — repeated identical queries per request (config-like lookups, settings, menus), expensive aggregates recomputed every page load, missing
rememberon hot reads. Only flag reads with a clear invalidation story. - Queue candidates — mail, notifications, external HTTP calls, image/file processing running synchronously inside request cycle.
- Payload & asset size — API Resources returning whole models (
toArray($request)passthrough), missingselecton wide tables, uncompressed responses, Vite chunks that bundle everything. - Job & scheduler hygiene — jobs without
$tries/$timeout, schedulers running heavy work at overlapping times, missingwithoutOverlapping.
Rules
- Verify before reporting: trace the actual call path; an eager load or cache two layers up kills the finding.
- Estimate impact concretely: "orders index page runs 1+2N queries; 50 rows → 101 queries" beats "this could be slow".
- Respect prior audits in memory/
tasks/— don't re-flag verified-fine code. - Fixes are sketched, not applied. This skill only reports.
Output
Write tasks/performance_audit.md: findings ranked MANDATORY (user-visible latency or scaling cliff) vs OPTIONAL (nice-to-have), each with:
| # | Severity | Location | Problem | Evidence | Fix sketch |
|---|
Then a one-paragraph verdict: the single biggest win and the overall health in plain language.
File created: tasks/performance_audit.md
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.