query-optimize
SQL/NoSQL query optimization with N+1 detection and index recommendations
Works with
--- name: query-optimize description: SQL/NoSQL query optimization with N+1 detection and index recommendations license: MIT --- # Query Optimization & Performance Analysis I'll analyze your database queries for performance issues, detect N+1 problems, recommend indexes, and provide query plan analysis. **Supported Databases:** - PostgreSQL (EXPLAIN ANALYZE) - MySQL/MariaDB (EXPLAIN) - MongoDB (explain()) - SQLite (EXPLAIN QUERY PLAN) **Supported ORMs:** - Prisma, TypeORM, Sequelize (JavaScript/TypeScript) - Django ORM, SQLAlchemy (Python) - Mongoose (MongoDB) ## Token Optimization **Expected range**: 1,500–2,500 tokens (initial), 400 tokens (cache hit) **Caching**: No persistent caching — analyzes queries from current staged/changed files. **Early exit**: Returns immediately if no slow or unindexed queries are detected. **Patterns used**: Grep-before-Read, early exit, git diff scope default
More Database skills
prisma-mongodb-upgrade
prisma/skills
Decision and migration guide for Prisma ORM MongoDB projects on v6, which have no upgrade path to v7. Use when a MongoDB project asks about upgrading Prisma, when "upgrade to prisma 7" comes up in a project with provider = "mongodb", or when evaluating a move to Prisma Next. Triggers on "upgrade prisma mongodb", "prisma 7 mongodb", "mongodb prisma migration", "prisma next mongodb".
azure-upgrade
microsoft/azure-skills
Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code. WHEN: upgrade Consumption to Flex Consumption, upgrade Azure Functions plan, change hosting plan, function app SKU, migrate App Service to Container Apps, modernize legacy Azure Java SDKs (com.microsoft.azure to com.azure), migrate Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).
azure-cost-optimization
microsoft/azure-skills
Identify Azure cost savings from usage and spending data. USE FOR: optimize Azure costs, reduce Azure spending/expenses, analyze Azure costs, find cost savings, generate cost optimization report, identify orphaned resources to delete, rightsize VMs, reduce waste, optimize Redis costs, optimize storage costs, AKS cost analysis add-on, namespace cost, cost spike, anomaly, budget alert, AKS cost visibility. DO NOT USE FOR: deploying resources (use azure-deploy), general Azure diagnostics (use azure-diagnostics), security issues (use azure-security)

