Provides database health diagnostics via slow query analysis, bottleneck identification, and Postgres inspection.
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
execute_sql tool MUST be available and authenticated.pg_stat_statements extension MUST be enabled on the target database. If not enabled, HALT and instruct the operator to run CREATE EXTENSION IF NOT EXISTS pg_stat_statements;.SELECT query, calls, mean_exec_time, total_exec_time, rows FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 20; via MCP execute_sql.mean_exec_time and calls count.mean_exec_time > 100ms as a slow-query candidate.SELECT relname, seq_scan, idx_scan, n_live_tup, n_dead_tup, last_autovacuum FROM pg_stat_user_tables ORDER BY seq_scan DESC; via MCP execute_sql.seq_scan > 1000 AND idx_scan = 0 — these indicate missing indexes.n_dead_tup > 10000 — these indicate vacuum backlog.SELECT indexrelname, idx_scan, idx_tup_read, idx_tup_fetch FROM pg_stat_user_indexes WHERE idx_scan = 0 ORDER BY idx_tup_read DESC; via MCP execute_sql.SELECT state, count(*) FROM pg_stat_activity GROUP BY state; via MCP execute_sql.SELECT relation::regclass, mode, granted FROM pg_locks WHERE NOT granted; via MCP execute_sql.max_connections.The agent MUST produce a structured report containing:
HALT if any category is CRITICAL and surface the finding immediately.