SkillsReviewed · neondatabase

Neon Postgres (Lakebase Postgres) agent skill

This is a set of written instructions that teaches an AI coding agent how to work with Postgres databases hosted on Neon. It is aimed at developers who use coding agents with Neon. Its main catch is its focus: the skill focuses on Neon's access path. It prefers the CLI, supports MCP, and documents a REST API fallback for branching. It can also use a DATABASE_URL that is already supplied. Using Neon's AI Gateway for embeddings or Jev reranking requires prepaid AI Gateway credits. It covers connection strings, pooled versus direct connections, migrations, branching, egress cost fixes, diagnostics, compute and autoscaling settings, and vector, full-text (BM25) and hybrid search, with worked SQL and TypeScript examples. Some generic PostgreSQL guidance is included as well.

Researched 13 Nov 2026

In short.

This is a written instruction set that teaches an AI coding agent how to work with Postgres databases hosted on Neon. It is aimed at developers who use coding agents with Neon. Its main catch is that it focuses on Neon's access path and tells the agent to use a separate parent neon skill first. Nothing in it was run for this report. It prefers the CLI, supports MCP, and documents a REST API fallback for branching. When a DATABASE_URL is already supplied, the skill says to use it directly. The skill is a 20,972-byte SKILL.md plus six reference files (branching, egress optimization, vector search, full-text search, hybrid search, and managing search through Drizzle ORM). It tells the agent to prefer a supplied DATABASE_URL and to use pooled connections for application traffic. Direct connections are for migrations, dumps, replication and session state. It also tells the agent to test migrations on a branch, to run Neon's read-only inspect diagnostics before hand-writing catalog queries, and to ask before actions such as installing an extension or resetting statistics. Alongside the Neon-specific material, the files include generic PostgreSQL guidance, such as the egress anti-pattern fixes and pg_stat_statements queries. The repository licence in the captured files is Apache License 2.0. The evidence does not state the costs of the Neon service itself, most plan allowances or the AI Gateway credit prices, so they remain unknown.

Researched and written by an AI model and checked by a second AI model. How it works

This report covers the neon-postgres skill folder in the neondatabase/agent-skills repository at revision fa44b92d2fd129dcd443b677629f76b7d781a560. That means SKILL.md and the six files in its references folder (branching, egress optimization, full-text search, hybrid search, Drizzle-managed Lakebase Search, and vector search), plus the repository's Apache 2.0 LICENSE file. No NOTICE file was captured. The following were not read: linked documentation pages, the parent neon skill, the neon-auth, neon-realtime and neon-ai-gateway skills, the postgres-best-practices skill, and other folders in the repository. Nothing was executed: no Neon commands, SQL, TypeScript, installs or API calls were run. All behaviour, version pins, prices and limits are reported as the source states them and are unverified.

The overview

What this resource is

The resource is an agent skill named neon-postgres. Its frontmatter describes it as guides and best practices for working with Lakebase Postgres on Neon, and it declares a parent skill called neon. The captured folder is plugins/neon-postgres/skills/neon-postgres in the neondatabase/agent-skills repository at revision fa44b92d2fd129dcd443b677629f76b7d781a560. It consists of SKILL.md and six files under references: branching.md, egress-optimization.md, full-text-search.md, hybrid-search.md, lakebase-search-drizzle.md and vector-search.md. The selected folder contains Markdown instructions with runnable shell, SQL and TypeScript examples; no standalone executable files are included.

The skill says Lakebase Postgres is the database at the core of Neon. It describes an architecture that separates storage from compute, says the database is fully Postgres compatible, and says it is the same database whether reached through Neon or Databricks. The skill covers only the Neon access path. The skill's metadata names its upstream source as a skills/neon-postgres folder on the main branch, but the captured copy sits under plugins/neon-postgres/skills/neon-postgres. The evidence does not establish which location is canonical.

Overall assessment

On the evidence, this is a substantial, specific and carefully written operational guide rather than a stub. It gives the agent concrete decision rules: pooled versus direct connection by use case, normal versus schema-only branch, and which inspect check answers which symptom. It also gives exact CLI commands, SQL, TypeScript and many guardrails. For example, it treats the unused-indexes result as a candidate list rather than permission to drop indexes, asks before CREATE EXTENSION or resetting pg_stat_statements, and never overwrites an existing env key without confirmation.

