From superpowers-laravel
Optimizes Laravel Eloquent queries by selecting only required columns in base queries and relations to reduce memory and data transfer costs. Pairs with eager loading to prevent N+1 issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-laravel:performance-select-columnsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reduce payloads by selecting exact fields:
Reduce payloads by selecting exact fields:
User::select(['id', 'name'])->paginate();
Post::with(['author:id,name'])->select(['id','author_id','title'])->get();
*; keep DTOs/resources aligned with selected fieldsnpx claudepluginhub jpcaparas/superpowers-laravel --plugin superpowers-laravelPrevents N+1 queries in Laravel by guiding eager relation loading, selective field selection, and non-production lazy-loading protection. Optimizes DB performance.
Applies Laravel Eloquent best practices for query optimization, eager loading to avoid N+1, relationships, mass assignment protection, casts, and chunking large datasets.
Complete Eloquent ORM - models, relationships, queries, casts, observers, factories. Use when working with database models.