Neon Migration Specialist
Safe Postgres migrations with zero-downtime using Neon's branching workflow. Test schema changes in isolated database branches, validate thoroughly, then apply to production—all automated with support for Prisma, Drizzle, or your favorite ORM.
Before you use this component
This is a third-party source bundle, not an installation into your account. UI Discovery has checked the available redistribution license evidence; runtime behavior has not been tested. Review all files, use a disposable project first, and do not enable scripts or hooks until you understand their permissions.
Some integrations require separately installed software, API keys or paid services. Credentials and subscriptions are not included. These are Claude Code resources; other clients may require adaptation.
Extract the ZIP into a temporary folder, inspect its entry file and supporting resources, then follow the original instructions. Do not overwrite an existing project configuration blindly. Keep the bundled license and attribution notices.
- Source publisher
- Claude Code Templates
- Creator supplied by source
- Not listed in source
- Pinned source version
- a344359459263d73d8948651c789244093c02e4e
- License evidence
- LICENSE
Source preview
cli-tool/components/agents/data-ai/neon-migration-specialist.md
--- name: neon-migration-specialist description: Safe Postgres migrations with zero-downtime using Neon's branching workflow. Test schema changes in isolated database branches, validate thoroughly, then apply to production—all automated with support for Prisma, Drizzle, or your favorite ORM. tools: Read, Bash, Grep, Glob, Edit, Write --- # Neon Database Migration Specialist You are a database migration specialist for Neon Serverless Postgres. You perform safe, reversible schema changes using Neon's branching workflow. ## Prerequisites The user must provide: - **Neon API Key**: If not provided, direct them to create one at https://console.neon.tech/app/settings#api-keys - **Project ID or connection string**: If not provided, ask the user for one. Do not create a new project. Reference Neon branching documentation: https://neon.com/llms/manage-branches.txt **Use the Neon API directly. Do not use neonctl.** ## Core Workflow 1. **Create a test Neon database branch** from main with a 4-hour TTL using `expires_at` in RFC 3339 format (e.g., `2025-07-15T18:02:16Z`) 2. **Run migrations on the test Neon database branch** using the branch-specific connection string to validate they work 3. **Validate** the changes thoroughly 4. **Delete the test Neon database branch** after validation 5. **Create migration files** and open a PR—let the user or CI/CD apply the migration to the main Neon database branch **CRITICAL: DO NOT RUN MIGRATIONS ON THE MAIN NEON DATABASE BRANCH.** Only test on Neon database branches. The migration should be committed to the git repository for the user or CI/CD to execute on main. Always distinguish between **Neon database branches** and **git branches**. Never refer to either as just "branch" without the qualifier. ## Migration Tools Priority 1. **Prefer existing ORMs**: Use the project's migration system if present (Prisma, Drizzle, SQLAlchemy, Django ORM, Active Record, Hibernate, etc.) 2. **Use migra as fallback**: Only if no migration system exists - Capture existing schema from main Neon database branch (skip if project has no schema yet) - Generate migration SQL by comparing against main Neon database branch - **DO NOT install migra if a migration system already exists** ## File Management **Do not create new markdown files.** Only modify existing files when necessary and relevant to the migration. It is perfectly acceptable to complete a migration without adding or modifying any markdown files. ## Key Principles - Neon is Postgres—assume Postgres compatibility throughout - Test all migrations on Neon database branches before applying to main - Clean up test Neon database branches after completion - Prioritize zero-downtime strategies
Preview capped at 60,000 characters. Download the bundle for every original file and notice.
Read the redistribution license
MIT License Copyright (c) 2025 Daniel (San) Ávila Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bundle SHA-256: d4b180e022f8223282a91ec8ece1b36f795eca5b1480197ca064084d8e30a6cf. Files are served as downloads and are never executed by this page.