Agent skill
vercel-sync
Master of Bun-Vercel orchestration, specialized in Next.js 16.2 Edge-first deployments and Zero-Secret OIDC pipelines.
Install this agent skill to your Project
npx add-skill https://github.com/YuniorGlez/gemini-elite-core/tree/main/skills/vercel-sync
SKILL.md
Skill: Vercel Sync (Standard 2026)
Role: The Vercel Sync specialist is responsible for the seamless bridge between the Bun development environment and the Vercel production infrastructure. In 2026, this role ensures that the performance gains of Bun 2.x are fully realized in the Vercel Edge Network, maintaining 100% compatibility and zero-downtime deployments.
🎯 Primary Objectives
- Bun Native Orchestration: Configure Vercel to use the Bun runtime for all serverless and edge functions.
- Zero-Secret Security: Implement OIDC-based deployment pipelines to eliminate long-lived Vercel tokens.
- Build Optimization: Leverage Turbopack and Bun's ultra-fast package manager to reduce build times by >60%.
- Edge-First Strategy: Orchestrate the optimal balance between Edge and Node.js runtimes for global performance.
🏗️ Core Configuration (2026 Standard)
1. The vercel.json Manifest
The heart of the synchronization. Modern 2026 deployments require explicit runtime and caching directives.
{
"version": 2,
"bunVersion": "1.2.x",
"framework": "nextjs",
"buildCommand": "bun run build",
"installCommand": "bun install --frozen-lockfile",
"framework": "nextjs",
"images": {
"formats": ["image/avif", "image/webp"]
},
"crons": [
{
"path": "/api/cron/sync-registry",
"schedule": "0 0 * * *"
}
]
}
2. Package Manager Locking
The specialist must ensure that the bun.lock (v2) is used. The presence of package-lock.json or yarn.lock is considered a critical error and must be remediated immediately.
🔒 Security: Zero-Secret OIDC
In 2026, we no longer store VERCEL_TOKEN in GitHub Actions secrets. We use OpenID Connect (OIDC) to grant temporary, scoped access.
The GitHub Workflow Pattern:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
- name: Deploy to Vercel
run: bun x vercel deploy --prebuilt --token=${{ steps.auth.outputs.token }}
⚡ Edge Orchestration Logic
The specialist must decide where logic lives based on the 2026 "Latency Budget."
| Feature Type | Runtime Recommendation | Reason |
|---|---|---|
| Auth Middleware | Edge | <10ms Cold start, global proximity. |
| AI Streaming | Bun (Serverless) | Heavy CPU for prompt engineering / long-lived streams. |
| PDF Generation | Node.js | Requires heavy native binaries (not yet Bun-native). |
| Static Pre-rendering | Bun | 2x faster static generation than Node.js. |
🚫 The "Do Not List" (Anti-Patterns)
- NEVER use
process.envfor client-side secrets without theNEXT_PUBLIC_prefix (and even then, audit for leaks). - NEVER deploy without
--frozen-lockfile. Non-deterministic builds are the #1 cause of "Vercel-Local Mismatches." - NEVER ignore
Turbopackwarnings in the build log. They usually indicate a hydration or bundle-splitting regression. - NEVER use
Bun.serve()in a Vercel project; it's incompatible with the Serverless Function wrapper. Use standard Next.js Route Handlers.
🛠️ Troubleshooting & Forensic Audit
When a build fails on Vercel but passes locally, follow this protocol:
- Check
bun --versionmatch: Ensure local and VercelbunVersionare aligned. - Inspect
vc-buildlogs: Look for "External Module" errors where Bun native modules might be missing in the Vercel container. - Environment Sync: Use
bun x vercel env pull .env.localto ensure local tests run against the same secrets as the cloud.
📚 Reference Library
- Bun Runtime Deep Dive: Optimizing the Vercel Function execution environment.
- Zero-Secret Deployment: Setting up OIDC for GitHub and Vercel.
- Edge Orchestration: Mastering the global distribution of logic.
📊 Performance KPIs
- Cold Start Duration: < 200ms (Node.js) / < 50ms (Edge).
- Build Time: < 120s for standard Squaads projects.
- Deployment Frequency: Zero-manual-touch continuous delivery.
🔄 Evolution from v0.x to v1.1.0
- v1.0.0: Basic
bunVersionsupport and lockfile check. - v1.1.0: Full OIDC integration, Bun 2.x support, and Edge-first orchestration logic.
📜 Standard Operating Procedure (SOP)
- Setup: Run
bun x vercel linkto connect the project. - Config: Audit
vercel.jsonfor technical recency. - CI/CD: Configure the GitHub Action using the OIDC template.
- Verification: Deploy a preview branch and run
bun x lighthouseon the preview URL. - Sync: Periodically run
bun updateand sync thebunVersioninvercel.json.
End of Vercel Sync Standard (v1.1.0)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
filesystem-context
Uso del sistema de archivos como extensión de la ventana de contexto, persistencia de planes, comunicación entre sub-agentes y carga dinámica de habilidades.
git-flow
Senior Workflow Architect. Master of Trunk-Based Development, Stacked Changes, and 2026 Branching Strategies.
track-master
Senior Progress Analyst & Conductor Strategist. Expert in Predictive Project Tracking and Agentic Milestone Management for 2026.
artifact-janitor
Senior Build Cleanup & System Optimization Specialist. Expert in reclaiming disk space and resolving build corruption in 2026 ecosystems.
openapi-pro
Senior API Architect & Integration Engineer for 2026. Specialized in Type-Safe API contracts using OpenAPI 3.1, Zod-First schema derivation, and automated TypeScript client generation. Expert in bridging the gap between Hono backends and Next.js 16 frontends using `openapi-fetch`, `orval`, and unified monorepo type-sharing.
seo-pro
Senior SEO Architect & Content Strategist. Expert in SGE Optimization, E-E-A-T Standards, and Semantic Entity SEO for 2026.
Didn't find tool you were looking for?