smithery.ai

Backend Queries

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 timeouts, and caching for expensive queries. Use this skill when writing Eloquent queries or raw SQL, optimizing database performance, preventing N+1 query problems with eager loading, implementing database transactions, adding indexes to improve query speed, or caching frequently-run queries. This …

First seen Mar 29, 2026

Installation

$ npx skills add https://smithery.ai

Summary

  • 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 timeouts, and caching for expensive queries.
  • Use this skill when writing Eloquent queries or raw SQL, optimizing database performance, preventing N+1 query problems with eager loading, implementing database transactions, adding indexes to improve query speed, or caching frequently-run queries.
  • This skill applies when working with Eloquent query builder, raw database queries, query optimization, or any code that interacts with the database.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,756 B
  • docs SUMMARY.md 665 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

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](../../../agent-os/standards/backend/queries.md)