[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EFKJMBN9BZWR6F22PBVXX4":3,"skill-same:01M6EFKJMBN9BZWR6F22PBVXX4":48},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M6EFKJMBN9BZWR6F22PBVXX4","neon-branching",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fneon-branching\u002FSKILL.md",[],[18,19,20],"neon","branching","neon branching","2026-11-10 10:12:30",false,"# Neon Branching — Database Branching for Development\n\nYou are an expert in Neon's database branching, the feature that creates instant copy-on-write branches of your Postgres database. You help developers set up preview environments with real data, run CI tests against production schemas, test migrations safely, and implement database-per-PR workflows — creating database branches as fast as git branches with zero data copying using Neon's copy-on-write storage.\n\n## Core Capabilities\n\n### Branch Management\n\n```bash\n# Create branch from main (instant — copy-on-write, no data copy)\nneonctl branches create --name preview\u002Fpr-42 --parent main\n\n# Branch from specific point in time\nneonctl branches create --name debug\u002Fincident-2026-03 \\\n  --parent main \\\n  --parent-timestamp \"2026-03-10T14:30:00Z\"\n\n# Get connection string\nneonctl connection-string preview\u002Fpr-42\n# postgres:\u002F\u002Fuser:pass@ep-xyz.us-east-2.aws.neon.tech\u002Fmydb?sslmode=require\n\n# List branches\nneonctl branches list\n# main            (default, 2.3 GB)\n# preview\u002Fpr-42   (from main, 0 bytes overhead)\n# staging         (from main, 12 MB diff)\n\n# Delete when done\nneonctl branches delete preview\u002Fpr-42\n```\n\n### CI\u002FCD Integration\n\n```yaml\n# .github\u002Fworkflows\u002Fpreview.yml\nname: Preview Environment\non: pull_request\n\njobs:\n  preview:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Create Neon branch\n        id: neon\n        uses: neondatabase\u002Fcreate-branch-action@v5\n        with:\n          project_id: ${{ secrets.NEON_PROJECT_ID }}\n          branch_name: preview\u002Fpr-${{ github.event.number }}\n          api_key: ${{ secrets.NEON_API_KEY }}\n\n      - name: Run migrations\n        env:\n          DATABASE_URL: ${{ steps.neon.outputs.db_url }}\n        run: npx drizzle-kit push\n\n      - name: Run tests\n        env:\n          DATABASE_URL: ${{ steps.neon.outputs.db_url }}\n        run: npm test\n\n      - name: Deploy preview\n        env:\n          DATABASE_URL: ${{ steps.neon.outputs.db_url }}\n        run: vercel deploy --env DATABASE_URL=$DATABASE_URL\n\n      - name: Comment PR\n        uses: actions\u002Fgithub-script@v7\n        with:\n          script: |\n            github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: context.issue.number,\n              body: `? Preview deployed!\\n- App: ${previewUrl}\\n- DB Branch: preview\u002Fpr-${context.issue.number}`\n            });\n```\n\n### API Usage\n\n```typescript\nimport { createApiClient } from \"@neondatabase\u002Fapi-client\";\n\nconst neon = createApiClient({ apiKey: process.env.NEON_API_KEY! });\n\n\u002F\u002F Create branch programmatically\nasync function createPreviewBranch(prNumber: number) {\n  const { data: branch } = await neon.createProjectBranch(projectId, {\n    branch: {\n      name: `preview\u002Fpr-${prNumber}`,\n      parent_id: mainBranchId,\n    },\n    endpoints: [{ type: \"read_write\" }],\n  });\n\n  \u002F\u002F Get connection string\n  const { data: connectionUri } = await neon.getConnectionUri({\n    projectId,\n    branchId: branch.branch.id,\n    role_name: \"neondb_owner\",\n  });\n\n  return connectionUri.uri;\n}\n\n\u002F\u002F Auto-cleanup: delete branches for merged\u002Fclosed PRs\nasync function cleanupBranches() {\n  const { data } = await neon.listProjectBranches(projectId);\n  for (const branch of data.branches) {\n    if (branch.name.startsWith(\"preview\u002Fpr-\")) {\n      const prNumber = branch.name.split(\"-\").pop();\n      const prState = await getPRState(prNumber);\n      if (prState === \"closed\" || prState === \"merged\") {\n        await neon.deleteProjectBranch(projectId, branch.id);\n      }\n    }\n  }\n}\n```\n\n## Installation\n\n```bash\nnpm install -g neonctl\nneonctl auth                               # Authenticate\n\n# API client\nnpm install @neondatabase\u002Fapi-client\n```\n\n## Best Practices\n\n1. **Branch per PR** — Create database branch for each PR; test with real schema and data; delete on merge\n2. **Instant creation** — Branches are copy-on-write; 2 TB database branches in \u003C1 second, zero storage cost until writes\n3. **Time travel** — Branch from a specific timestamp for debugging; inspect production state at incident time\n4. **Migration testing** — Run migrations on branch before applying to main; catch errors safely\n5. **CI integration** — Use GitHub Actions to auto-create\u002Fdelete branches; fully automated preview environments\n6. **Auto-cleanup** — Delete branches when PRs close; prevent branch sprawl and unnecessary compute costs\n7. **Staging branch** — Keep a persistent staging branch; reset from main periodically\n8. **Connection pooling** — Use Neon's built-in connection pooler for serverless (append `-pooler` to host)\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fneon-branching",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill neon-branching",{"tool":40,"command":41},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill neon-branching",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill neon-branching","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fneon-branching\u002FSKILL.md",true,[],[49,58,67,76,82,88],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[55,56,57],"model","model hierarchy","model hierarchy skill",{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[64,65,66],"MCP","zoom","zoom mcp",{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[73,74,75,65],"sdk","zoom apps sdk","apps",{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[78],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[84],{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[90]]