plain-postgres-doctor

Validates Postgres schema correctness and diagnoses operational health issues via CLI commands.

1.0k|27|Updated Mar 22, 2023
One-click install
npx skills add https://github.com/dropseed/plain --skill plain-postgres-doctor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plain-postgres-doctor
Source: https://github.com/dropseed/plain/tree/main/.claude/skills/plain-postgres-doctor
Command: npx skills add https://github.com/dropseed/plain --skill plain-postgres-doctor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Checks database health by validating schema correctness and operational health, helping teams detect drift and performance issues before they impact users.

Core Features & Use Cases

  • Schema correctness checks ensure the actual database matches models.
  • Operational health checks identify indexes, vacuum health, and slow queries.
  • Recommended workflow for dev and production environments to verify changes.

Quick Start

Run the health checks against the target database to validate schema and diagnose performance issues.

Frequently Asked Questions about plain-postgres-doctor

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

FAQPage Schema
How do I diagnose slow queries and optimize indexes in Postgres?

You can diagnose slow queries and optimize indexes by running operational health checks that identify vacuum health and index performance issues. The tool analyzes your database to pinpoint problems before they impact users.

How do I check for schema drift between my database and models?

Schema correctness checks validate that your actual database matches your models. By running schema validation, you can detect schema drift and ensure your database structure aligns with your application expectations.

Can I run Postgres health checks in production environments?

Yes, Postgres health checks are applicable to both development and production environments. They validate migrations and diagnose operational health without applying mutations unless you explicitly approve them.

What is the best way to validate database migrations before deployment?

The recommended workflow involves running schema and operational health checks against your target database. This validates schema correctness and diagnoses performance issues, helping teams verify changes before deployment.

Does this tool automatically fix database health issues it finds?

No, the tool never applies mutations without explicit user approval. It diagnoses health by validating schema correctness and identifying operational issues, leaving remediation decisions entirely to you.

Why does my database schema not match my application models?

Schema drift occurs when your actual database diverges from your models. Running schema checks validates correctness by comparing the live database structure against expected models to detect discrepancies.