The skill focuses on Neon's access path. It prefers the CLI, supports MCP, and documents a REST API fallback for branching. When a DATABASE_URL is already supplied, it tells the agent to use that directly. Generic PostgreSQL guidance also appears throughout the files. Examples are the egress anti-pattern fixes, the pg_stat_statements queries, and the cautions about reading unused-index, sequential-scan and bloat results. It is still not a general Postgres tutorial: it hands deeper query, index and schema tuning to a separate postgres-best-practices skill. Everything described here comes from the source text. Nothing was executed, so the commands, version pins and platform behaviour (for example cold-start timing or branch reset rules) are the vendor's claims and have not been checked.

Who it is for

The intended users are developers, beginners included, who let an AI coding agent help with a database hosted on Neon. A beginner benefits from the plain decision tables and the Gotchas section. That section names the confusing failures that come from running migrations over a pooled connection: a Prisma prepared statement error, a SET search_path that does not persist, and an intermittent read-only transaction error with SQLSTATE 25006. An experienced developer benefits from the Neon-specific details: the EXPLAIN options FILECACHE and PREFETCH, the inspect db checks, the neon.ts branch policy, and the lakebase_ann and lakebase_bm25 index tuning.

It is a poor fit for people on other Postgres hosts. It also does not cover starting a brand-new backend (the skill sends that to the parent neon skill), login and session work (sent to neon-auth), or live queries and realtime UIs (sent to neon-realtime).

What it can help an agent do

SKILL.md covers project and connection setup: the CLI by default, the MCP server as an alternative, and neon env pull to write DATABASE_URL. It covers choosing a driver: node-postgres on Vercel, on Cloudflare (with Hyperdrive) and on Neon Functions, and the @neondatabase/serverless driver for serverless and edge environments such as Netlify. It also covers schema and migration management as code, branching, instant restore, read replicas, PgBouncer pooling via the -pooler hostname suffix, IP allow lists and logical replication. For computes, it covers managing them with neon postgres computes (list, get, update, restart, start, suspend, delete), setting autoscaling ranges with --cu, and setting scale-to-zero timeouts with --suspend-timeout.

The troubleshooting section maps symptoms to neon inspect db checks and explains how not to confuse them. The checks are table-sizes, index-sizes, unused-indexes, seq-scans, long-running-queries, locks, outliers, calls, lfc-hit-rate, working-set, vacuum-stats, bloat, replication-slots and subscriptions. The Free plan section explains quota suspension (SQLSTATE 53000, HTTP 402). The egress reference sets out a four-step process (diagnose, analyze, fix, verify) for five anti-patterns: unused columns, missing pagination, repeated reads of static data, application-side aggregation and JOIN duplication.

The Lakebase Search references cover four areas. Semantic search uses the lakebase_vector extension and lakebase_ann index. BM25 full-text search uses lakebase_text and lakebase_bm25. Hybrid search combines the two by Reciprocal Rank Fusion or by reranking with a Jev decision model. A Drizzle ORM workflow manages all of this through migrations.

Using it

Requirements

The skill assumes an agent that can load skills, plus either a Neon account and project or connection details already supplied. The skill treats two kinds of existing context differently. If a DATABASE_URL is already supplied (in the prompt, environment or repo), the skill says to use it directly: do not list organizations, do not create a second project, and do not fetch another connection string through the CLI or MCP. A .neon file that points at a project only settles which project to use. In that case the skill still says not to list organizations or create a second project for schema work, but unless a DATABASE_URL is also supplied, the connection string still has to be fetched with the CLI, neon env pull or the MCP server. The skill focuses on Neon's access path. It prefers the CLI, supports MCP, and documents a REST API fallback for branching. The CLI path is checked with neon --version and neon projects list, and authenticated with neon auth or an API key. The branching reference switches to the MCP server when the CLI cannot be used, including when there is no CLI access or execution is blocked, so the MCP path does not depend on shell access. SKILL.md starts with an instruction to use the parent neon skill first. If that skill is missing, the agent is told to fetch it from [https://neon.com/docs/ai/skills/neon/SKILL.md] or install it with neon skills -s neon -y. The parent skill was not part of the captured files, so its contents are unknown.

