neon-postgres-branches
Choose and create the right Neon branch type for testing and development.
Skill by neondatabaseOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/neondatabase-neon-postgres-branches-2452f7
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing, devops, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
neon-postgres-branches- Description
- Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, resetting a branch from its parent, branch expiration and CI/CD branch lifecycles, or branch creation via Neon CLI or Neon MCP. Triggers include "Neon branch", "test migrations safely", "branch production data", "schema-only branch", "reset branch", "branch per PR" and "sensitive data testing".
- License
- Apache-2.0
- Metadata
- parent: neon · source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon-postgres-branches
- Instructions
- 278 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
**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:
```bash
neon skills -s neon -y
```
# Lakebase Postgres Branching
**Outcome:** a created Neon branch — or a clear, actionable next step if creation cannot proceed. Choose the correct branch type, then execute branch creation with the CLI (or MCP where the CLI isn't usable).
- **Normal branch** for realistic migration and query testing with real data.
- **Schema-only branch (Beta)** for sensitive data workflows where structure is needed without copying rows.
## Branch Type Decision
Use this decision rule first:
1. If the user wants to test complex migrations, performance, or behavior against production-like data, choose a **normal branch**.
2. If the user needs to avoid copying sensitive data, choose a **schema-only branch**.
If the request is ambiguous, ask one clarifying question:
"Do you need realistic data for testing, or only schema structure because the data is sensitive?"
## Tool Selection: CLI or MCP
Support both the Neon CLI and the Neon MCP server, but **default to the CLI**. Use MCP only when the CLI is unavailable or blocked in your environment, cannot be authenticated, or the user explicitly asks for MCP.
- CLI link: https://neon.com/docs/cli/quickstart.md
- MCP link: https://neon.com/docs/ai/neon-mcp-server.md
### Selection order
1. Check the CLI first:
- Run `neon --version` to confirm the CLI is installed.
- Run `neon projects list` to confirm auth/context.
2. If the CLI is missing, direct installation via quickstart.
3. If the CLI is installed but not authenticated, guide the user through `neon auth` (or API key auth), then continue.
4. Switch to MCP when the CLI cannot be used — no CLI access in the environment, execution blocked, or authentication not possible — or when the user explicitly asks for MCP. Confirm Neon MCP tools are available and authenticated (for example, listing projects works), then follow the MCP branch flow below.
5. If neither path is successful, use the Neon REST API:
- https://neon.com/docs/guides/branching-neon-api.md
### MCP branch flow
1. Choose normal vs schema-only based on data sensitivity and migration-testing goals.
2. Use branch tools (for example, `create_branch`) to create the branch.
3. Validate with read tools (for example, `describe_branch`).
4. For migration workflows, prefer branch-based migration flows before applying to main.
## Create a Normal Branch (Preferred for Real-Data Migration Testing)
Use this when the user needs realistic testing conditions.
Real production-like data can expose edge cases your seed or data migration scripts miss, which helps catch migration issues before going live.
Link: https://neon.com/docs/introduction/branching.md
### Steps
1. Settle the tool path first (see [Selection order](#selection-order)): verify the CLI with `neon --version`, and fall back to MCP only if the CLI isn't usable.
2. Ensure project context is set (`neon set-context --project-id <your-project-id>`) or include `--project-id` on commands.
3. Create the branch:
```bash
neon branches create \
--name <branch-name> \
--parent <parent-branch-id-or-name> \
--expires-at 2026-12-15T18:02:16Z
```
4. Optionally fetch a connection string for the new branch:
```bash
neon connection-string <branch-name>
```
## Create a Schema-Only Branch (Beta, Sensitive Data)
Use this when users must not copy production rows into the test branch.
Link: https://neon.com/docs/guides/branching-schema-only.md
### Steps
1. Settle the tool path first (see [Selection order](#selection-order)): verify the CLI with `neon --version`, and fall back to MCP only if the CLI isn't usable.
2. Create the schema-only branch:
```bash
neon branches create \
--name <schema-only-branch-name> \
--parent <parent-branch-id-or-name> \
--schema-only \
--expires-at 2026-12-15T18:02:16Z
```
If multiple projects exist, include `--project-id`:
```bash
neon branches create \
--name <schema-only-branch-name> \
--parent <parent-branch-id-or-name> \
--schema-only \
--project-id <your-project-id> \
--expires-at 2026-12-15T18:02:16Z
```
### Beta Support Guidance (Mandatory)
Schema-only branching is in Beta. If users report unexpected behavior, errors, or missing capabilities:
1. Ask them to share feedback in the Neon Console:
- https://console.neon.tech/app/projects?modal=feedback
2. Recommend opening a support conversation in the Neon Discord:
- https://neon.com/discord
## Reset from Parent
Use this when a child branch has drifted and the user wants a clean refresh from the parent branch's latest schema and data.From neondatabase/agent-skills, Apache-2.0.
More from neondatabase/agent-skills
- 0.782score
neon
neondatabaseOfficial
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime.
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-postgres
neondatabaseOfficial
Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero…
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-realtime
neondatabaseOfficial
Neon Realtime makes any SQL query live.
SkillAFreshness: A★ 105Claude Code +9 - 0.776score
neon-ai-gateway
neondatabaseOfficial
One API and one credential for frontier and open-source LLMs and embedding models, built into your Neon branch and powered by Databricks.
SkillAFreshness: A★ 105Claude Code +9 - 0.776score
neon-object-storage
neondatabaseOfficial
S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them.
SkillAFreshness: A★ 105Claude Code +9 - 0.772score
neon-functions
neondatabaseOfficial
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your…
SkillAFreshness: A★ 105Claude Code +9 - 0.736score
neon-auth
neondatabaseOfficial
Add authentication to a new app.
SkillBFreshness: B★ 105Claude Code +9 - 0.730score
neon-postgres-egress-optimizer
neondatabaseOfficial
Diagnose and fix excessive Postgres egress (network data transfer) in a codebase.
SkillBFreshness: B★ 105Claude Code +9 - 0.730score
neon-postgres-branches
neondatabaseOfficial
Choose and create the right Neon branch type for testing and development.
SkillBFreshness: B★ 105Claude Code +9 - 0.536score
score-eval
neondatabaseOfficial
No description from the publisher yet.
SkillDFreshness: D★ 105Claude Code +9
Signals
- Stars
- 105
- Forks
- 23
- Open issues
- 17
- Last commit (this folder)
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/neondatabase/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.730score
neon-postgres-branches
neondatabaseOfficial
Choose and create the right Neon branch type for testing and development.
SkillBFreshness: B★ 105Claude Code +9 - 0.336score
neon-postgres-branches
intelogroup
Choose and create the right Neon branch type for testing and development.
SkillAFreshness: AClaude Code +9
More from neondatabase
- 0.782score
neon
neondatabaseOfficial
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime.
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-postgres
neondatabaseOfficial
Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero…
SkillAFreshness: A★ 105Claude Code +9 - 0.782score
neon-realtime
neondatabaseOfficial
Neon Realtime makes any SQL query live.
SkillAFreshness: A★ 105Claude Code +9 - 0.776score
neon-object-storage
neondatabaseOfficial
S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them.
SkillAFreshness: A★ 105Claude Code +9 - 0.776score
neon-ai-gateway
neondatabaseOfficial
One API and one credential for frontier and open-source LLMs and embedding models, built into your Neon branch and powered by Databricks.
SkillAFreshness: A★ 105Claude Code +9 - 0.772score
neon-functions
neondatabaseOfficial
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your…
SkillAFreshness: A★ 105Claude Code +9
Cite this page
neon-postgres-branches skill. Agent Mart. https://agentmart.dev/skills/neondatabase-neon-postgres-branches-2452f7 (last updated 2026-10-24)