neon-postgres

neon-postgres is a skill for Claude Code from neondatabase/agent-skills. It costs 222 tokens per session (3,652 once invoked), scanned A, original, Apache-2.0.

A guide to using Lakebase Postgres, the PostgreSQL-compatible database behind Neon. It covers connecting applications to the database and managing projects, branches, schemas, scaling, and data replication.

In plain words
What is it for?
Use it when setting up Neon database access, configuring drivers, planning schema migrations, using branches or read replicas, controlling network access, or connecting databases to other systems.
Why use it?
It helps developers choose suitable connection methods and understand database features such as pooled connections, temporary branches, automatic scaling, and restoring data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the neon plugin — 7 skills shipped together

About the project

Neon Agent Skills is a collection of agent instructions, scripts, and resources for working with Neon’s cloud backend services built around Lakebase Postgres. Developers, startups, and agent platforms use it to guide work with databases, branches, authentication, storage, functions, and AI Gateway services.

neondatabase/agent-skills · 85 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/neondatabase/agent-skills/neon-postgres
Any agent
npx skills add neondatabase/agent-skills --skill neon-postgres
Clone the repo
git clone --depth 1 https://github.com/neondatabase/agent-skills

Made for: Claude Code.

Or install neon, the plugin that ships this one along with the rest of its 7 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for neon-postgres

README.md
[![agentmods](https://agentmods.dev/badge/skills/neondatabase/agent-skills/neon-postgres.svg)](https://agentmods.dev/skills/neondatabase/agent-skills/neon-postgres)
Your own site
<a href="https://agentmods.dev/skills/neondatabase/agent-skills/neon-postgres"><img src="https://agentmods.dev/badge/skills/neondatabase/agent-skills/neon-postgres.svg" alt="Measured on agentmods" height="20"></a>
Per session 222 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,652 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00222 $0.03652
Opus 5 $0.00111 $0.01826
Sonnet 5 $0.00044 $0.00730
Haiku 4.5 $0.00022 $0.00365

Measured yesterday against content hash 84de1bb89fc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

neon-postgres scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/neon-postgres/skills/neon-postgres/SKILL.md · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FIRST: Use the parent neon skill for a Neon overview, getting started with Neon, Neon development best practices, and more.

If the neon skill is not installed, fetch it from https://neon.com/docs/ai/skills/neon/SKILL.md or install it with:

npx skills add neondatabase/agent-skills --skill neon

Lakebase Postgres

Lakebase Postgres is the database at the core of Neon. It runs on the lakebase architecture — OLTP built directly on cloud object storage — which decouples storage from compute to offer autoscaling, branching, instant restore, and scale-to-zero. It's fully compatible with Postgres and works with any language, framework, or ORM that supports Postgres.

It is the same database whether you reach it through Neon or through Databricks; this skill covers the Neon access path.

Setup Flow

1. Select the organization and project

Use the CLI (default) or MCP server to list organizations and projects. Let the user select an existing project or create a new one. Check the .neon file for an existing linked project or branch.

2. Get the connection string

Use the CLI (default), neon env pull, or the MCP server to get the connection string. Store it in .env as DATABASE_URL. Read the file first before modifying it, to avoid overwriting existing values.

When to use pooled vs direct connections
Use case Connection type
Web applications, serverless functions Pooled (-pooler)
Schema migrations Direct
pg_dump / pg_restore Direct
Logical replication Direct
Long-running analytics with temp tables Direct
Admin tasks needing SET or session state Direct
LISTEN / NOTIFY Direct

3. Pick the connection method and driver

Always pair Neon with an ORM such as Drizzle for easy schema management and migrations. Refer to the connection methods guide to pick the correct driver based on how the runtime treats your code: https://neon.com/docs/connect/choose-connection.md.

Read the full file on GitHub · 279 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +85 lines · +15 tokens per session 84de1bb89fc9
  2. 2d ago Changed · +16 lines · +44 tokens per session 374335ecc861
  3. 6d ago First seen · 178 lines · 163 tokens per session scan A eb8081a09e25

Subscribe to this mod's changes

neon-postgres is a skill published in the GitHub repository neondatabase/agent-skills (85 stars, last pushed yesterday), licensed Apache-2.0. It adds 222 tokens to every session and 3,652 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

db-repair

Auto-fix gbrain's Postgres access so the brain stays available. When any gbrain command or MCP tool result carries a GBRAINDBACCESS marker (or an operator reports the brain database is down), run the hardcoded gbrain db-repair ladder: diagnose, apply the safe tier, verify. The action is ALWAYS the hardcoded command …

garrytan/gbrain · 96 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens

volcengine-rds-postgresql

使用火山引擎 RDS PostgreSQL,帮助用户完成 RDS PostgreSQL 相关的实例管理、数据库操作、账号管理和运维任务,可直接调用 uv run ./scripts/callrdspostgresql.py 脚本获取实时结果。.

bytedance/agentkit-samples · 63 tokens

analyzing-insights-across-teams

Analyze PostHog insights, dashboards, or teams beyond the current project by querying the prod Postgres replicas synced into the dogfood data warehouse (US project 2, "PostHog App + Website"). Use when asked to analyze insights across all teams or projects, another team's insights, or fleet-wide insight/dashboard…

PostHog/posthog-foss · 115 tokens