db-debug

Diagnose PostgreSQL query slowness and connection failures via connectivity checks, slow-query logs, and ORM code review.

28|2|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/MyPrototypeWhat/context-chef --skill db-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-debug
Source: https://github.com/MyPrototypeWhat/context-chef/tree/main/packages/core/src/modules/skill/__fixtures__/valid-full
Command: npx skills add https://github.com/MyPrototypeWhat/context-chef --skill db-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify why database queries are slow and why connections or ORM operations are failing, reducing time spent guessing and restarting services.

Core Features & Use Cases

  • Database connectivity checks: Confirms the database is reachable before deeper investigation.
  • Slow query log inspection: Surfaces problematic queries using slow-query filtering.
  • ORM configuration review: Pulls relevant code context to inspect how your ORM is configured and connected.

Quick Start

Use the db-debug skill to diagnose slow SQL and connection errors by asking it to run a connectivity check, then tail the PostgreSQL slow-query logs, and finally identify the related ORM configuration code to review.

Frequently Asked Questions about db-debug

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

FAQPage Schema
How do I diagnose slow PostgreSQL queries in my application?

Diagnosing slow PostgreSQL queries involves validating database connectivity by executing pg readiness checks, then filtering slow-query logs to identify problematic SQL statements for targeted review.

Why does my ORM throw connection errors when connecting to PostgreSQL?

ORM connection errors often stem from misconfigured database settings. You can review your ORM configuration code and execute a deterministic SELECT 1 check to validate PostgreSQL readiness and isolate the failure.

What is the best way to troubleshoot ORM configuration issues causing slow SQL?

Troubleshooting ORM slow SQL involves retrieving related code context to inspect ORM configuration and connection settings, while concurrently filtering PostgreSQL slow-query logs to correlate problematic queries with code.

Can I use this database debugging process in a production environment?

Yes, this database debugging process applies to both development and production scenarios, using deterministic steps like pg readiness checks and slow-query log filtering that safely diagnose connection failures and query slowness.

How do I check PostgreSQL connectivity before investigating slow query logs?

You check PostgreSQL connectivity by executing deterministic steps for pg readiness or running a SELECT 1 query, confirming the database is reachable before proceeding to inspect slow-query logs.