| name | description | disable-model-invocation | argument-hint | context | agent |
|---|---|---|---|---|---|
performance |
Analyzes the codebase for easy-win performance improvements. Activate when the user asks about performance, slow queries, N+1 problems, missing indexes, optimization, or wants to find quick wins. |
true |
[top-n] |
fork |
Explore |
Analyze this Laravel codebase and identify the top $ARGUMENTS easy-win performance improvements. Default to top 5 if no number is given.
Work through each category below, searching the codebase thoroughly. Prioritize findings by estimated impact vs effort — favour low-effort, high-impact wins.
- Eloquent relationships loaded inside loops without eager loading
- Missing
with()/load()calls on collections - Repeated calls to relationship accessors across a collection
- Foreign key columns without indexes
- Columns used in frequent
WHERE,ORDER BY, orJOINclauses in queries/scopes that lack indexes - Use
database-schematool to inspect existing indexes before flagging
select *when only a few columns are needed->get()on large tables without pagination or limits->count()or->exists()done inefficiently (e.g. loading a full collection just to count it)- Missing
->chunk()or->lazy()for bulk operations
- Expensive operations called repeatedly in loops
- Computed values that could be cached or memoized
- Redundant database calls for the same data within a single request
- Config, permission, or role lookups that run on every request
- Expensive aggregations that rarely change
- Opportunities for
Cache::remember()around slow queries
- Heavy logic or queries inside Blade templates
- Missing use of
@oncefor repeated components - Synchronous operations that could be deferred
- Sending emails, notifications, or webhooks synchronously in request cycles
- Heavy operations (PDF generation, report exports) blocking HTTP responses
Present findings as a numbered list ranked by impact. For each finding:
- Title — Short description of the issue
- Location — File path and line number(s)
- Problem — What's slow and why
- Fix — Concrete code change or approach to resolve it
- Effort —
Low/Medium/High - Impact —
Low/Medium/High - Git blame - Who committed the code, when and link to commit
Focus only on real findings backed by code you've read — do not speculate. If you find fewer than $ARGUMENTS genuine issues, report only what you find.