📋 Laravel Performance Select Columns

This skill helps you optimize Laravel queries by selecting only needed columns in base queries and relations, reducing memory usage and payloads.

QUICK INSTALL
npx playbooks add skill noartem/skills --skill laravel-performance-select-columns

Laravel Performance Select Columns instructions

Select Only Needed Columns

Reduce payloads by selecting exact fields:

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

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.