返回 Skill 列表
extension
分类: 开发与工程无需 API Key

Backend Queries

使用参数化语句、适当的索引和高效的数据获取模式编写安全且优化的数据库查询。在编写数据库查询、ORM查询方法、SQL语句或数据访问层代码时使用此技能。当处理包含Prisma查询、TypeORM查询构建器、原始SQL语句、数据库事务逻辑、急切加载和连接、查询优化代码、实现数据分页或过滤的文件、昂贵查询的缓存策略,或者处理数据库连接池和查询超时的文件时,请运用这项技能。

person作者: jakexiaohubgithub

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 database queries using ORMs (Prisma, TypeORM, Drizzle, Sequelize)
  • When constructing raw SQL queries or parameterized statements
  • When implementing data fetching logic in API routes or server components
  • When using query builders or constructing complex WHERE clauses
  • When implementing pagination, filtering, sorting, or search functionality
  • When writing JOIN queries or eager loading related data to avoid N+1 problems
  • When implementing database transactions for data consistency
  • When optimizing slow queries or adding query performance monitoring
  • When setting up query caching strategies or read replicas
  • When implementing query timeouts or connection pooling configurations

Instructions

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