Neon Postgres
smontlouis/bible-strong
Guides and best practices for working with Lakebase Postgres, the database behind Neon.
Guides and best practices for working with Lakebase Postgres, the database behind Neon.
$ npx skills add usenotra/notra --skill neon-postgres -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install usenotra/notra neon-postgres --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/usenotra/notra.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/neon-postgres .claude/skills/neon-postgres && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "neon-postgres" agent skill from https://github.com/usenotra/notra/tree/main/.agents/skills/neon-postgres into .claude/skills/neon-postgres/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "neon-postgres", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/usenotra/notra/tree/main/.agents/skills/neon-postgresType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add usenotra/notra --skill neon-postgres -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install usenotra/notra neon-postgres --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/usenotra/notra.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/neon-postgres .agents/skills/neon-postgres && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "neon-postgres" agent skill from https://github.com/usenotra/notra/tree/main/.agents/skills/neon-postgres into .agents/skills/neon-postgres/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "neon-postgres", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add usenotra/notra --skill neon-postgres -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install usenotra/notra neon-postgres --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/usenotra/notra.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/neon-postgres .cursor/skills/neon-postgres && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "neon-postgres" agent skill from https://github.com/usenotra/notra/tree/main/.agents/skills/neon-postgres into .cursor/skills/neon-postgres/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "neon-postgres", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/usenotra/notra.git --path .agents/skills/neon-postgres--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add usenotra/notra --skill neon-postgres -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install usenotra/notra neon-postgres --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/usenotra/notra.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/neon-postgres .gemini/skills/neon-postgres && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "neon-postgres" agent skill from https://github.com/usenotra/notra/tree/main/.agents/skills/neon-postgres into .gemini/skills/neon-postgres/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "neon-postgres", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install usenotra/notra neon-postgresInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add usenotra/notra --skill neon-postgres -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/usenotra/notra.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/neon-postgres .github/skills/neon-postgres && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "neon-postgres" agent skill from https://github.com/usenotra/notra/tree/main/.agents/skills/neon-postgres into .github/skills/neon-postgres/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "neon-postgres", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add usenotra/notra --skill neon-postgres -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install usenotra/notra neon-postgres --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/usenotra/notra.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/neon-postgres .opencode/skills/neon-postgres && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "neon-postgres" agent skill from https://github.com/usenotra/notra/tree/main/.agents/skills/neon-postgres into .opencode/skills/neon-postgres/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "neon-postgres", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
neon-postgresGuides and best practices for working with Lakebase Postgres, the database behind Neon.
Neon Postgres is an agent skill from usenotra/notra. Guides and best practices for working with Lakebase Postgres, the database behind Neon. Covers setup, connection methods and drivers, pooled vs direct connections, branching, schema migrations, autoscaling, scale-to-zero, instant restore, read replicas, connection pooling, IP allow lists, and logical replication. Also covers Lakebase Search: semantic vector search, full-text search with BM25 ranking, and hybrid search. Use when users ask about "Lakebase Postgres", "Neon setup", "connect to Neon", "Neon project"…
Its SKILL.md is about 4.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/full-text-search.md`, `references/hybrid-search.md` and `references/vector-search.md`).
It sits in Databases, covering Database administration, Serverless and Database migrations. It works with Neon, PostgreSQL and Model Context Protocol. The repository describes itself as: Notra is a modern GEO tool that asks ChatGPT, Claude and Gemini the questions your buyers ask. See if you show up, who shows up instead and how to fix it. The licence is AGPL-3.0.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 59bbf7d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
neon.comgithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Neon Postgres loads about 4.1k tokens when it runs, and up to ~7.8k if it reads all its reference files. Until then it costs about 232 tokens; SKILL.md has 1,867 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
get the connection string. Store it in `.env` as `DATABASE_URL`. Read the file first before modifying it, to avoid overAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from usenotra/notra at commit 59bbf7d, republished under its AGPL-3.0 licence (© usenotra). 1,867 words, ~4,118 tokens.
.claude/skills/neon-postgres/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from 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:
neon skills -s neon -yLakebase 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.
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.
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.
| 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 |
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.
Recommendations:
node-postgres (npm install pg) with Vercel Fluid compute and import { attachDatabasePool } from "@vercel/functions";node-postgres with Cloudflare Hyperdrivenode-postgres, as the functions are long-running and reuse the pool across requests.@neondatabase/serverless driver for serverless and edge environments (for example, when using Netlify) — HTTP transport for one-shot queries, WebSocket for transaction support. Link: https://neon.com/docs/serverless/serverless-driver.mdManage schemas and migrations as code. Avoid running ad hoc schema migrations against your database, since they're hard to manage.
If you're using an ORM, follow your ORM's best practices to manage schemas and migrations. For example, if using Drizzle, only use Drizzle for schema and migration management unless instructed otherwise.
Use this when the user is planning isolated environments, schema migration testing, preview deployments, or branch lifecycle automation.
Key points:
Link: https://neon.com/docs/introduction/branching.md
For detailed branch creation workflows (normal vs schema-only branches, reset-from-parent, CLI/MCP selection), use the neon-postgres-branches skill. If it isn't installed, fetch it from https://neon.com/docs/ai/skills/neon-postgres-branches/SKILL.md or install it with:
neon skills -s neon-postgres-branches -yTest a migration on a branch of production, against production-like data, before applying it to production.
Use a direct (non-pooled) connection string when you run the migration, not a pooled one. neon connection-string returns the direct string by default; make sure the hostname does not include the -pooler suffix.
Use Neon's predefined, read-only diagnostics before writing catalog queries by hand. The Neon CLI neon inspect db subcommands and the Neon MCP server's inspect_database tool run the same checks.
This section covers Neon-specific diagnostic tools, compute cache behavior, and platform signals. When the evidence points to generic Postgres work such as rewriting a query, choosing an index, changing a schema, or interpreting plan nodes, load the postgres-best-practices skill and carry the diagnostic evidence into that workflow.
Docs:
pg_stat_statements: https://neon.com/docs/extensions/pg_stat_statements.mdPrefer the Neon CLI when terminal access and authentication are available:
neon inspect db <check>The CLI resolves the project and branch from the current Neon context. Use --project-id, --branch, and --database-name to override it. Omit --database-name to inspect every database on the branch. Use --db-url only when inspecting a Postgres database directly instead of resolving it through the Neon API.
When using Neon MCP, call inspect_database with projectId and one check. Pass branchId, databaseName, or computeId only when needed. Omit databaseName to inspect all databases on the branch. Increase limit only when the result says it was truncated.
| Symptom or question | Checks |
|---|---|
| Which relations consume storage? | table-sizes, index-sizes |
| Is an index unused or a table scanned heavily? | unused-indexes, seq-scans |
| What has run for 5+ minutes or holds locks? | long-running-queries, locks |
| Which queries consume the most total time? | outliers |
| Which queries run most often? | calls |
| Does the active data fit in compute cache? | lfc-hit-rate, working-set |
| Is autovacuum behind or is space wasted? | vacuum-stats, bloat |
| Is logical replication healthy? | replication-slots, subscriptions |
Do not confuse these checks:
long-running-queries reports statements running right now for more than five minutes.outliers ranks the top queries by cumulative execution time since statistics were reset. It does not rank by mean latency.calls ranks by execution count over the same statistics history.outliers and calls require pg_stat_statements. lfc-hit-rate and working-set require the neon extension. If a check reports a missing extension, ask before running the suggested CREATE EXTENSION statement because installing an extension modifies the database.
unused-indexes as a candidate list, not permission to drop indexes. Confirm the observation window, constraints, and workload before removal.bloat is a statistical estimate. Confirm the impact and plan locks or maintenance before VACUUM FULL, REINDEX, or similar remediation.lfc-hit-rate, working-set, vacuum-stats, or pg_stat_statements results.lfc-hit-rate, working-set, and replication-slots) run once even when inspecting every database.databaseName to isolate it.Standard EXPLAIN (ANALYZE, BUFFERS) reports Postgres shared-buffer activity, but it does not show Neon's Local File Cache (LFC) or page prefetching. For a safe read-only query, add Neon's FILECACHE and PREFETCH options:
EXPLAIN (ANALYZE, BUFFERS, PREFETCH, FILECACHE)
SELECT ...;File cache: hits counts pages found in the compute's LFC.File cache: misses counts pages not found in the LFC and fetched from database storage.Prefetch: hits, misses, expired, and duplicates show how effectively Neon fetched pages before the executor requested them.FILECACHE and PREFETCH provide metrics for this query and do not require the neon extension. By contrast, neon inspect db lfc-hit-rate and working-set provide compute-wide statistics and do require the extension.
The MCP explain_sql_statement tool can produce a standard plan but does not expose FILECACHE or PREFETCH options. To collect those Neon-specific metrics through MCP, use run_sql with the explicit, read-only EXPLAIN statement above.
Because ANALYZE executes the statement, use it only when execution is safe; do not run it autonomously for mutating SQL. Compare cold- and warm-cache runs carefully because the first execution can populate the cache and materially change later results.
inspect checks from the table above.explain_sql_statement for a standard plan, or the Neon-specific EXPLAIN above when LFC or prefetch behavior matters.postgres-best-practices and carry forward the inspection results and query plan. Keep Neon compute, cache, connection, and platform decisions in this skill.Use MCP list_slow_queries instead of inspect_database when the user specifically needs queries ranked by average execution time with a custom threshold and limit. Outside the explicit EXPLAIN case above, use run_sql only for read-only diagnostic SQL when the predefined checks do not answer the question.
Use this when the user needs compute to scale automatically with workload and wants guidance on CU sizing and runtime behavior.
Link: https://neon.com/docs/introduction/autoscaling.md
Use this when optimizing idle costs and discussing suspend/resume behavior, including cold-start trade-offs.
Key points:
Link: https://neon.com/docs/introduction/scale-to-zero.md
Use this when the user needs point-in-time recovery or wants to restore data state without traditional backup restore workflows.
Key points:
Link: https://neon.com/docs/introduction/branch-restore.md
Use this for read-heavy workloads where the user needs dedicated read-only compute without duplicating storage.
Key points:
Link: https://neon.com/docs/introduction/read-replicas.md
Use this when the user is in serverless or high-concurrency environments and needs safe, scalable Postgres connection management.
Key points:
-pooler to endpoint hostnames to use pooled connections.Link: https://neon.com/docs/connect/connection-pooling.md
Use this when the user needs to restrict database access by trusted networks, IPs, or CIDR ranges.
Link: https://neon.com/docs/introduction/ip-allow.md
Use this when integrating CDC pipelines, external Postgres sync, or replication-based data movement.
Key points:
Link: https://neon.com/docs/guides/logical-replication-guide.md
Use Lakebase Search for semantic, full-text, and hybrid search:
Links:
Neon gives you two connection strings for the same database: a pooled one (hostname with the -pooler suffix) and a direct/unpooled one (no -pooler suffix). neon env pull writes them as DATABASE_URL and DATABASE_URL_UNPOOLED. The pooled connection routes through PgBouncer in transaction mode, which doesn't support session-level operations. Choose the right one:
DATABASE_URL) — your application's normal query traffic, especially serverless and connection-per-request workloads.DATABASE_URL_UNPOOLED) — schema migrations (Prisma Migrate, Drizzle Kit, Alembic, and others), pg_dump / pg_restore, logical replication, LISTEN/NOTIFY, and anything relying on SET or other session state.Running migrations, dumps, or replication over the pooled connection can fail, and never in a way that names pooling: prepared statement "s0" already exists from Prisma Migrate, a SET search_path that doesn't persist past its own transaction so the next query reports relation "mytable" does not exist, or a write intermittently hitting a read-only transaction (SQLSTATE 25006) that a pooled backend inherited from an earlier client. Migration tools generally take both strings at once — Prisma's directUrl alongside url — so point that at the direct one rather than swapping DATABASE_URL and losing pooling for the application. See https://neon.com/docs/connect/connection-pooling.md.
© usenotra, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (references) in .agents/skills/neon-postgres of usenotra/notra.
Open the folder on GitHubat commit 59bbf7d
Neon Postgres next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Neon Postgres this skillusenotra/notra | 255 | — | ~4.1k | Automated safety check: Notes | AGPL-3.0 | |
| Neon Postgressmontlouis/bible-strong | 171 | 1 repos | ~2.3k | Automated safety check: Notes | GPL-3.0 | |
| Postgrestimescale/pg-aiguide | 1.9k | — | ~941 | Automated safety check: Pass | Apache-2.0 | |
| Neon Postgresaiskillstore/marketplace | 430 | 4 repos | ~4.2k | Automated safety check: Notes | Apache-2.0 | |
| Neon Postgresdavila7/claude-code-templates | 32k | 3 repos | ~396 | Automated safety check: Pass | MIT | |
| DB Connectionaiskillstore/marketplace | 430 | — | ~3.5k | Automated safety check: Notes | None |
smontlouis/bible-strong
Guides and best practices for working with Lakebase Postgres, the database behind Neon.
timescale/pg-aiguide
A skill your agent uses for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.
aiskillstore/marketplace
Guides and best practices for working with Neon Serverless Postgres.
davila7/claude-code-templates
Expert patterns for Neon serverless Postgres, branching, connection pooling, and Prisma/Drizzle integration Use when: neon database, serverless postgres, database branching, neon postgres, postgres…
aiskillstore/marketplace
A skill your agent uses when setting up database connections, especially for Neon PostgreSQL.
timescale/pg-aiguide
A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.
usenotra/notra
Quick-reference card for all ponytail modes, skills, and commands.
usenotra/notra
Expert guidance for Satori, the library that converts JSX/HTML and CSS into SVG (the engine behind dynamic Open Graph images and social cards).
usenotra/notra
A skill your agent uses when the user is implementing, embedding, or debugging a WorkOS Widget — specifically the User Management, User Profile, Admin Portal SSO Connection, or Admin Portal Domain…
usenotra/notra
Modeling a user's pricing into an Autumn catalog — deciding the structure (plans, variants, add-ons, licenses, credit systems, pooled balances) before writing config, then filling in the numbers.
usenotra/notra
Repo file-organization convention for TypeScript projects. An agent skill from usenotra/notra.
usenotra/notra
Opinionated guide for building production TypeScript applications with Effect v4.
Works with
Categories
Guides and best practices for working with Lakebase Postgres, the database behind Neon. Neon Postgres is an agent skill from usenotra/notra. Guides and best practices for working with Lakebase Postgres, the database behind Neon.
Neon Postgres fits situations like: users ask about Lakebase Postgres; connect to Neon; serverless Postgres; @neondatabase/serverless.
Run `npx skills add usenotra/notra --skill neon-postgres -a claude-code`. Or copy the skill folder (.agents/skills/neon-postgres in usenotra/notra) into .claude/skills/neon-postgres in your project. Claude Code loads it when a task matches its description.
Run `npx skills add usenotra/notra --skill neon-postgres -a codex`. Or copy the skill folder (.agents/skills/neon-postgres in usenotra/notra) into .agents/skills/neon-postgres in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add usenotra/notra --skill neon-postgres -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/neon-postgres, .gemini/skills/neon-postgres, .github/skills/neon-postgres and .opencode/skills/neon-postgres in your project.
Going by SKILL.md and its folder, Neon Postgres needs the command-line tools its instructions call (npm). Our summary lists: Node.js.
SKILL.md names 2 domains. As links in the text: neon.com and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Neon Postgres is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.1k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Neon Postgres: Neon Postgres (smontlouis/bible-strong, 171 stars), Postgres (timescale/pg-aiguide, 1.9k stars), Neon Postgres (aiskillstore/marketplace, 430 stars) and Neon Postgres (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
usenotra (a GitHub organization) maintains it in usenotra/notra, which has 255 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 7, 2026.
Source: usenotra/notra on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.