Skip to content

/deploy

Deploy the current project to Vercel. Pass "prod" or "production" as argument to deploy to production. Default is preview deployment.

From plugin
vercel
3384 skills3 agents4 commands3 hooks
+1
> /plugin marketplace add vercel/vercel-plugin
> /plugin install vercel-plugin@vercel

Command definition

deploy.md
description: Deploy the current project to Vercel. Pass "prod" or "production" as argument to deploy to production. Default is preview deployment.

Deploy to Vercel

Deploy the current project to Vercel using the CLI, with preflight safety checks, explicit production confirmation, and post-deploy verification.

Preflight

Run these checks before any deployment. Stop on failure and print actionable guidance.

1. **CLI available?** — Confirm `vercel` is on PATH.

  • If missing: `npm i -g vercel` (or `pnpm add -g vercel` / `bun add -g vercel`).

2. **Project linked?** — Check for `.vercel/project.json` in the current directory or nearest parent.

  • If not found: run `vercel link` interactively, then re-run `/deploy`.

3. **Monorepo detection** — Look for `turbo.json` or `pnpm-workspace.yaml` at the repo root.

  • If detected: confirm which package is targeted. If ambiguous, ask the user before proceeding.

4. **Uncommitted changes** — Run `git status --porcelain`.

  • If output is non-empty: warn the user that `vercel` uploads the local working tree, so uncommitted and untracked files **will** ship in this deployment (only files matched by `.vercelignore` or the CLI's default ignore list are skipped; `.gitignore` rules do not apply). Ask whether to continue or commit first.
  • If not a git repo, skip this check.

5. **Observability preflight** (production deploys only) —

Before promoting to production, verify observability readiness:

  • **Drains check**: Query configured drains via MCP `list_drains` or REST API. If no drains are configured on a Pro/Enterprise plan, warn:

> ⚠️ No drains configured. Production errors won't be forwarded to external monitoring. > Configure drains via Dashboard or REST API before promoting.

  • **Errored drains**: If any drain is in error state, warn and suggest remediation before deploying:

> ⚠️ Drain "<url>" is errored. Fix or recreate before production deploy to avoid monitoring gaps.

  • **Error monitoring**: Check that at least one of these is in place: configured drains, an error tracking integration (e.g., Sentry, Datadog via `vercel integration ls`), or `@vercel/analytics` in the project.
  • These are warnings, not blockers — the user may proceed after acknowledgment.

Plan

State the intended action before executing:

  • **Preview deploy** (default): `vercel` — creates a preview deployment on a unique URL.
  • **Production deploy**: `vercel --prod` — deploys to production domains.

If "$ARGUMENTS" contains the whole word `prod` or `production` (not a substring such as "product"):

> ⚠️ **Production deployment requested.** > This will deploy to your live production URL and affect real users. > **Ask the user for explicit confirmation before proceeding.** Do not deploy to production without a clear "yes."

If "$ARGUMENTS" does not indicate production:

> Deploying a **preview** build. This creates an isolated URL and does not affect production. > > If the project has no deployments yet, this deployment goes to production. Tell the user before you deploy.

Commands

Preview Deployment

<!-- Sourced from deployments-cicd skill: Deployment Commands > Preview Deployment -->

# 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`.

Production Deployment (requires confirmation)

<!-- Sourced from deployments-cicd skill: Deployment Commands > Production Deployment -->

# Deploy directly to production
vercel --prod
vercel deploy --prod

# Force a new deployment (skip cache)
vercel --prod --force

Capture the full command output. Extract the **deployment URL** from the output (the line containing the `.vercel.app` URL or custom domain URL).

Record the current git commit SHA for the summary:

git rev-parse --short HEAD

Verification

After deployment completes, verify the result:

Deployment status (MCP)

Use `list_deployments` to find the deployment for the intended project and commit, then `get_deployment` to inspect its state. For a failed build, use `list_deployment_events`. Inspect the tools and input schemas exposed by the authenticated connection before calling them.

1. Inspect the Deployment

<!-- Sourced from deployments-cicd skill: Deployment Commands > Inspect Deployments -->

# 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>

Extract: deployment state (READY / ERROR / QUEUED / BUILDING), build duration, framework, Node.js version, function count.

2. On Failure — Fetch Build Logs

If the deployment state is **ERROR** or the deploy command exited non-zero:

vercel inspect <deployment-url> --logs

`vercel logs` shows request and runtime logs, not build output. Present the last 50 lines of build logs to help diagnose the failure. Highlight any lines containing `error`, `Error`, `ERR!`, or `FATAL`.

3. On Success — Quick Smoke Check

If the deployment state is **READY**, note the URL is live and accessible.

4. Post-Deploy Error Scan (production deploys)

For production deployments, wait 60 seconds after READY state, then scan for early runtime errors:

vercel logs --deployment <deployment-url> --query 'level:error' --since 1h

Or via MCP if available: use `get_runtime_logs` with level filter `error`.

**Interpret results:**

| Finding | Action | |---------|--------| | No errors | ✓ Clean deploy — no runtime errors in first hour | | Errors detected | List error count and first 5 unique error messages. Suggest: check drain payloads for correlated traces, review function logs in Dashboard | | 500 status codes in logs | Correlate timestamps with drain data (if configured) or `vercel logs

Read more
@vercel
Ships withvercel

Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel expert.

33846 skills3 agents1 MCP
Get the whole plugin, auto-invoked

Stars on GitHub

Momentum

stars in total
338
Star history of vercel/vercel-plugin on GitHub, a chart by star-history.com

Other commands on vercel.

bootstrap
Auto-invoked

bootstrap

Command

Bootstrap a repository with Vercel-linked resources by running preflight checks, provisioning integrations, verifying env keys,…

@vercel@vercelInstall Command
env
Auto-invoked

env

Command

Manage Vercel environment variables. Commands include list, pull, add, remove, and diff. Use to sync environment variables…

@vercel@vercelInstall Command
status
Auto-invoked

status

Command

Show the status of the current Vercel project — recent deployments, linked project info, and environment overview.

@vercel@vercelInstall Command

More commands from other plugins.

bootstrap

bootstrap

Command

Bootstrap a repository with Vercel-linked resources by running preflight checks, provisioning integrations, verifying env keys,…

vercel7d337
@vercel-labs-2@vercel-labs-2Install Command