api-performance-optimization
Installation
SKILL.md
API Performance Optimization
Prerequisite: database-patterns covers N+1 prevention and Promise.all for parallel queries. This skill covers the next tier: lean selects, response minimization, aggregation strategy, bulk write guards, and baseline tracking.
1. Lean select vs include
Rule: Never include a full relation when you only need a subset of fields. Use select inside include to project only required fields.
// ❌ Over-fetches — loads all user fields for every task
prisma.task.findMany({ include: { assignee: true } });