analyze-performance

Analyzes PostgreSQL query execution plans and detects database performance bottlenecks.

3|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/gabrielnsmnto/kord-aios --skill analyze-performance-gabrielnsmnto
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: analyze-performance
Source: https://github.com/gabrielnsmnto/kord-aios/tree/main/src/features/builtin-skills/kord-aios/database/analyze-performance
Command: npx skills add https://github.com/gabrielnsmnto/kord-aios --skill analyze-performance-gabrielnsmnto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow database queries and hidden performance bottlenecks are hard to diagnose without deep knowledge of PostgreSQL internals. This Skill automates query plan analysis, system-wide hotpath detection, and guided optimization so you can find and fix slow queries without manually writing diagnostic SQL. ## Core Features & Use Cases - Query Plan Analysis: Runs EXPLAIN ANALYZE with BUFFERS and VERBOSE on any SQL query and interprets the execution plan with actionable recommendations. - Hotpath Detection: Scans pg_stat_statements and pg_stat_user_tables to surface the slowest queries, sequential scans, table bloat, missing foreign-key indexes, unused indexes, cache hit ratios, and connection pool status. - Interactive Optimization: Walks you through a guided session to baseline a slow query, inspect table statistics, review existing indexes, and create new indexes with before/after verification. - Use Case: Your Supabase-backed API endpoint suddenly responds slowly. Run the hotpaths analysis to identify that a frequently called query performs a sequential scan on a large table, then use the interactive mode to add the right index and confirm the improvement with EXPLAIN ANALYZE. ## Quick Start Ask the agent to analyze the performance of your slow SQL query or scan the database for performance hotpaths.

Frequently Asked Questions about analyze-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a slow PostgreSQL query execution plan?▼

Run the query analysis mode, which executes EXPLAIN (ANALYZE, BUFFERS, VERBOSE) on your SQL via psql and interprets the plan. It flags sequential scans, high buffer reads, and suggests indexes on WHERE, JOIN, and ORDER BY columns.

How to find missing indexes in a PostgreSQL database?▼

The hotpaths analysis queries information_schema and pg_indexes to find foreign key columns (ending in _id) without indexes, and outputs ready-to-run CREATE INDEX statements ordered by table size.

Does this work with Supabase databases?▼

Yes, it connects through the SUPABASE_DB_URL environment variable using psql, so it works with any Supabase or standard PostgreSQL database. Hotpath analysis requires the pg_stat_statements extension to be enabled.

Why does hotpath analysis return no slow query data?▼

The slowest and most frequent query reports depend on the pg_stat_statements extension. Enable it with CREATE EXTENSION IF NOT EXISTS pg_stat_statements, and note that statistics only accumulate after the extension is active.

What are the limitations of automated query optimization?▼

The interactive mode uses simplified table-name extraction rather than full SQL parsing, so index suggestions are heuristic. Always verify index impact with EXPLAIN ANALYZE before and after creation, and test on production-like data volumes.