Postgres
Work with a PostgreSQL database from a coding agent: inspect the real schema, write and tune queries against actual plans, and review migrations for locks and data loss before they run.
npx @athenode/cli use postgresAdd it to a project from the Plugin library page of your Athenode app, or install it with the CLI.
- Skills
- 3
- Agents
- 0
- MCP servers
- 1
- Files
- 0
About
Start with /postgres-query-review <query or file> to tune a query against its real plan, /postgres-migration-review <file> before applying a migration, or just ask about the schema. The supabase-postgres-best-practices skill loads whenever tables, indexes or queries are written.
Database access goes through DBHub (https://github.com/bytebase/dbhub, MIT), run locally with npx. Export DATABASE_URL (for example postgres://user:password@localhost:5432/app) before starting your agent. Use a read-only database role: the setup's rules make the agent ask before any write, but the role is the real guard. Point it at a development or staging database, not production.
Third-party skill, imported unmodified: supabase-postgres-best-practices from https://github.com/supabase/agent-skills (MIT) — written for Postgres running anywhere, not only on Supabase. The two review skills are written by Athenode. Not affiliated with Supabase or Bytebase.
Prerequisites: Node.js and a reachable Postgres database.
Skills
The skills your agent runs. Open one to read it in full.
postgres-migration-reviewUse when a PostgreSQL schema migration should be reviewed before it runs, for blocking locks, table rewrites, data loss and a safe rollout order.postgres-query-reviewUse when a PostgreSQL query is slow or about to ship and should be checked against its real execution plan, with concrete index or rewrite suggestions.supabase-postgres-best-practicesPostgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
MCP servers
Their configuration is installed with the plugin and is not shown on this page.
dbhub
Add Postgres to your project.
Installs this plugin into the current directory for the coding agents you choose. No account or token needed.
npx @athenode/cli use postgres