/laravel-team:eloquent-performancefrom Laravel Guild
Diagnoses and fixes slow Eloquent queries: reading EXPLAIN plans, resolving N+1, pagination choices, and caching decisions. Use when an endpoint or query is slow.
Ships in Laravel Guild. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Measure first. A number without a baseline is a guess; p95/p99, not mean. Reproduce under realistic volume — a plan on 100 rows lies about 10M. One probe decides run-vs-static: no vendor/ (or the first bootstrap fails) → static analysis only, declared as such — never retry-flail an unrunnable app.
EXPLAIN ANALYZE <query> (MySQL 8+ / Postgres). Red flags, in order of blood pressure:
WHERE DATE(created_at) = …) and leading-wildcard LIKE '%x' kill index use — rewrite as a range (created_at BETWEEN …).WHERE + ORDER BY order.Rows Removed by Filter high → same discard problem; check work_mem spills on sorts/hashes.Index handoff to database-developer: the EXPLAIN plan, the query pattern + frequency, and the target verdict — never "add an index" bare.
Model::preventLazyLoading(! app()->isProduction()) (plus preventSilentlyDiscardingAttributes()) in AppServiceProvider::boot throws on lazy loads in non-prod; Pulse Slow Queries / Telescope Queries tab show the repeat pattern; DB::listen(fn ($q) => Log::info('sql', ['sql' => $q->sql, 'ms' => $q->time])) around a reproduction counts them.with(), withCount, withExists, withAggregate on the list query; loadMissing() post-hoc; whereRelation() for single-column constraints; multi-column OR chains → whereAny / whereAll / whereNone instead of PHP filtering.Model::automaticallyEagerLoadRelationships() globally, or $collection->withRelationshipAutoloading() per collection — auto lazy-eager-loads for the whole collection instead of per row. A net, not a substitute for explicit with() on known paths.with('author:id,name'). Measure both ways.chunkById() (safe under mutation — chunk() is not), lazy(), cursor() (single query, no eager loads).upsert(), insertOrIgnore() — no model events fire; if Observers matter, loop in a transaction and say why.Cache::remember($key, $ttl, $fn).Cache::flexible($key, [$fresh, $stale], $fn) — serves stale, recomputes in background.
Cache::memo()->get($key) (L13) — resolves once, then from memory. Sliding expiration → Cache::touch($key, $ttl) extends TTL without get+put.Cache::lock($key)->block($seconds, $fn) around the recompute.Every cache entry states three things or it doesn't ship: key, TTL, exact invalidation trigger. A cache without an invalidation story is a bug with latency. Capture hit ratio for any cache added or touched.
Redis: pipeline batched ops, tag caches for group invalidation, know the eviction policy (maxmemory-policy) before trusting TTLs.
wrk -t4 -c50 -d30s <url> or a k6 script → p50/p95/p99 + req/s. Local or dedicated staging only; shared/prod targets need human sign-off.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
eloquent, laravel, query-performance, n-plus-one, explain-plans, caching
npx claudepluginhub hamzaalayed/laravel-claude-agents --plugin laravel-team8 skills in this plugin
/accessibility-designThe WCAG 2.2 AA audit cookbook for Laravel front-ends and mobile — concrete thresholds (contrast, target size, focus), Livewire / Inertia focus-management specifics, screen-reader semantics, reduced motion, mobile a11y (VoiceOver / TalkBack, dynamic type). Use when designing screens, auditing UI for accessibility, or reviewing frontend / mobile work for the accessibility part of done./delivery-templatesArtifact templates for the planning + coordination roles — requirements doc, user story + acceptance criteria, RICE / WSJF scoring, sprint plan, retro, team-health report, stakeholder update, delivery log. Use when producing any docs/requirements, docs/backlog, docs/roadmap, or docs/sprints artifact, so every document lands in the same shape at the expected path./Other plugins' skills for the same job