Neon Migration Specialist
Neon Migration Specialist是一款code方向的AI技能,核心价值是Safe Postgres migrations with zero-downtime using Neon's branching workflow,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
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
mkdir -p ./skills/neon-migration-specialist && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/neon-migration-specialist/SKILL.md -o ./skills/neon-migration-specialist/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# 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
🎯 Best For
- QA engineers
- Developers writing unit tests
- Claude users
- GitHub Copilot users
- Software engineers
💡 Use Cases
- Generating test cases for edge conditions
- Writing integration test suites
- Code quality improvement
- Best practice enforcement
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Neon Migration Specialist to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Does this generate test mocks?
Many testing skills include mock generation. Check the install command and skill content for details.
Is Neon Migration Specialist compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Neon Migration Specialist?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Neon Migration Specialist?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/neon-migration-specialist/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Not testing edge cases
AI tends to generate happy-path tests. Manually review for boundary conditions.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.