/vercel:deployments-cicdfrom vercel
Guides Vercel deployment workflows: preview/production deploys, promote, rollback, inspect, build with --prebuilt, and CI/CD integration with GitHub Actions, GitLab CI, and Bitbucket Pipelines.
Ships in vercel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in Vercel deployment workflows — vercel deploy, vercel promote, vercel rollback, vercel inspect, vercel build, and CI/CD pipeline integration with GitHub Actions, GitLab CI, and Bitbucket Pipelines.
# Deploy from project root (creates preview URL)
vercel
# Equivalent explicit form
vercel deploy
Git pushes to non-production branches make previews. A project's first deploy goes to production. To undo it, ask the user, then run vercel remove <id> --yes.
# Deploy directly to production
vercel --prod
vercel deploy --prod
# Force a new deployment (skip cache)
vercel --prod --force
# Build locally (uses preview env vars by default)
vercel build
# Build with production env vars
vercel build --prod
# Deploy only the build output (no remote build)
vercel deploy --prebuilt
vercel deploy --prebuilt --prod
When to use --prebuilt: Custom CI pipelines where you control the build step, need build caching at the CI level, or need to run tests between build and deploy.
Prebuilt limits: System Environment Variables are missing at build time, and Next.js Skew Protection needs a custom deployment ID.
# Stage a production deployment without assigning domains
vercel deploy --prod --skip-domain
# Promote it (instant, no rebuild)
vercel promote <deployment-url-or-id>
# Show pending rollback status (no argument does not roll back)
vercel rollback status
# Rollback to a specific deployment
vercel rollback <deployment-url-or-id>
Promote a production deployment, not a preview. Promoting a staged production deployment is instant and serves the same build. Promoting a preview rebuilds it with production environment variables, so the tested build is not the one released.
Rollback turns off auto-assignment. New production pushes stop going live until vercel promote restores it.
# View deployment details (build info, functions, metadata)
vercel inspect <deployment-url>
# List recent deployments
vercel ls
# View recent runtime logs for a deployment
vercel logs --deployment <url>
The Git integration builds every push, posts preview URLs on pull requests, and deploys the production branch. Run tests, scans, and approval gates in CI, either Vercel CI (vercel-ci skill) or your existing provider. Gate releases on them with Deployment Checks while Vercel keeps building. Deploy from CI only when the build must run in your runner, such as to keep source code off Vercel or for GitHub Enterprise Server.
Every CI pipeline needs these three variables:
VERCEL_TOKEN=<your-token> # Personal or team token
VERCEL_ORG_ID=<org-id> # From .vercel/project.json
VERCEL_PROJECT_ID=<project-id> # From .vercel/project.json
Set these as secrets in your CI provider. Never commit them to source control. The CLI reads VERCEL_TOKEN from the environment; do not pass --token, which exposes it in process lists and logs.
name: Deploy to Vercel
on:
push:
branches: [main]
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Vercel CLI
run: npm install -g vercel
- name: Pull Vercel Environment
run: vercel pull --yes --environment=production
- name: Build
run: vercel build --prod
- name: Deploy
run: vercel deploy --prebuilt --prod
| Task | Read |
|---|---|
| Post preview URLs on pull requests from GitHub Actions, or deploy from GitLab CI or Bitbucket Pipelines | references/cli-pipelines.md |
| Let deployed functions reach AWS, GCP, or Vault without static secrets (OIDC federation) | references/oidc-federation.md |
| Deployment Checks, or testing protected deployments from CI | references/deployment-checks.md |
| Live status (MCP) | references/live-status.md |
With Git deployments, require Deployment Checks. When CI deploys with the CLI, stage a production deployment, test it, then promote that build:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
jobs:
stage:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
outputs:
url: ${{ steps.deploy.outputs.url }}
steps:
# ... checkout, install, vercel pull --environment=production, vercel build --prod ...
- id: deploy
run: echo "url=$(vercel deploy --prebuilt --prod --skip-domain)" >> $GITHUB_OUTPUT
e2e-tests:
needs: stage
runs-on: ubuntu-latest
steps:
# ... checkout, install, bypass header in playwright.config.ts (see references/deployment-checks.md) ...
- run: npx playwright test
env:
BASE_URL: ${{ needs.stage.outputs.url }}
VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
promote:
needs: [stage, e2e-tests]
runs-on: ubuntu-latest
steps:
- run: npm install -g vercel
- run: vercel promote ${{ needs.stage.outputs.url }}
| Flag | Purpose |
|---|---|
--token <token> | Authenticate; in CI, set VERCEL_TOKEN instead |
--yes / -y | Skip confirmation prompts |
--scope <team> | Execute as a specific team |
--cwd <dir> | Set working directory |
--prebuilt in CI — separates build from deploy, enables build caching and test gatesvercel pull before build — ensures correct env vars and project settingsVERCEL_TOKEN for CLI)npm install -g vercel@latest can break unexpectedly--yes flag in CI — prevents interactive prompts from hanging pipelines| Scenario | Strategy | Commands |
|---|---|---|
| Standard team workflow | Git-push deploy | Push to main/feature branches |
| Custom CI/CD (Actions, CircleCI) | Prebuilt deploy | vercel build && vercel deploy --prebuilt |
| Monorepo with Turborepo | Affected + remote cache | turbo run build --affected |
| Preview for every PR | Default behavior | Auto-creates preview URL per branch |
| Release a tested build | Deployment Checks (Git) or staged production (CLI) | Required checks, or vercel deploy --prod --skip-domain → test → vercel promote <url> |
| Atomic deploys with DB migrations | Two-phase | Run migration → verify → vercel promote |
| Latency-sensitive regional data | Vercel Functions | Keep the Node.js default; set the function region near the data |
| Error | Cause | Fix |
|---|---|---|
ERR_PNPM_OUTDATED_LOCKFILE | Lockfile doesn't match package.json | Run pnpm install, commit lockfile |
NEXT_NOT_FOUND | Root directory misconfigured | Set Root Directory in Project Settings |
Invalid next.config.js | Config syntax error | Validate config locally with next build |
functions/api/*.js mismatch | Wrong file structure | Move to app/api/ directory (App Router) |
Error: EPERM | File permission issue in build | Don't chmod in build scripts; use postinstall |
Present a structured deploy result block:
## Deploy Result
- **URL**: <deployment-url>
- **Target**: production | preview
- **Status**: READY | ERROR | BUILDING | QUEUED
- **Commit**: <short-sha>
- **Framework**: <detected-framework>
- **Build Duration**: <duration>
If the deployment failed, append:
- **Error**: <summary of failure from logs>
For production deploys, also include:
### Post-Deploy Observability
- **Error scan**: <N errors found / clean> (scanned via vercel logs -q level:error --since 1h)
- **Drains**: <N configured / none>
- **Monitoring**: <active / gaps identified>
Based on the deployment outcome:
/deploy prod to promote to production."/status to see the full project overview."build script in package.json, check for missing env vars with /env list, ensure dependencies are installed."/env pull to sync environment variables locally, or /env list to review what's configured on Vercel."vercel.json has no rootDirectory key."vercel logs --deployment <url> -q level:error for details. If drains are configured, correlate with external monitoring."/status for a full observability diagnostic."What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
41 skills in this plugin
/access-protected-vercel-deploymentAccess and test Vercel deployments protected by Vercel Authentication, SSO, or Deployment Protection. Use when curl, agent-browser, Playwright, or another automated request reaches a Vercel login or protection page; when a protected preview or production URL returns 401 or 403; when TRUSTED_SOURCES_ENVIRONMENT_MISMATCH appears; or when choosing between `vercel curl` and the `x-vercel-trusted-oidc-idp-token` header./ai-gatewayVercel AI Gateway guidance for setup, model discovery, authentication, routing, fallbacks, virtual models, evaluation models, BYOK, budgets, spend reporting, observability, compatible APIs, and coding-agent configuration. Use when adding AI Gateway to an app, migrating provider calls, choosing models or providers, centralizing model configuration, evaluating application state, debugging gateway requests, or running `vercel ai-gateway` commands./ai-sdkVercel AI SDK expert guidance. Use when building AI-powered features — chat interfaces, text generation, structured output, tool calling, agents, MCP integration, streaming, embeddings, reranking, image generation, or working with any LLM provider./authAuthentication integration guidance — Clerk (native Vercel Marketplace), Better Auth, Descope, and Auth0 setup for Next.js applications, plus Sign in with Vercel, Vercel Passport, and Vercel KMS. Covers server config, route handlers, proxy.ts auth patterns, sign-in/sign-up flows, and Marketplace provisioning. Use when implementing user authentication, sessions, protected routes, or protecting deployments./bootstrapProject bootstrapping orchestrator for repos that depend on Vercel-linked resources (databases, auth, and managed integrations). Use when setting up or repairing a repository so linking, environment provisioning, env pulls, and first-run db/dev commands happen in the correct safe order./botidProtect specific routes and server actions from bots in code with Vercel BotID (`botid` npm package). Use when installing BotID, calling `initBotId()` or `checkBotId()`, mounting `<BotIdClient />`, gating signup, login, checkout or AI inference endpoints, allowing verified bots such as ChatGPT agents through, enabling Deep Analysis, or debugging a route that always reports a bot. For site-wide bot rules (Bot Protection, AI Bots, custom rules on bot name or category), use the `vercel-firewall` skill.npx claudepluginhub vercel/vercel-plugin --plugin vercel-pluginOther plugins' skills for the same job