Backend Queries

Write efficient, secure database queries that prevent SQL injection, avoid N+1 problems, and optimize performance through proper indexing and caching strategies. Use this skill when writing SQL queries for PostgreSQL, MySQL, SQLite, or any SQL database; when using ORM query builders like Prisma, Sequelize, TypeORM, ActiveRecord, Django ORM; when implementing parameterized queries to prevent SQL injection; when optimizing query performance with proper indexing; when eager loading relationships to avoid N+1 queries; when selecting specific columns instead of SELECT *; when wrapping related operations in transactions for data consistency; when implementing query timeouts to prevent runaway operations; when caching expensive query results; or when working with database query optimization and performance tuning. Use when this capability is needed.

tomevault-io 145f4b8 2 files · 2.5 KB Updated

File contents

Backend Queries

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.

When to use this skill

  • When writing SQL queries or using ORM query builders
  • When preventing SQL injection with parameterized queries
  • When optimizing queries to avoid N+1 problems
  • When selecting specific columns for better performance
  • When indexing columns used in WHERE, JOIN, and ORDER BY clauses
  • When wrapping related database operations in transactions
  • When implementing query timeouts and performance safeguards
  • When caching expensive or frequently-run query results
  • When working with PostgreSQL, MySQL, SQLite, ORMs, or database query optimization

Instructions

For details, refer to the information provided in this file: backend queries


Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/shynlee04--idumb-v2--backend-queries commit 145f4b8ccb

Frequently asked questions

npx skillmds@latest add tomevault-io/backend-queries