civitai

Diagnose Seq Scans — Development skill for Claude Code

Development community

Remedy high seq scans on a table.

How to install Diagnose Seq Scans

Installs to ~/.claude/commands/civitai-civitai-diagnose-seq-scans.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/civitai/civitai/HEAD/.claude/commands/diagnose-seq-scans.md -o ~/.claude/commands/civitai-civitai-diagnose-seq-scans.md

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

What Diagnose Seq Scans does


description: Remedy high seq scans on a table argument-hint: "[table name]"

Your goal is to diagnose why there are high volumes of seq scans in a postgres database. You'll be using the postgres MCP to interact with a read replica of a postgres database.

Workflow

  1. To prepare, use context7 to review documentation about views, joins, indexes, seq scans, and available diagnostic and stat tables/queries in postgres 17.
  2. Review the structure of the target table: $ARGUMENTS
  3. Review e

Alternatives in Development

  • Repair Table — /repair-table — 修复表格 322 ★
  • Release & Shipping Burn Patterns — Research Summary — Research completed: 2026-02-10 Sources: ~/.claude/CLAUDE.md (This Has Burned You Before table), SESSION_HANDOF 216 ★
  • Guard — Safety guardrails — blocks destructive commands (rm -rf, DROP TABLE, force-push) and optionally restricts edit 63 ★

Full documentation available on GitHub

View Source Repository