Version requirements appear in the references. Lakebase Search requires Postgres 16 or later. The Drizzle reference requires drizzle-orm 0.36+ and drizzle-kit 0.27+. Embeddings through Neon's provider use @neon/ai-sdk-provider 1.0.0+ with the Vercel AI SDK (ai 6+). Jev reranking uses the tested pins @neon/ai-sdk-provider@1.1.0 and ai@7.0.133, and the source says to retest upgrades while experimental_decide is experimental. The neon.ts policy uses the @neon/config package. Using Neon's AI Gateway for embeddings or Jev reranking requires prepaid AI Gateway credits. The vector reference also permits other embedding providers whose output matches the schema and index; the costs of those providers are unknown. Without gateway credits, the hybrid reference says to embed documents and queries with one model from another provider and use the RRF query. RRF adds no fusion or reranking model call; vector retrieval still needs a query embedding.

How it works

The skill is plain Markdown that an agent loads into its context. The frontmatter description lists the situations and keywords that should trigger it, for example DATABASE_URL, neon inspect db, branch per PR, SQLSTATE 53000, semantic search and BM25. The body is organised by task. SKILL.md holds the core guidance and links to the reference files, which the agent reads only when the task needs them. For example, the egress section tells the agent to read egress-optimization.md before editing code, and the branching section sends detailed workflows to branching.md.

The skill does not execute anything itself. It steers the agent to run Neon CLI commands, MCP tools (such as inspect_database, list_slow_queries, run_sql, explain_sql_statement, create_branch and describe_branch), SQL statements and package installs. Its safety behaviour therefore depends on the agent following the written rules. These include asking before creating extensions, running EXPLAIN ANALYZE only where execution is safe (because ANALYZE executes the statement), and keeping SET LOCAL settings in the same transaction as the query when a connection pool sits in between.

Setup

The evidence does not give a one-line install for this specific skill. It only gives an install command for the parent skill (neon skills -s neon -y). The captured files do not establish how the neon-postgres skill itself is installed (for example as part of a plugin), so check the upstream repository for the current method.

Once the skill is loaded, its own setup flow first checks for existing context. If a DATABASE_URL is already supplied, the agent uses it and skips both project selection and connection-string lookup. If there is no supplied DATABASE_URL but a .neon file points at a project, the agent uses that project without listing organizations or creating a second one, and then fetches the connection string with the CLI, neon env pull or the MCP server. Only when neither exists does the agent list organizations and projects with the CLI or MCP server, let the user pick an existing project or create a new one, and then fetch the connection string. A fetched string is stored in .env as DATABASE_URL, and the agent reads the file first to avoid overwriting existing values. The pooled string is for web apps and serverless functions. The direct string (no -pooler suffix) is for migrations, pg_dump and pg_restore, logical replication, LISTEN/NOTIFY and session-state work. The agent should keep the project's existing ORM and driver; Drizzle is only a suggestion for new TypeScript schema work with no established choice.

For search, the vector reference gives three ways to get NEON_AI_GATEWAY_TOKEN and NEON_AI_GATEWAY_BASE_URL. One is to declare aiGateway: true in neon.ts, then run neon deploy and neon env pull --file .env. Another is to run neon env pull --service ai-gateway --file .env. The third is to copy the values from the Neon Console.

Worked example

The branching reference gives a typical case: a user wants to test a risky migration against production-like data. The skill tells the agent to recommend a normal (copy-on-write) branch and check the tool path with neon --version. The agent then runs neon branches create --name migration-test --parent main --expires-at followed by a timestamp, then neon connection-string migration-test. The migration is run over the direct connection string on that branch before it touches production. If production data cannot be copied for compliance reasons, the skill recommends a schema-only branch (marked Beta), created by adding --schema-only. After creating a branch, the agent asks whether to update the .env DATABASE_URL and does not overwrite an existing key without confirmation.

A second example is a BM25 keyword query. The reference stores a generated tsvector column, builds a lakebase_bm25 index after the initial data load, and queries with body_tsv <@> to_bm25query(...). The operator returns negative scores where lower means more relevant, so the query filters score < 0 and sorts ascending. These are source examples; they were not run here. The sample branch commands hard-code an expiry of 2026-12-15T18:02:16Z, which should be replaced with a suitable date.

Assessment & evidence

Limitations and risks

Scope: the skill is Neon-specific and leans on content that was not captured. That includes the parent neon skill, neon-auth, neon-realtime, neon-ai-gateway, the postgres-best-practices skill and many linked Neon documentation pages. For neon.ts, the source refers readers to the neon skill for the full reference, so the captured files do not fully document the infrastructure-as-code behaviour.

