Agent skill

laravel-performance-select-columns

Select only required columns to reduce memory and transfer costs; apply to base queries and relations

Stars 6
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/noartem/skills/tree/main/skills/laravel-performance-select-columns

SKILL.md

Select Only Needed Columns

Reduce payloads by selecting exact fields:

php
User::select(['id', 'name'])->paginate();

Post::with(['author:id,name'])->select(['id','author_id','title'])->get();
  • Avoid *; keep DTOs/resources aligned with selected fields
  • Combine with eager loading to avoid N+1

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results