DEDUPED Hot AI repos, turned into use cases Get 5 a day

What you can do with Pgbot

pgbot is a read-only Go command-line tool that reads PostgreSQL's own statistics views and prints a findings-first health report with changes since the last run.

Trended earlier

Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk.

5 use cases

  • Triage a slow PostgreSQL database in ten seconds

    Run one read-only health check and get ranked findings for a database you do not own.

    View prompt
    Using the pgbot tool from the pgrundev/pgbot repository, run `pgbot inspect --json` against the database whose connection string is in <target-env-var>. Report the CRITICAL and WARNING findings and the health score. Verify that the JSON contract version reported is 1.5.0 before you trust the findings.
  • Find the queries that eat the most database time

    Rank statements by total time or call count to pick the first query to tune.

    View prompt
    Use the pgbot tool from the pgrundev/pgbot repository to run `pgbot queries --json` against <target-db-url>. Return the top five statements by total time with their share and call count. Verify that the response has enabled true and available true before you report an empty list as a real empty workload.
  • Spot unused indexes and likely missing indexes

    Find zero-scan indexes and large tables with heavy sequential scans before dropping or adding anything.

    View prompt
    Use the pgbot tool from the pgrundev/pgbot repository to run `pgbot indexes --json` and `pgbot tables --json` against <target-db-url>. List the zero-scan indexes with their sizes and the large tables with heavy sequential scans. Verify that you do not recommend dropping any index while replication is active without stating the per-node scan caveat.
  • Gate schema migrations in CI with a Postgres lint

    Fail a pull request when a schema change adds a critical finding, without a live production database.

    View prompt
    Use the pgbot tool from the pgrundev/pgbot repository in CI by running `pgbot inspect --profile=schema --fail-on=critical --format=sarif` against <ci-database-url>. Report the exit code and the number of findings in the SARIF output. Verify that exit code 3 is reported as a connection failure rather than as a finding.
  • Let Claude Code read PostgreSQL findings over MCP

    Connect an AI coding agent to structured database findings through the Pgbot MCP server.

    View prompt
    Using the pgrundev/pgbot MCP server running against <target-db-url>, fetch the current health findings and list each CRITICAL and WARNING finding with the table, query, or index it names. Verify that the response includes the contract version 1.5.0 before you act on any finding.

How to use Pgbot

  1. Check you have what it needs: A PostgreSQL server version 14 to 18 that you can reach over the network; A login role with the pg_monitor role and no write grants (pgbot init generates the setup SQL); The pgbot binary, installed with the curl install script or npx @pgbot/cli.
  2. Open pgrundev/pgbot on GitHub and read the README and license.
  3. Install Pgbot with curl -fsSL https://pgbot.dev/install | sh.
  4. Generate the read-only role setup SQL with pgbot init, review it, and run it yourself, since Pgbot executes nothing. (inferred, check the README)
  5. Set the connection once with export DATABASE_URL="postgres://pgbot_ro@host:5432/db".
  6. Run pgbot inspect for the graded summary.

These steps come from our top use case, Triage a slow PostgreSQL database in ten seconds, which also has a copy-paste agent prompt.

Pgbot alternatives · Best AI repos for Software and DevOps

About this repo

  • Who it is forDatabase engineers, DevOps staff, and AI agents that need structured PostgreSQL health findings without deploying a monitoring stack.
  • Why it is hot
  • LanguageGo
  • Sourcegithub.com/pgrundev/pgbot · Back to Hot repos

Requirements

  • A PostgreSQL server version 14 to 18 that you can reach over the network
  • A login role with the pg_monitor role and no write grants (pgbot init generates the setup SQL)
  • The pgbot binary, installed with the curl install script or npx @pgbot/cli
  • Optional: pg_stat_statements for the queries section, and hypopg on PostgreSQL 16+ for advise
Maintain Pgbot? Add the Featured on Deduped badge

Paste this into your README:

[![Featured on Deduped](https://dedupedai.com/badge/pgrundev-pgbot.svg)](https://dedupedai.com/use-cases/pgrundev-pgbot/?ref=badge)

More badge styles and HTML

Questions about Pgbot

What is Pgbot?

pgbot is a read-only Go command-line tool that reads PostgreSQL's own statistics views and prints a findings-first health report with changes since the last run. It is an open-source project on GitHub: https://github.com/pgrundev/pgbot.

Who is Pgbot for?

Database engineers, DevOps staff, and AI agents that need structured PostgreSQL health findings without deploying a monitoring stack.

What can I do with Pgbot?

5 use cases so far, for example: Triage a slow PostgreSQL database in ten seconds; Find the queries that eat the most database time; Spot unused indexes and likely missing indexes. Each has steps and a copy-paste agent prompt.

What do I need to run Pgbot?

A PostgreSQL server version 14 to 18 that you can reach over the network; A login role with the pg_monitor role and no write grants (pgbot init generates the setup SQL); The pgbot binary, installed with the curl install script or npx @pgbot/cli; Optional: pg_stat_statements for the queries section, and hypopg on PostgreSQL 16+ for advise.

What are alternatives to Pgbot?

Other hot AI repos in Software and DevOps: Harness2, iFixAi, Orca, Diagram Design, AI Memory.

Is Pgbot safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.