Laravel Performance Select Columns
Optimize Laravel queries by selecting only necessary columns to reduce database load and improve application performance.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add laravel-performance-select-columns npx -- -y @trustedskills/laravel-performance-select-columns
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"laravel-performance-select-columns": {
"command": "npx",
"args": [
"-y",
"@trustedskills/laravel-performance-select-columns"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill optimizes Laravel database queries by allowing you to specify exactly which columns should be retrieved. Selecting only the necessary columns reduces data transfer and memory usage, leading to faster query execution times and improved application performance. It's particularly useful when dealing with large tables or complex relationships.
When to use it
- Fetching user profiles: Instead of
SELECT * FROM users, retrieve justSELECT id, name, email FROM users. - Generating reports: Only select the columns needed for a specific report instead of pulling all data from related tables.
- API endpoints: Reduce payload size by only retrieving fields requested by the client.
- Data export: When exporting data to CSV or other formats, specify only the required columns.
Key capabilities
- Specifies column selection in Laravel queries.
- Reduces database load and query execution time.
- Optimizes memory usage during data retrieval.
- Improves overall application performance.
Example prompts
- "Optimize this Eloquent query to only retrieve the 'name' and 'email' columns from the
userstable." - "How can I select specific fields when querying a relationship in Laravel?"
- “Refactor this query to improve its performance by selecting only the necessary columns.”
Tips & gotchas
- This skill requires a working Laravel project.
- Be mindful of relationships; ensure you're fetching all required data from related tables if needed.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.