Use when you need to analyze, profile, or optimize database queries. This skill provides database query performance analysis with comprehensive guidance. Trigger with phrases like "profile queries", "optimize SQL", "find N+1 queries", "slow query analysis", "index recommendations", or "database performance".
How this skill is triggered — by the user, by Claude, or both
Slash command
/database-query-profiler:database-query-profilingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides automated database query performance analysis and optimization recommendations.
This skill provides automated database query performance analysis and optimization recommendations.
Before using this skill, ensure:
select_related / prefetch_related (Django)includes / joins / eager_load (ActiveRecord)joinedload / subqueryload (SQLAlchemy)include (Prisma) or relations (TypeORM)This skill produces:
Query Inventory: Complete list of queries with file locations and frequency
N+1 Report: All N+1 patterns identified with exact code locations and fixes
Index Recommendations: CREATE INDEX statements with rationale
Optimization Report: Before/after query rewrites with EXPLAIN comparison
Connection Analysis: Pooling configuration recommendations
Estimated Impact: Performance improvement estimates for each recommendation
Cannot Access Database:
ORM Abstraction:
Complex Queries:
PostgreSQL EXPLAIN: https://www.postgresql.org/docs/current/sql-explain.html MySQL EXPLAIN: https://dev.mysql.com/doc/refman/8.0/en/explain.html Use The Index, Luke: https://use-the-index-luke.com/
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
npx claudepluginhub stefanfaur/roach-marketplace --plugin database-query-profiler