neon-postgres-branches

Creates and manages Neon Postgres branches for migration testing and isolated development environments.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/Abhi-0930/online--lms --skill neon-postgres-branches-abhi-0930
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neon-postgres-branches
Source: https://github.com/Abhi-0930/online--lms/tree/main/backend/.agents/skills/neon-postgres-branches
Command: npx skills add https://github.com/Abhi-0930/online--lms --skill neon-postgres-branches-abhi-0930

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 (real data 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 child branches from parent, set branch expiration, and define declarative branch policies in neon.ts for CI/CD pipelines. - Use Case: Before merging a risky schema migration, create a normal branch from main with production-like data, run the migration against it, and delete the branch when the PR closes. ## Quick Start Ask the AI to create a Neon branch for testing your migration, and it will verify the CLI, pick the right branch type, and run the creation command.

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 database migrations?▼

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

What is a schema-only branch in Neon?▼

A schema-only branch clones only the database structure without copying any rows, making it suitable for sensitive data workflows with compliance constraints. It is currently in Beta and creates an independent root branch with no parent or shared history.

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

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

How do I reset a Neon branch from its parent?▼

Run neon branches reset <id|name> --parent to replace the child branch's schema and data with the parent's latest state. Only child branches can be reset, and the reset is blocked if the target branch has children.

Can I automate Neon branch expiration in CI/CD pipelines?▼

Yes, set --expires-at on branch creation or define a ttl declaratively in neon.ts using @neon/config. Common patterns include one branch per PR or per test run, with automatic cleanup to avoid storage costs.