PyModel

Pg Slow — Data skill for Claude Code

Data community

Find the queries eating your PostgreSQL database (pgbot).

How to install Pg Slow

Installs to ~/.claude/skills/pymodel-pgbot-pg-slow/SKILL.md

Terminal
mkdir -p ~/.claude/skills/pymodel-pgbot-pg-slow && curl -fsSL https://raw.githubusercontent.com/PyModel/pgbot/HEAD/commands/pg-slow.md -o ~/.claude/skills/pymodel-pgbot-pg-slow/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Pg Slow does


description: Find the queries eating your PostgreSQL database (pgbot) argument-hint: "[connection-string]"

Identify the queries consuming the most database time.

Use the pgbot `top_queries` MCP tool if it's connected, otherwise run `pgbot queries "$ARGUMENTS"` (fall back to `$DATABASE_URL`). Also run `pgbot tables "$ARGUMENTS"` to spot a large table taking heavy sequential scans — that's a missing-index signal, and it often correlates with a hot query filtering the same table.

Report

Alternatives in Data

  • SQL Queries — Generate SQL queries from natural language across major dialects 7.8k ★
  • MySQL — Safe read-only SQL queries against MySQL databases 159 ★
  • Postgres Wizard — 🗄️ PostgreSQL Wizard 96 ★

Full documentation available on GitHub

View Source Repository