by postgres-ai
postgresai – Postgres observability built for humans and AI agents
# Add to your Claude Code skills
git clone https://github.com/postgres-ai/postgresaiLast scanned: 10/20/2026
{
"issues": [
{
"file": "README.md",
"line": 217,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-10-20T09:10:10.431Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how postgresai compares with popular alternatives.
postgresai is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by postgres-ai. postgresai – Postgres observability built for humans and AI agents. It has 140 GitHub stars.
Yes. postgresai passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/postgres-ai/postgresai" and add it to your Claude Code skills directory (see the Installation section above).
postgresai is primarily written in TypeScript. It is open-source under postgres-ai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh postgresai against similar tools.
No comments yet. Be the first to share your thoughts!
30 days in the Featured rail · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
Monitoring, health checks, and root cause analysis — built for humans and AI agents
Live Demo · Documentation · Get started
Battle-tested in PostgresAI team's work with companies like GitLab, Miro, Chewy, Suno, Supabase, Gadget, and more — now packaged for easy use by humans and AI agents.
Traditional monitoring tools give you dashboards. postgresai gives AI agents the context they need to actually fix problems.
Part of Self-Driving Postgres — PostgresAI's open-source initiative to make Postgres autonomous.
Create a free account at postgres.ai
npx postgresai auth
This opens your browser to log in and saves your API key locally.
PGPASSWORD=secret npx postgresai checkup postgresql://user@host:5432/dbname
Open console.postgres.ai to see:
Offline mode: Add
--no-uploadto run locally without an account or sending report data to the PostgresAI API.
Run specific checks or work offline:
# Run a specific check
npx postgresai checkup --check-id H002 postgresql://...
# Local JSON output only (no upload)
npx postgresai checkup --no-upload --check-id H002 postgresql://...
Markdown conversion is performed by the PostgresAI API and transmits the full
report JSON. Therefore, --markdown cannot be combined with --no-upload. For
local-only output, use --json or --output instead.
Tips:
npx pgai checkupalso works.bunx postgresaiif you prefer Bun.
For continuous monitoring with dashboards, install the full stack on a Linux machine with Docker:
# Quick demo with sample data
npx postgresai mon local-install --demo
# → Open http://localhost:3000
# Production setup (Linux + Docker required)
npx postgresai prepare-db postgresql://admin@host:5432/dbname # Create monitoring role with minimal permissions
npx postgresai mon local-install --api-key=YOUR_TOKEN --db-url="postgresql://..."
Get your API key at console.postgres.ai — or use the fully managed version there.
All diagnostic queries are carefully designed to avoid the observer effect — they use timeouts, row limits, and non-blocking approaches. Battle-tested on production databases with dozens of TiB of data, hundreds of kTPS, and millions of DB objects.
Preview the setup SQL before running:
npx postgresai prepare-db --print-sql postgresql://... # Review what will be created
The prepare-db step creates a read-only postgres_ai_mon user with minimal permissions, enables pg_stat_statements, and creates postgres_ai schema with a few helper views.
| Component | Purpose |
|---|---|
| Express checkup | Instant health checks — no setup needed |
| Grafana dashboards | 13+ expert views: Node Overview, Query Analysis, Wait Events, Indexes, Tables, Replication, and more |
| Scheduled reports | 45+ metrics collected continuously via pgwatch |
| Metrics collection | pgwatch v3 + VictoriaMetrics |
| AI-ready output | Structured JSON for Claude, GPT, and other agents |
| Claude Code plugin | Slash commands for health checks in your IDE |
| MCP server | Work with Issues from console.postgres.ai in AI coding tools |
postgresai is designed to feed AI agents with structured PostgreSQL diagnostics.
Install from the marketplace:
claude plugin marketplace add postgres-ai/postgresai
claude plugin install pgai@postgresai
Then ask Claude to check your database. The postgresai skill
(SKILL.md) deploys PostgresAI
monitoring and reports the problems with exact fixes. Other agents
install the skill with npx skills add postgres-ai/postgresai --skill postgresai.
Work with Issues from console.postgres.ai:
/pgai:issues
# Install MCP server for your AI coding tool
npx postgresai mcp install
This enables AI agents to work with Issues and Action Items from console.postgres.ai directly within your IDE.
# Pipe checkup output to any LLM
npx postgresai checkup --json postgresql://... | llm -s "analyze this Postgres health report"
# Or use with Claude directly
npx postgresai checkup --json postgresql://... | claude -p "find issues and suggest fixes"
postgresai checkup --check-id H002 → finds unused indexesDROP INDEX or creates PRFor checkup (express mode):
For full monitoring stack:
pg_stat_statements extension enablednpx pgai checkup works toonpx postgresai auth and:
--no-upload--api-key| Demo | demo.postgres.ai (login: demo / demo) |
| Docs | postgres.ai/docs |
| Issues | GitLab |
| Community | Postgres.FM · Postgres.TV |
PostgresAI — Self-Driving Postgres
For developers:
postgresai mon local-install --demo
Get a complete monitoring setup with demo data in under 2 minutes.
For production:
postgresai mon local-install --api-key=your_key
# Then add your databases
postgresai mon targets add "postgresql://user:pass@host:port/DB"
# Instance management
postgresai mon targets add "postgresql://user:pass@host:port/DB"
postgresai mon targets list
postgresai mon targets test my-DB
# Service management
postgresai mon status
postgresai mon logs
postgresai mon restart
# Health check
postgresai mon health
⚠️ Breaking change in 0.15.0 — bundled PostgreSQL 15 → 17 requires a data migration.
0.15.0 upgrades the stack's bundled PostgreSQL from 15 to 17 (
sink-postgres, and on the demotarget-db/target-standby). PostgreSQL's on-disk format is not compatible across major versions, so the new images refuse to start on a PostgreSQL 15 data directory — an in-place upgrade will not come up until you migrate the data. Nothing is deleted automatically, and your externally-monitored databases are unaffected, but you must act on the bundled databases before bringing the stack up.
sink-postgresstores your historical monitoring measurements, so choose one:
- Preserve history — while still on the old images, dump it, then restore after the upgrade:
# before `mon stop`/upgrade, with sink-postgres (PG15) running: docker compose exec