Internal inconsistency: the frontmatter says Auth goes to the parent neon skill, while the body says login, users, sessions and @neon/auth belong in neon-auth. An agent could route this ambiguously. Several features are labelled Beta or experimental (schema-only branches, experimental_decide), and the Jev reranker depends on a third-party model and a pinned SDK version. Example commands include a hard-coded expiry date of 2026-12-15. The cold-start penalty is only described as around hundreds of milliseconds.

Safety: the skill includes actions that change or destroy state. Reset from parent replaces the child branch's schema and data and briefly interrupts connections. Others are compute delete, extension creation and statistics resets. The skill also lets the agent run SQL through the MCP run_sql tool. Its guardrails are written instructions, not enforced controls. It also tells the agent to fetch the parent skill from a URL at run time, so outside content gets loaded into the agent. The evidence includes no tests, evaluations or benchmarks for the skill, and nothing here was executed.

Why these conclusions follow

The classification as a Skill follows from the content. The folder holds instructions that an assistant loads, with a name and trigger description in the frontmatter; it is not an application or library. The judgement that it is substantive follows from the breadth and specificity of the files. They give exact commands, decision tables, named error codes, SQL and TypeScript. They also state constraints, such as the reset-from-parent blockers: root branches cannot be reset, branches with children block reset, and reset may be unavailable for up to 24 hours after a parent snapshot restore.

The pooled-versus-direct guidance is specific. The source names the failures that follow from running migrations over a pooled connection: a Prisma prepared statement error, a SET search_path that does not persist, and intermittent SQLSTATE 25006 read-only errors. The files show this guidance is present, but the evidence does not say where these examples came from, and they have not been checked against current behaviour. Statements about plans, limits and defaults are taken as the source's claims and may change. Examples are the five-minute scale-to-zero default, the 60 to 604800 second range on Scale, and the Free and Launch behaviour. Conclusions about quality are limited to what reading the files can show.

Alternatives and neighbours

The evidence names the skill's own neighbours. The parent neon skill covers the Neon overview, new backends, Auth, files, Functions and LLM calls. The neon-auth, neon-realtime and neon-ai-gateway skills cover login, live data and gateway use. The postgres-best-practices skill, in a separate neondatabase/postgres-skills repository, handles generic query, index and schema work. The Neon MCP server and Neon CLI are the tools this skill drives, and the official Neon docs it links to are the underlying reference.

Without a skill, an agent can still use the Neon CLI, the Neon MCP server or the Neon REST API directly and read Neon's documentation; this skill packages the guidance and guardrails. The skill focuses on Neon's access path. It prefers the CLI, supports MCP, and documents a REST API fallback for branching. On other Postgres hosts, its Neon commands and platform features do not carry over, though some generic PostgreSQL guidance in the files, such as the egress anti-pattern fixes, is not tied to Neon. The evidence does not compare any other products or skills, so no ranking against them is offered.

Evidence base

The report rests on eight captured files at revision fa44b92d2fd129dcd443b677629f76b7d781a560. SKILL.md (evidence_51ca7b26-7abf-409b-ae00-d4d4299ef598) establishes the identity, setup flow, connection rules, diagnostics, computes, autoscaling, Free plan limits and gotchas. branching.md (evidence_44e64f72-5213-47a0-8adb-76c70ad10d9c) covers branch types, reset from parent, CI/CD patterns and the neon.ts branch policy. egress-optimization.md (evidence_65c0d38a-5efe-4ef8-b49f-923c1420fa85) covers the egress workflow. vector-search.md (evidence_3e563130-8b2e-48d4-b162-060922682b37), full-text-search.md (evidence_9f2ce5db-c673-4bdb-8093-49088561c1a1) and hybrid-search.md (evidence_6abd58e4-cb42-496a-babc-50611d0fc878) cover the search features. lakebase-search-drizzle.md (evidence_f2d78542-0084-4ba8-bc32-2a9a76222583) covers the Drizzle workflow, and LICENSE (evidence_8881bd35-24f1-46d1-b904-f6061fe23d2b) is the Apache 2.0 text.

All evidence is the vendor's own documentation. The evidence contains no independent review, usage data, test result or issue history, and every claim about how Neon behaves is unverified here.

Access & freshness

Costs

The evidence gives no price for the skill itself, and its licence is a no-charge Apache 2.0 licence. The running cost of using it is the cost of Neon and of the agent, and most of that is not stated. The evidence does not give Neon plan prices, Free plan allowances (the CU-hour and public network transfer amounts), storage and history charges for branches, or AI Gateway credit prices, so these are unknown. The agent's own token cost for loading the roughly 21 KB SKILL.md and any references was not measured.

