Laravel Query Builders
Generates efficient Laravel query builder code from natural language requests, streamlining database interactions.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add laravel-query-builders npx -- -y @trustedskills/laravel-query-builders
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"laravel-query-builders": {
"command": "npx",
"args": [
"-y",
"@trustedskills/laravel-query-builders"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill enables AI agents to construct and execute dynamic database queries using Laravel's Eloquent ORM and query builder syntax. It allows for complex data retrieval, filtering, and manipulation directly within the application context.
When to use it
- Fetching specific user records based on dynamic criteria like role or subscription status.
- Aggregating sales data from multiple related tables with joins and grouping.
- Updating batch records in bulk without writing raw SQL statements.
- Generating paginated lists of items for dashboard displays.
Key capabilities
- Dynamic query construction using Eloquent model methods.
- Fluent interface chaining for complex filtering conditions.
- Support for database joins, unions, and subqueries.
- Automatic handling of SQL injection prevention.
- Efficient pagination support for large datasets.
Example prompts
- "Retrieve all active users who have made a purchase in the last 30 days."
- "Update the stock quantity for products where the current inventory is below 10 units."
- "Generate a report showing total revenue grouped by category and month."
Tips & gotchas
Ensure your Laravel environment is properly configured with the necessary database credentials before executing queries. Always validate input parameters to prevent unintended data exposure or logic errors in complex joins.
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.