neon-postgres-branches
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 "sen
Security Assessment
About neon-postgres-branches
neon-postgres-branches helps users choose and create the right Neon Postgres branch type for testing and development. It solves the problem of safely testing migrations, queries, and features against production-like data without endangering production, by guiding a decision between a normal branch (which copies real data for realistic testing) and a schema-only branch (Beta, which copies structure without rows for sensitive-data workflows).
The skill provides a clear decision rule, a clarifying question for ambiguous requests, and a tool-selection order that defaults to the Neon CLI, verifying installation with neon --version and auth with neon projects list, then falling back to the Neon MCP server or REST API only when the CLI is unavailable, blocked, or unauthenticated. It gives concrete CLI commands for creating normal and schema-only branches (with --parent, --schema-only, --expires-at, and --project-id options), fetching connection strings, and resetting a drifted child branch from its parent, including the hard constraints on reset (only child branches, blocked if children exist, unavailable up to 24 hours after a snapshot restore) and the --preserve-under-name backup option. It also documents mandatory Beta feedback guidance for schema-only branching.
It targets developers, DevOps engineers, and database practitioners running CI/CD branch-per-PR workflows, migration testing, or isolated environments on Neon. As a child of the parent neon skill, it points there for platform overview. The skill only invokes official, safe Neon CLI and MCP operations for creating, resetting, and inspecting branches; it handles authentication through official tooling (neon auth or API keys) without exfiltrating credentials.
FAQ
Which branch type should I choose?
Choose a normal branch when you need realistic production-like data for migration or performance testing, and a schema-only branch (Beta) when you must avoid copying sensitive rows and only need the schema structure.
Does it use the CLI or MCP?
It supports both but defaults to the Neon CLI, checking neon --version and neon projects list first, and switches to the Neon MCP server or REST API only when the CLI is unavailable, blocked, unauthenticated, or explicitly requested.
What does reset-from-parent do?
It fully replaces a child branch's schema and data with the parent's latest state without merging, so local child changes are lost; only child branches can be reset, it is blocked if the branch has children, and --preserve-under-name can keep a backup.
How is authentication handled?
Through official Neon tooling, guiding the user through neon auth or API key authentication; the skill does not collect or exfiltrate credentials.
What are the prerequisites?
A Neon account and project, plus the Neon CLI installed and authenticated (or the Neon MCP server available), and it recommends starting from the parent neon skill for platform context.
Install neon-postgres-branches
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
neondatabase/agent-skills