
Vercel Deploy
- 1 installs
- 40 repo stars
- Updated August 4, 2026
- akillness/oh-my-skills
vercel-deploy is a Claude Code skill for Vercel-specific deployment operations including preview, production, promote, alias/domain, env sync, and rollback on linked projects.
About
vercel-deploy runs Vercel-specific deployment operations for linked web and fullstack projects: preview deploys, production deploys, staged deploy-and-promote flows, aliases and domains, environment-variable sync, and rollback response. A developer uses it when the provider is already Vercel and they need a preview URL, stable alias, custom domain, env-scope fix, production cutover, or rollback. It matters because it picks one deploy mode and verifies with the right depth rather than dumping every command.
- Runs Vercel-specific deploy operations: preview, production, promote, alias/domain, env, rollback
- Normalizes each request into one deploy packet before reaching for commands
- Gathers minimum truthful evidence (linked state, target env, build mode) before acting
Vercel Deploy by the numbers
- 1 all-time installs (skills.sh)
- Ranked #1,173 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
vercel-deploy capabilities & compatibility
- Capabilities
- preview deploy · production deploy · promote deploy · rollback
- Works with
- vercel
- Use cases
- devops · ci cd
- Runs
- Hosted SaaS
- Pricing
- Freemium
What vercel-deploy says it does
Use this skill when the job is **operating a deployment on Vercel specifically**, not designing generic rollout policy.
Choose exactly one primary mode before reaching for commands.
npx skills add https://github.com/akillness/oh-my-skills --skill vercel-deployAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 40 |
| Last updated | August 4, 2026 |
| Repository | akillness/oh-my-skills ↗ |
What it does
Run a Vercel preview, production, promote, alias/domain, env-sync, or rollback operation on a linked project.
Who is it for?
Operating a Vercel deploy after the provider is chosen: preview URL, alias, domain, cutover, or rollback
Skip if: Provider-neutral release strategy, CI/YAML authoring, local install/auth bootstrap, or broken builds
When should I use this skill?
Someone needs a Vercel preview URL, stable alias, custom domain, env-scope fix, production cutover, or rollback
What you get
One normalized deploy packet executed and verified with the right depth
- Deployment URL
- Stable alias or custom domain
- Verified production cutover or rollback
By the numbers
- 6 deploy modes
- 6-item evidence checklist
Files
Vercel Deploy
Use this skill when the job is operating a deployment on Vercel specifically, not designing generic rollout policy.
vercel-deploy is the provider-specific front door for:
- creating or refreshing Vercel preview deployments
- running a direct production deployment on Vercel
- staging a deploy, verifying it, then promoting it live
- assigning a stable preview alias or attaching a custom domain
- inspecting/fixing Vercel environment-variable scope and redeploy needs
- responding to a bad production deployment with rollback-oriented checks
Read these support docs before choosing the mode:
- references/modes-and-boundaries.md
- references/preview-production-command-packets.md
- references/env-domain-rollback-troubleshooting.md
When to use this skill
- The user explicitly wants to deploy a project on Vercel
- The job is about a Vercel preview URL, preview alias, or stable demo environment
- A linked Vercel deployment already exists and needs promotion or rollback handling
- The main issue is Vercel env scope, Vercel domain/alias state, or Vercel-specific release verification
- The provider has already been chosen and the user needs Vercel operator guidance rather than vendor-neutral release design
When not to use this skill
- The main question is generic rollout strategy, release gating, canary policy, or cross-provider deployment design → use
deployment-automation - The main job is editing GitHub Actions / CI YAML / task runners around the deploy flow → use
workflow-automation - The main job is installing Node, Vercel CLI, auth bootstrap, or linking the local machine → use
system-environment-setup - The app/framework/build is broken before the deploy path itself works → use
debuggingor the relevant framework/build skill first - The main job is long-lived telemetry, SLOs, or alerting after release → use
monitoring-observability
Instructions
Step 1: Normalize the Vercel job into one packet
Choose exactly one primary mode before reaching for commands.
vercel_packet:
primary_mode: preview-deploy | production-deploy | promote-preview | alias-domain | env-sync | rollback-response
project_state: linked | unlinked | unknown
build_mode: source-build | prebuilt | unknown
target_environment: preview | production | development | custom | unknown
url_goal: generated-url | stable-preview-alias | custom-domain | mixed | none
verification_depth: none | smoke | health-plus-logs | release-checklistPrimary modes:
preview-deploy— create or refresh a testable Vercel previewproduction-deploy— run a direct fresh production deploymentpromote-preview— verify an existing deployment, then make it currentalias-domain— apply/verify a stable preview alias or custom domainenv-sync— fix environment-variable scope or stale local/project env staterollback-response— move production back to a known-good deployment and verify recovery
If the request contains multiple goals, pick the one that owns the first answer and route the rest explicitly.
Step 2: Gather only the minimum truthful evidence
Do not guess from the framework name alone. Confirm the smallest credible set first: 1. Is the project already linked to Vercel (vercel link, .vercel/project.json, or dashboard evidence)? 2. Is the target really preview, production, or a custom/development environment? 3. Is the deploy path source-based or prebuilt? 4. Does the user care about the generated deployment URL, a stable alias, or a custom domain? 5. Is this actually a deploy/cutover problem, or an env/config mismatch that still needs redeploy? 6. What proof is expected: URL only, smoke check, health + logs, DNS verification, or rollback verification?
If one item is unknown, state the assumption instead of pretending the mode is fully known.
Step 3: Use the matching operator path
Do not dump every command at once. Pick the reference packet that matches the mode.
A. preview-deploy
Use when the deliverable is a testable preview deployment.
- Prefer linked-project CLI or dashboard-backed preview flows.
- Return the generated deployment URL plus any stable alias plan.
- If the goal is a stable demo URL, carry the result into
alias-domainrather than mixing everything into one blob.
Use packet: references/preview-production-command-packets.md#preview-deploy-packet
B. production-deploy
Use when the user explicitly wants a fresh production deployment now.
- Say whether the deployment is source-build or prebuilt.
- Report the production URL/domain reached.
- Separate deploy success from post-deploy verification.
Use packet: references/preview-production-command-packets.md#direct-production-deploy-packet
C. promote-preview
Use when a deployment already exists and the job is to cut over safely.
- Verify the exact deployment URL/commit before promotion.
- Treat promotion as a release operation, not a magical pointer flip.
- Note team-scope or domain caveats when they matter.
- Report production verification separately from the promote command itself.
Use packet: references/preview-production-command-packets.md#staged-production--promote-packet
D. alias-domain
Use when the stable URL is the real deliverable.
- Distinguish generated URL vs stable preview alias vs production custom domain.
- Report DNS/manual verification status separately from CLI success.
- Keep the raw deployment URL available as fallback evidence.
Use packet: references/env-domain-rollback-troubleshooting.md#aliases-and-domains
E. env-sync
Use when preview/prod behavior differs because variables are missing, stale, or scoped incorrectly.
- Check the intended environment first.
- Call out that env-var changes apply to new deployments, not old ones.
- Distinguish Vercel env scope from app-level canonical URL/config expectations.
Use packet: references/env-domain-rollback-troubleshooting.md#environment-variables
F. rollback-response
Use when production traffic must revert quickly.
- Identify the currently bad deployment and the exact rollback target.
- Call out stale-config / cron / plan-limit caveats before claiming recovery.
- Re-check production logs/health after rollback.
Use packet: references/env-domain-rollback-troubleshooting.md#rollback
Step 4: Keep boundaries clean while answering
Use this route-out table whenever the request drifts.
| If the request sounds like... | Use |
|---|---|
| “Design the release gates, canary policy, or rollback strategy across providers” | deployment-automation |
| “Rewrite the GitHub Actions workflow that runs Vercel commands” | workflow-automation |
| “Install Vercel CLI, auth, Node, or link local credentials” | system-environment-setup |
| “The build crashes before deploy succeeds” | debugging or a framework-specific skill |
| “Set up dashboards, alerts, or long-lived post-release monitoring” | monitoring-observability |
| “Inspect, deploy, promote, alias, domain-manage, env-sync, or roll back on Vercel” | vercel-deploy |
Step 5: Mention the legacy claimable deploy helper only if the environment explicitly depends on it
This directory still ships scripts/deploy.sh, a claimable-preview helper that packages a tarball and returns preview/claim URLs. Treat it as a legacy environment-specific shortcut, not the default Vercel operating model.
Use it only when all of these are true:
- the runtime explicitly expects the claimable deploy endpoint
- the job is just creating a claimable preview URL
- linked-project, promotion, alias/domain, env-sync, and rollback operations are out of scope
Otherwise prefer the official Vercel CLI / dashboard model described above.
Output format
Return a mode-specific packet instead of a loose command dump.
Minimum structure:
# Vercel Operation Summary
- Mode:
- Project linked:
- Build mode:
- Target environment:
- URL / deployment:
- Verification performed:
- Remaining risk or manual step:
- Routed-out work (if any):Examples
Example 1: Preview deploy with stable alias
User asks: “Deploy this Next.js branch to Vercel and give me a stable preview URL.”
Expected move:
- choose
preview-deployas the primary mode - deploy via the preview packet
- capture the generated deployment URL
- apply or plan a stable alias separately
- return both URLs and any DNS/manual step still needed
Example 2: Promote a verified staged deployment
User asks: “This Vercel build already passed QA. Promote it to production and verify it.”
Expected move:
- choose
promote-previewas the primary mode - verify the exact deployment/commit first
- run the staged-production promote packet
- report production verification after promotion
- mention scope/domain caveats if they apply
Example 3: Vercel env vars not showing up in deploys
User asks: “The variable is in Vercel, but the deployment can’t read it.”
Expected move:
- choose
env-sync - verify the intended environment scope
- confirm whether a new deployment happened after the env change
- use Vercel env inspection/pull as the trusted state check
- call out any app-level canonical URL/config still required
Example 4: Route out generic release design
User asks: “Help me design our staging-to-prod rollout policy and canary rules across providers.”
Expected move:
- do not pretend this is a Vercel-only operation
- route the main job to
deployment-automation - keep only any explicitly Vercel-specific follow-up inside
vercel-deploy
Best practices
1. Pick one primary Vercel mode before giving commands. 2. Prefer linked-project, official CLI/dashboard flows over legacy tarball shortcuts. 3. Treat deploy, promote, alias/domain, env repair, and rollback as distinct operator packets. 4. Always distinguish generated deployment URLs, stable preview aliases, and custom domains. 5. Remember that env-var changes only affect new deployments. 6. Do not oversell vercel promote or rollback as lossless; call out scope/domain/plan/config caveats. 7. Route generic rollout design back to deployment-automation to avoid overlap.
References
{
"skill_name": "vercel-deploy",
"evals": [
{
"id": 1,
"prompt": "Deploy this linked Next.js app to a Vercel preview URL and give me a stable alias for QA.",
"expected_output": "Selects preview-deploy mode, uses Vercel-specific steps, and includes alias handling rather than generic CI advice.",
"assertions": [
"Response identifies preview deployment as the primary mode",
"Response includes a Vercel deployment command path such as `vercel deploy` or `vercel deploy --prebuilt`",
"Response includes stable alias handling such as `vercel alias set`",
"Response does not route the whole task to generic `deployment-automation`"
]
},
{
"id": 2,
"prompt": "This Vercel preview deployment already passed QA. Promote it to production and verify it.",
"expected_output": "Selects promote-preview mode, verifies the target deployment, promotes it, and separates post-promotion verification from the promotion command.",
"assertions": [
"Response identifies preview-to-production promotion as the primary mode",
"Response includes inspection or smoke-test steps before promotion",
"Response includes `vercel promote` or equivalent promotion handling",
"Response includes a production verification step after promotion"
]
},
{
"id": 3,
"prompt": "The env var is visible in the Vercel UI, but the deployment cannot read it. Fix the Vercel side first.",
"expected_output": "Selects env-sync mode, checks environment scoping and redeploy requirements, and uses Vercel-specific verification instead of assuming the UI is correct.",
"assertions": [
"Response identifies environment-variable troubleshooting as the primary mode",
"Response mentions that env-var changes apply to new deployments rather than old ones",
"Response includes a Vercel-specific verification step such as `vercel env ls` or `vercel pull --environment=...`",
"Response distinguishes Vercel env scope from app-level configuration if relevant"
]
},
{
"id": 4,
"prompt": "Our production deploy is broken on Vercel. Roll back safely and tell me what still needs manual verification.",
"expected_output": "Selects rollback-response mode, identifies the rollback target, calls out plan/config caveats, and includes post-rollback verification instead of treating rollback as complete by itself.",
"assertions": [
"Response identifies rollback or production recovery as the primary mode",
"Response mentions stale config, plan eligibility, cron, or similar rollback caveats",
"Response includes post-rollback verification such as health or log checks",
"Response does not present rollback as a lossless or fully sufficient fix by itself"
]
},
{
"id": 5,
"prompt": "Help me design a staging-to-production rollout policy with canary rules across providers, and maybe later we can wire Vercel into it.",
"expected_output": "Routes the main job to deployment-automation instead of pretending this is a Vercel-specific operator task.",
"assertions": [
"Response routes the main planning/policy job to `deployment-automation`",
"Response does not frame Vercel as the sole or primary owner of cross-provider rollout design",
"Response preserves `vercel-deploy` only for any explicitly Vercel-specific follow-up"
]
}
]
}
Vercel Env / Domain / Rollback Troubleshooting
Environment variables
Reliable facts to preserve
- Environment-variable changes apply to new deployments, not previous ones.
- Variables can be scoped to production, preview, development, or custom environments.
- System vars like
VERCEL_ENV,VERCEL_TARGET_ENV, andVERCEL_URLhelp, but app-specific canonical URLs may still need explicit configuration.
Troubleshooting checklist
1. Confirm which environment the variable should target. 2. Confirm a new deployment happened after the variable changed. 3. Use vercel env ls or environment-specific settings as the trusted state check if the UI seems inconsistent. 4. Check whether the app expects a canonical callback/base URL instead of only VERCEL_URL. 5. Report whether the issue is Vercel env scope, app config, or both.
Aliases and domains
Common distinctions
- Generated deployment URL: unique
*.vercel.appdeployment address - Stable preview alias: team-defined URL pointed at the latest preview deployment
- Custom domain: production-facing or long-lived host name requiring domain ownership / DNS correctness
Troubleshooting checklist
1. Confirm whether the target is preview-only or production-facing. 2. Confirm whether the alias/domain should move with each deployment or stay on production only. 3. Report DNS/manual verification steps separately from Vercel CLI success. 4. If alias errors appear, keep the deployment URL available as fallback evidence.
Rollback
Caveats from Vercel docs
- rollback restores a previous deployment state; it is not a magical patch of the current one
- environment/config may be stale relative to current project settings
- cron-job state can revert with the rolled-back deployment
- rollback eligibility differs by plan
Rollback checklist
1. Identify the currently bad production deployment. 2. Identify the target rollback deployment. 3. State stale-config caveats before calling rollback complete. 4. Re-check logs/health on production after rollback. 5. Record any follow-up needed (reapply env changes, re-run migrations, review cron config, etc.).
Vercel Deploy Modes and Boundaries
Primary modes
1. preview-deploy
Use when the main deliverable is a testable preview deployment URL on Vercel.
Signals:
- "Deploy this branch"
- "Give me a preview URL"
- "Create a PR/demo deployment"
Typical commands:
vercel linkvercel pull --yes --environment=previewvercel deployvercel deploy --prebuiltvercel inspect <deployment-url>
2. production-deploy
Use when the user explicitly wants a fresh production deployment on Vercel.
Signals:
- "Deploy this to Vercel production"
- "Ship this live on Vercel now"
Typical commands:
vercel pull --yes --environment=productionvercel deploy --prodvercel build --prod && vercel deploy --prebuilt --prod
3. promote-preview
Use when a preview deployment already exists and the job is to promote that exact deployment after verification.
Signals:
- "Promote this preview to production"
- "This preview is good — make it prod"
Typical commands:
vercel list --environment previewvercel inspect <deployment-url>vercel curl /api/health --deployment <deployment-url>vercel logs --deployment <deployment-url> --level error --limit 50vercel promote <deployment-url> --yes
4. alias-domain
Use when the stable URL is the actual goal.
Signals:
- "Give this preview a stable URL"
- "Attach this custom domain"
- "Alias the deployment"
Typical commands:
vercel alias set <deployment-url> <alias>- domain/dashboard verification steps
5. env-sync
Use when the deployment behavior differs because variables are missing, stale, or scoped to the wrong environment.
Signals:
- "The variable is in Vercel but not in the deployment"
- "Preview has the wrong config"
- "Production picked up the wrong env"
Typical commands:
vercel env lsvercel pull --yes --environment=previewvercel pull --yes --environment=production
6. rollback-response
Use when a bad production deployment must revert quickly.
Signals:
- "Roll back the broken deploy"
- "Restore the previous production build"
Typical inputs:
- current broken deployment
- target rollback deployment
- env/config caveats
- post-rollback verification plan
Boundary rules
| Topic | Owner |
|---|---|
| Cross-provider rollout strategy, staging/prod policy, canary decisions | deployment-automation |
| CI/CD workflow authoring around Vercel commands | workflow-automation |
| Machine bootstrap, CLI install, auth setup | system-environment-setup |
| Broken app/framework/build before deploy works | debugging or framework skill |
| Ongoing observability and alerts after deploy | monitoring-observability |
| Vercel-specific preview/prod/env/domain/rollback operations | vercel-deploy |
Legacy helper note
The bundled scripts/deploy.sh is a legacy claimable-preview helper. Treat it as an environment-specific shortcut, not the default Vercel operating model.
Preview / Production Command Packets
Use these packets as starting points. Adjust only after checking linked-project state, target environment, and verification depth.
Preview deploy packet
# Link once per repo if needed
vercel link
# Pull preview config/env metadata when using CLI-based builds
vercel pull --yes --environment=preview
# Source-based preview deploy
vercel deploy
# Or prebuilt preview deploy
vercel build
vercel deploy --prebuilt
# Inspect and verify
vercel inspect <deployment-url>
vercel logs --deployment <deployment-url> --level error --limit 50Preview packet reminders:
- Capture the deployment URL from stdout and report it back.
- If the user needs a stable URL, continue into alias/domain handling instead of hiding it inside the deploy step.
Stable preview alias packet
url="$(vercel deploy --prebuilt)"
vercel alias set "$url" preview.example.comAlias reminders:
- Keep the raw deployment URL in the report as fallback evidence.
- Say whether the alias is preview-only or intended to become production-facing later.
Staged production + promote packet
# Prepare production config without switching traffic yet
vercel pull --yes --environment=production
vercel build --prod
url="$(vercel deploy --prebuilt --prod --skip-domain)"
# Verify the staged deployment before cutover
vercel inspect "$url"
vercel logs --deployment "$url" --level error --limit 50
vercel curl /api/health --deployment "$url"
# Promote after verification
vercel promote "$url" --yes
vercel promote status
vercel logs --environment production --level error --since 5mPromotion reminders:
- Verify the exact deployment URL/commit before promoting.
- In team-scoped setups, be ready to add
--scope <team>if promotion auth/team context is ambiguous. - Treat post-promote health/log checks as a separate required step.
Direct production deploy packet
vercel pull --yes --environment=production
vercel deploy --prod
# or, for prebuilt flows
vercel build --prod
vercel deploy --prebuilt --prodProduction packet reminders:
- State whether the deploy was source-build or prebuilt.
- Report the production URL/domain reached, not just command success.
Packet review questions
Before finalizing a response, answer: 1. Did I clearly say whether this was preview, direct production, or staged promote? 2. Did I verify the exact deployment before promoting or aliasing it? 3. Did I report the resulting URL/domain instead of only listing commands? 4. Did I call out any team-scope, DNS, or manual verification caveat that still remains? 5. Did I route generic release-policy work to deployment-automation if it appeared?
#!/bin/bash
# Vercel Deployment Script (via claimable deploy endpoint)
# Usage: ./deploy.sh [project-path]
# Returns: JSON with previewUrl, claimUrl, deploymentId, projectId
set -e
DEPLOY_ENDPOINT="https://claude-skills-deploy.vercel.com/api/deploy"
# Detect framework from package.json
detect_framework() {
local pkg_json="$1"
if [ ! -f "$pkg_json" ]; then
echo "null"
return
fi
local content=$(cat "$pkg_json")
# Helper to check if a package exists in dependencies or devDependencies
has_dep() {
echo "$content" | grep -q "\"$1\""
}
# Order matters - check more specific frameworks first
# Blitz
if has_dep "blitz"; then echo "blitzjs"; return; fi
# Next.js
if has_dep "next"; then echo "nextjs"; return; fi
# Gatsby
if has_dep "gatsby"; then echo "gatsby"; return; fi
# Remix
if has_dep "@remix-run/"; then echo "remix"; return; fi
# React Router (v7 framework mode)
if has_dep "@react-router/"; then echo "react-router"; return; fi
# TanStack Start
if has_dep "@tanstack/start"; then echo "tanstack-start"; return; fi
# Astro
if has_dep "astro"; then echo "astro"; return; fi
# Hydrogen (Shopify)
if has_dep "@shopify/hydrogen"; then echo "hydrogen"; return; fi
# SvelteKit
if has_dep "@sveltejs/kit"; then echo "sveltekit-1"; return; fi
# Svelte (standalone)
if has_dep "svelte"; then echo "svelte"; return; fi
# Nuxt
if has_dep "nuxt"; then echo "nuxtjs"; return; fi
# Vue with Vitepress
if has_dep "vitepress"; then echo "vitepress"; return; fi
# Vue with Vuepress
if has_dep "vuepress"; then echo "vuepress"; return; fi
# Gridsome
if has_dep "gridsome"; then echo "gridsome"; return; fi
# SolidStart
if has_dep "@solidjs/start"; then echo "solidstart-1"; return; fi
# Docusaurus
if has_dep "@docusaurus/core"; then echo "docusaurus-2"; return; fi
# RedwoodJS
if has_dep "@redwoodjs/"; then echo "redwoodjs"; return; fi
# Hexo
if has_dep "hexo"; then echo "hexo"; return; fi
# Eleventy
if has_dep "@11ty/eleventy"; then echo "eleventy"; return; fi
# Angular / Ionic Angular
if has_dep "@ionic/angular"; then echo "ionic-angular"; return; fi
if has_dep "@angular/core"; then echo "angular"; return; fi
# Ionic React
if has_dep "@ionic/react"; then echo "ionic-react"; return; fi
# Create React App
if has_dep "react-scripts"; then echo "create-react-app"; return; fi
# Ember
if has_dep "ember-cli" || has_dep "ember-source"; then echo "ember"; return; fi
# Dojo
if has_dep "@dojo/framework"; then echo "dojo"; return; fi
# Polymer
if has_dep "@polymer/"; then echo "polymer"; return; fi
# Preact
if has_dep "preact"; then echo "preact"; return; fi
# Stencil
if has_dep "@stencil/core"; then echo "stencil"; return; fi
# UmiJS
if has_dep "umi"; then echo "umijs"; return; fi
# Sapper (legacy Svelte)
if has_dep "sapper"; then echo "sapper"; return; fi
# Saber
if has_dep "saber"; then echo "saber"; return; fi
# Sanity
if has_dep "sanity"; then echo "sanity-v3"; return; fi
if has_dep "@sanity/"; then echo "sanity"; return; fi
# Storybook
if has_dep "@storybook/"; then echo "storybook"; return; fi
# NestJS
if has_dep "@nestjs/core"; then echo "nestjs"; return; fi
# Elysia
if has_dep "elysia"; then echo "elysia"; return; fi
# Hono
if has_dep "hono"; then echo "hono"; return; fi
# Fastify
if has_dep "fastify"; then echo "fastify"; return; fi
# h3
if has_dep "h3"; then echo "h3"; return; fi
# Nitro
if has_dep "nitropack"; then echo "nitro"; return; fi
# Express
if has_dep "express"; then echo "express"; return; fi
# Vite (generic - check last among JS frameworks)
if has_dep "vite"; then echo "vite"; return; fi
# Parcel
if has_dep "parcel"; then echo "parcel"; return; fi
# No framework detected
echo "null"
}
# Parse arguments
INPUT_PATH="${1:-.}"
# Create temp directory for packaging
TEMP_DIR=$(mktemp -d)
TARBALL="$TEMP_DIR/project.tgz"
CLEANUP_TEMP=true
cleanup() {
if [ "$CLEANUP_TEMP" = true ]; then
rm -rf "$TEMP_DIR"
fi
}
trap cleanup EXIT
echo "Preparing deployment..." >&2
# Check if input is a .tgz file or a directory
FRAMEWORK="null"
if [ -f "$INPUT_PATH" ] && [[ "$INPUT_PATH" == *.tgz ]]; then
# Input is already a tarball, use it directly
echo "Using provided tarball..." >&2
TARBALL="$INPUT_PATH"
CLEANUP_TEMP=false
# Can't detect framework from tarball, leave as null
elif [ -d "$INPUT_PATH" ]; then
# Input is a directory, need to tar it
PROJECT_PATH=$(cd "$INPUT_PATH" && pwd)
# Detect framework from package.json
FRAMEWORK=$(detect_framework "$PROJECT_PATH/package.json")
# Check if this is a static HTML project (no package.json)
if [ ! -f "$PROJECT_PATH/package.json" ]; then
# Find HTML files in root
HTML_FILES=$(find "$PROJECT_PATH" -maxdepth 1 -name "*.html" -type f)
HTML_COUNT=$(echo "$HTML_FILES" | grep -c . || echo 0)
# If there's exactly one HTML file and it's not index.html, rename it
if [ "$HTML_COUNT" -eq 1 ]; then
HTML_FILE=$(echo "$HTML_FILES" | head -1)
BASENAME=$(basename "$HTML_FILE")
if [ "$BASENAME" != "index.html" ]; then
echo "Renaming $BASENAME to index.html..." >&2
mv "$HTML_FILE" "$PROJECT_PATH/index.html"
fi
fi
fi
# Create tarball of the project (excluding node_modules and .git)
echo "Creating deployment package..." >&2
tar -czf "$TARBALL" -C "$PROJECT_PATH" --exclude='node_modules' --exclude='.git' .
else
echo "Error: Input must be a directory or a .tgz file" >&2
exit 1
fi
if [ "$FRAMEWORK" != "null" ]; then
echo "Detected framework: $FRAMEWORK" >&2
fi
# Deploy
echo "Deploying..." >&2
RESPONSE=$(curl -s -X POST "$DEPLOY_ENDPOINT" -F "file=@$TARBALL" -F "framework=$FRAMEWORK")
# Check for error in response
if echo "$RESPONSE" | grep -q '"error"'; then
ERROR_MSG=$(echo "$RESPONSE" | grep -o '"error":"[^"]*"' | cut -d'"' -f4)
echo "Error: $ERROR_MSG" >&2
exit 1
fi
# Extract URLs from response
PREVIEW_URL=$(echo "$RESPONSE" | grep -o '"previewUrl":"[^"]*"' | cut -d'"' -f4)
CLAIM_URL=$(echo "$RESPONSE" | grep -o '"claimUrl":"[^"]*"' | cut -d'"' -f4)
if [ -z "$PREVIEW_URL" ]; then
echo "Error: Could not extract preview URL from response" >&2
echo "$RESPONSE" >&2
exit 1
fi
echo "" >&2
echo "Deployment successful!" >&2
echo "" >&2
echo "Preview URL: $PREVIEW_URL" >&2
echo "Claim URL: $CLAIM_URL" >&2
echo "" >&2
# Output JSON for programmatic use
echo "$RESPONSE"
N:vercel-deploy
D:Run Vercel-specific deployment operations for linked web/fullstack projects: preview deploys, direct production deploys, staged deploy + promote flows, aliases/domains, env-scope fixes, and rollback response. Use when the provider is already Vercel and the job is to get a preview URL, promote a verified deployment, attach a stable alias/domain, fix Vercel env drift, or roll back production safely.
G:vercel|deployment|preview|production|promote|alias|domains|environment-variables|rollback
U[4]:
Preview deploy — when asked "Deploy this branch to a Vercel preview"
Production cutover — when asked "Ship this on Vercel now" or "Promote this staged Vercel deploy"
URL/domain ops — when asked "Give this Vercel deploy a stable URL" or "Attach the custom domain"
Env/rollback repair — when asked "The Vercel env is wrong" or "Roll back the broken Vercel deploy"
S[3]{n,action,details}:
1,Classify Packet,Choose one primary mode: preview-deploy / production-deploy / promote-preview / alias-domain / env-sync / rollback-response
2,Pull Truthful State,Confirm linked-project state, target environment, build mode, URL goal, and verification depth before commands
3,Execute + Report,Use the matching command/reference packet and return a Vercel operation summary with URL, verification, and remaining risk
R[4]:
Route generic rollout strategy to deployment-automation
Route CI/workflow authoring to workflow-automation
Treat env changes as applying to new deployments, not old ones
Do not treat promote/rollback as lossless; report manual caveats and verification
E[3]{desc,in,out}:
"Preview deploy with stable alias","Deploy this linked Next.js app to a Vercel preview URL and give me a stable alias for QA.","Selects preview-deploy, uses Vercel deploy plus alias handling, and returns generated + stable URLs"
"Promote verified deployment","This Vercel preview already passed QA. Promote it to production and verify it.","Selects promote-preview, verifies the exact deployment, runs vercel promote, and reports post-promotion checks"
"Route out rollout policy","Help me design a staging-to-production rollout policy with canary rules across providers.","Routes the main job to deployment-automation and keeps only Vercel-specific follow-up here"
Related skills
FAQ
What are the deploy modes?
preview-deploy, production-deploy, promote-preview, alias-domain, env-sync, and rollback-response.
When should you not use it?
For generic rollout strategy, CI YAML authoring, local Vercel CLI install/auth, or a broken build.