neon-postgres-branches

Select and create Neon Postgres branches for development and migration testing.

78|38|Updated Oct 20, 2022
One-click install
npx skills add https://github.com/neondatabase/examples --skill neon-postgres-branches-neondatabase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neon-postgres-branches
Source: https://github.com/neondatabase/examples/tree/main/with-realtime-sse/.agents/skills/neon-postgres-branches
Command: npx skills add https://github.com/neondatabase/examples --skill neon-postgres-branches-neondatabase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the guesswork and risk of selecting the wrong Neon Postgres branch type for development and testing workflows, preventing data exposure issues, failed migration tests, and wasted time managing misconfigured test environments.

Core Features & Use Cases

  • Intelligent Branch Type Selection: Automatically recommends normal branches for realistic migration and query testing with production-like data, or schema-only branches for sensitive data workflows that require schema structure without copying production rows.
  • Multi-Tool Execution Support: Seamlessly works with Neon MCP, Neon CLI, or Neon REST API based on what is already installed and authenticated on your system, with clear fallback guidance if a tool is unavailable.
  • Use Case: For example, if you need to validate a risky database schema migration before merging to production, this Skill guides you to create an isolated normal branch with production-like data to catch edge cases without impacting live users.

Quick Start

Use the neon-postgres-branches skill to create a test branch for my user schema migration against production-like data to catch issues before merging.

Frequently Asked Questions about neon-postgres-branches

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

FAQPage Schema
How do I safely test database schema migrations against production-like data?

To safely test database schema migrations, you create an isolated normal Neon Postgres branch with production-like data to catch edge cases without impacting live users. This approach enables full validation of risky changes before merging to production.

What is a schema-only branch in Neon Postgres used for?

A schema-only branch in Neon Postgres is used for sensitive data development workflows that require schema structure without copying production rows. This avoids exposing sensitive data while still allowing development and testing against the database structure.

Can I create Neon Postgres branches using the Neon CLI or REST API in CI/CD?

Yes, you can create Neon Postgres branches using the Neon CLI, Neon MCP, or Neon REST API in CI/CD and local development environments. The skill provides multi-tool execution support with clear fallback guidance if a specific tool is unavailable.

What's the best way to reset a drifted child branch to its parent state in Postgres?

The best way to reset a drifted child branch to its parent state in Postgres is to recreate the branch from the parent using Neon branching. This ensures the child branch matches the parent's current schema and data state without manual synchronization.

When should I choose a normal branch over a schema-only branch for migration testing?

Choose a normal branch for migration testing when you need realistic query validation with production-like data to catch edge cases. Select a schema-only branch when working with sensitive data and you only need schema structure without copying production rows.

Do I need Neon MCP installed to manage ephemeral branch lifecycles for testing?

No, you do not need Neon MCP installed exclusively, as Neon CLI or Neon REST API also support branch lifecycle management. The skill works with whichever tool is already installed and authenticated on your system for ephemeral branch workflows.