The source does say that the Free plan suspends compute when CU-hours or network transfer run out. It says the Launch plan has no minimum monthly fee and invoices under $0.50 are not collected, so a quick upgrade to Launch and back to Free costs nothing and resets the Free allowances. That is the vendor's claim. It is a billing change, so confirm the current plan terms in the Neon Console before relying on it. AI Gateway embeddings and Jev reranking draw on prepaid credits, which are available on every plan including Free; per-call prices are unknown. Jev reranking adds a model call and input-token cost per query, which the source tells readers to measure alongside latency. Idle branches and old history can add storage cost. The source addresses this with branch expiry and a neon.ts ttl (maximum 30 days).

Licence and rights

The captured LICENSE file is the Apache License, Version 2.0. It sits at the repository root rather than inside the selected skill folder. Its copyright grant is a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable licence to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute the work. The patent grant is separate and narrower. Each contributor licenses only those patent claims it can license that are necessarily infringed by its own contribution alone, or by the combination of its contribution with the work to which it was submitted. Those patent licences terminate, as of the date the litigation is filed, for anyone who institutes patent litigation (including a cross-claim or counterclaim) alleging that the work, or a contribution incorporated within it, constitutes direct or contributory patent infringement.

Redistribution has four conditions. Recipients must get a copy of the licence. Modified files must carry prominent notices stating that they were changed. The source form of any derivative work you distribute must keep all copyright, patent, trademark and attribution notices from the source form of the work, except notices that do not pertain to any part of the derivative work. If the work includes a NOTICE file, a readable copy of its attribution notices must be included. No NOTICE file was captured, and the evidence does not establish whether one exists elsewhere in the repository. The licence grants no general trademark permission, except reasonable and customary use describing the work's origin and reproducing NOTICE content. It also disclaims warranties and limits liability.

The line Copyright [yyyy] [name of copyright owner] at the end of the file is part of the licence's standard appendix, which explains how to apply the licence to one's own work. It is template text, not evidence of an incomplete project licence. The captured files do not identify a project copyright holder: neither the LICENSE text nor the SKILL.md and reference files carry a project copyright line or a per-file licence header. The licence is a repository-level file that the skill files do not restate. The Neon service the skill operates is governed by its own terms, which were not captured or assessed. This is a plain reading of the licence text, not legal advice.

Freshness

The files were captured on 2026-11-13 at revision fa44b92d2fd129dcd443b677629f76b7d781a560. The commit date is not in the evidence, so when the content was last updated is unknown, and so is how actively the skill is maintained. The text names specific versions and features: ai@7.0.133, @neon/ai-sdk-provider@1.1.0, the Jev 1.14 model, Postgres 16 or later for Lakebase Search, and the lakebase_vector and lakebase_text extensions. The files show that these pins and features are present at this revision, but not when they were added.

Several time-sensitive parts are likely to drift: package versions, the experimental_decide API, Beta schema-only branching, plan names and limits, the AI Gateway model list, and the hard-coded 2026-12-15 example expiry date. The skill's metadata points to the upstream main branch, so newer revisions may differ from the captured one.

Suggested next steps

Before adopting the skill, confirm your database is on Neon. The skill tells the agent to use the parent neon skill first; that skill's contents and compatibility are outside the supplied evidence. The captured files do not say how the skill is installed, so check the upstream repository. The Neon CLI (the skill's default) or the Neon MCP server is used for steps such as selecting a project, fetching a connection string, creating branches, running inspect checks and managing computes, but neither is a universal prerequisite. If you already supply a DATABASE_URL, the skill tells the agent to use it directly instead of fetching one, and branching.md documents the Neon REST API as a fallback for branching when neither the CLI nor MCP can be used. Where you do rely on the CLI or MCP for those steps, make sure it is installed and authenticated, and give the agent a least-privilege setup where possible.

When using it, review any state-changing step before the agent runs it: branch reset, compute delete or suspend, CREATE EXTENSION and statistics resets. Take particular care with the Free-plan upgrade-and-downgrade trick, which is a billing change made in the Console; check current plan terms first. Replace the hard-coded example expiry dates, and pin and retest the package versions named in the references. Run migrations on a branch with a direct connection string before production. Test any search query on your own data before trusting its relevance or latency.

Evidence for this report

LICENSEnotice · checked 2026-11-13