database-monitoring-specialist

Monitor PostgreSQL and Supabase databases for performance regressions and slow queries.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Whaleylaw/llm-lawyer --skill database-monitoring-specialist
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database-monitoring-specialist
Source: https://github.com/Whaleylaw/llm-lawyer/tree/main/.claude/skills/database-monitoring-specialist
Command: npx skills add https://github.com/Whaleylaw/llm-lawyer --skill database-monitoring-specialist

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured, repeatable approach to observe and diagnose PostgreSQL/Supabase performance problems so teams can find slow queries, track resource usage, and prevent production regressions.

Core Features & Use Cases

  • Query Diagnostics: Ready-to-run SQL diagnostics for pg_stat_statements and pg_stat_activity to find slow and high-impact queries.
  • Resource & Growth Monitoring: Queries and checks for database size, table/index sizes, cache hit ratios, and connection health to identify capacity and bloat issues.
  • Alerting & Dashboards: Guidance for thresholds, simple monitoring scripts, and integration notes for Supabase Reports or external APMs to trigger alerts on latency, connections, and disk usage.
  • Use Case: On a production Supabase instance experiencing intermittent user-facing latency, use these diagnostics to identify top offenders, tune indexes, and set alerts to catch regressions early.

Quick Start

Run the SQL diagnostics and reporting queries against your Supabase database and return the top slow queries, cache hit ratios, and connection overview.

Frequently Asked Questions about database-monitoring-specialist

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

FAQPage Schema
How do I monitor PostgreSQL slow queries in Supabase?▼

To monitor PostgreSQL slow queries in Supabase, run ready-to-use SQL diagnostics querying pg_stat_statements and pg_stat_activity to identify top offenders by latency and impact, pinpointing exact queries causing performance regressions.

What is the best way to check Supabase database connection health and cache hit ratio?▼

Checking Supabase database connection health and cache hit ratio involves running specific SQL checks for resource and growth monitoring. This measures database capacity, table bloat, and cache efficiency to identify performance bottlenecks.

How do I set up alerts for PostgreSQL performance regressions?▼

Setting up alerts for PostgreSQL performance regressions requires configuring threshold values for latency, connections, and disk usage, applying these thresholds within Supabase Reports or external APMs to trigger automated alerts.

Can I use pg_stat_statements to tune indexes on a production Supabase instance?▼

Yes, you can use pg_stat_statements to tune indexes on a production Supabase instance by identifying high-impact and slow queries. The diagnostics highlight query latency patterns, allowing you to target and tune indexes for optimal database performance.

Does this database monitoring approach work for staging instances?▼

Yes, this database monitoring approach works for staging instances. You can apply the SQL diagnostics, resource checks, and alert configurations to both production and staging environments to measure query latency and prevent regressions before deployment.