Write efficient and secure database queries using parameterized queries, eager loading to prevent N+1 problems, selective column fetching, strategic indexing, transactions for related changes, query...
SKILL.md
Backend Queries
When to use this skill
When writing Eloquent queries or using the query builder
When writing raw SQL queries for complex operations
When optimizing database performance and query execution time
When preventing N+1 query problems with eager loading (with(), load())
When implementing database transactions for data consistency
When adding indexes to database columns for query optimization
When caching frequently-run or expensive queries
When selecting only needed columns instead of using SELECT *
When implementing query timeouts to prevent runaway queries
When working with WHERE, JOIN, or ORDER BY clauses
When debugging slow database queries or performance issues
When implementing pagination or filtering in API endpoints
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend queries.
Instructions
For details, refer to the information provided in this file:
backend queries