neon-postgres-branches

Create and manage Neon Postgres branches for migration testing and isolated development environments.

Updated Sep 19, 2026
One-click install
npx skills add https://github.com/paramcodes/autobro --skill neon-postgres-branches-paramcodes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neon-postgres-branches
Source: https://github.com/paramcodes/autobro/tree/main/.grok/skills/neon-postgres-branches
Command: npx skills add https://github.com/paramcodes/autobro --skill neon-postgres-branches-paramcodes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Testing database migrations against production data is risky, and copying sensitive data into test environments creates compliance issues. This Skill guides you through choosing and creating the right Neon branch type so you can test safely without touching production. ## Core Features & Use Cases - Branch Type Selection: Decide between normal branches (full data copy for realistic migration testing) and schema-only branches (structure without sensitive rows). - CLI, MCP, and API Workflows: Create branches via the Neon CLI by default, with Neon MCP server and REST API fallbacks when the CLI is unavailable. - Branch Lifecycle Management: Reset branches from parent, set expiration dates, and define declarative branch policies in neon.ts for CI/CD pipelines. - Use Case: A developer opens a PR with a risky schema migration. The Skill creates a per-PR Neon branch with production-like data, runs the migration against it, and sets the branch to auto-expire after merge. ## Quick Start Ask the AI to create a Neon branch for testing your migration, for example: "Create a Neon branch from main so I can test my migration against production-like data."

Frequently Asked Questions about neon-postgres-branches

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Neon branch for testing migrations?▼

Create a normal Neon branch with the CLI using neon branches create --name <branch-name> --parent <parent> --expires-at <timestamp>. A normal branch copies production-like data, which exposes edge cases that seed scripts miss during migration testing.

What is a schema-only branch in Neon?▼

A schema-only branch clones the database structure without copying any rows, created with the --schema-only flag on neon branches create. It is in Beta and designed for sensitive data workflows where compliance rules prohibit copying production data.

Should I use the Neon CLI or MCP server for branching?▼

Default to the Neon CLI, verified with neon --version and neon projects list. Switch to the Neon MCP server only when the CLI is unavailable, cannot be authenticated, or the user explicitly requests MCP.

Can I reset a Neon branch from its parent?▼

Yes, child branches can be reset with neon branches reset <id|name> --parent, which fully replaces the child with the parent's latest state. Root branches, schema-only branches, and branches with children cannot be reset.

How do I automate Neon branches in CI/CD pipelines?▼

Create a branch per PR or per test run, set an expiration date, and delete it after merge for deterministic CI. You can also define branch policies declaratively in neon.ts with TTL and compute settings applied automatically.