Vercel platform CLI for frontend deployments, serverless functions, and edge network management. Use for deploying applications, managing domains, environment variables, and debugging deployments.
Executes Vercel CLI commands for deploying frontend apps, managing domains, and environment variables. Used when `vercel.json` is detected or user requests Vercel deployments.
/plugin marketplace add FortiumPartners/ensemble/plugin install ensemble-infrastructure@ensembleThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdREFERENCE.mdexamples/ci-cd.example.yamlPurpose: Fast reference for Vercel CLI operations | Target: <500 lines
What is Vercel: Frontend cloud platform with automatic CI/CD, serverless functions, edge network, and global CDN. Optimized for Next.js, React, Vue, and other frameworks.
When to Use:
Auto-Detection Triggers:
vercel.json in project root.vercel directory presentVERCEL_TOKEN in .env fileProgressive Disclosure:
Vercel CLI can hang Claude Code. Always use flags to bypass prompts:
| Command | WRONG | CORRECT |
|---|---|---|
| Deploy | vercel | vercel --yes --token $VERCEL_TOKEN |
| Link | vercel link | vercel link --yes --project <name> |
| Pull env | vercel pull | vercel pull --yes --environment production |
| Add env | vercel env add | vercel env add NAME production < value.txt |
| Remove | vercel env rm NAME | vercel env rm NAME --yes |
Required flags: --yes, --token <TOKEN>, explicit names, --no-wait
Never use: vercel login, vercel dev, commands without --yes when modifying
# Check CLI
vercel --version # Expects: 30.x.x+
# Install
npm i -g vercel
| Token Type | Scope | Use Case |
|---|---|---|
| Personal | Full account | CI/CD, automation |
| Team | Team-scoped | Team deployments |
| Project | Project-scoped | Limited access |
# Set token from .env
export VERCEL_TOKEN="$(grep VERCEL_TOKEN .env | cut -d= -f2)"
vercel --token $VERCEL_TOKEN whoami
Link to project --> vercel link --yes --project <name>
List projects --> vercel project ls
Create project --> vercel project add <name>
Remove project --> vercel project rm <name> --yes
Current user --> vercel whoami
Switch teams --> vercel switch <team-slug>
Deploy preview --> vercel --yes
Deploy production --> vercel --prod --yes
Staged production --> vercel --prod --skip-domain --yes
Promote staged --> vercel promote <url> --yes
Redeploy existing --> vercel redeploy <url> --no-wait
Rollback --> vercel rollback <url>
List deployments --> vercel list [project]
Inspect deployment --> vercel inspect <url>
Remove deployment --> vercel remove <url> --yes
List vars --> vercel env ls [environment]
Add var --> echo "value" | vercel env add NAME production
Add from file --> vercel env add NAME production < secret.txt
Remove var --> vercel env rm NAME --yes
Pull to .env --> vercel pull --yes --environment production
List domains --> vercel domains ls
Add domain --> vercel domains add <domain> [project]
Force add --> vercel domains add <domain> <project> --force
Remove domain --> vercel domains rm <domain> --yes
Inspect domain --> vercel domains inspect <domain>
View logs --> vercel logs <deployment-url>
Logs as JSON --> vercel logs <url> --json
Inspect details --> vercel inspect <url>
HTTP status --> vercel httpstat <url>
For DNS, certificates, and advanced operations, see REFERENCE.md
| Command | Description | Example |
|---|---|---|
vercel | Deploy preview | vercel --yes |
vercel --prod | Deploy production | vercel --prod --yes |
vercel link | Link to project | vercel link --yes --project myapp |
vercel project ls | List projects | vercel project ls --json |
vercel list | List deployments | vercel list --json |
vercel logs | View logs | vercel logs <url> |
vercel inspect | Deployment details | vercel inspect <url> |
| Command | Description | Example |
|---|---|---|
vercel env ls | List variables | vercel env ls production |
vercel env add | Add variable | echo "val" | vercel env add KEY prod |
vercel env rm | Remove variable | vercel env rm KEY --yes |
vercel pull | Pull env + settings | vercel pull --yes --environment prod |
| Command | Description | Example |
|---|---|---|
vercel domains ls | List domains | vercel domains ls |
vercel domains add | Add domain | vercel domains add api.example.com myapp |
vercel domains rm | Remove domain | vercel domains rm api.example.com --yes |
| Code | Location | AWS Region |
|---|---|---|
iad1 | Washington DC (default) | us-east-1 |
sfo1 | San Francisco | us-west-1 |
fra1 | Frankfurt | eu-central-1 |
lhr1 | London | eu-west-2 |
hnd1 | Tokyo | ap-northeast-1 |
sin1 | Singapore | ap-southeast-1 |
syd1 | Sydney | ap-southeast-2 |
Full 19-region list in REFERENCE.md
| Environment | Use Case |
|---|---|
production | Main branch deployments |
preview | PR/branch previews |
development | Local dev (vercel dev) |
| Variable | Description |
|---|---|
VERCEL | Always 1 on Vercel |
VERCEL_ENV | production, preview, development |
VERCEL_URL | Deployment URL (no protocol) |
VERCEL_REGION | Region code (e.g., iad1) |
VERCEL_GIT_COMMIT_SHA | Git commit SHA |
vercel link --yes --project myapp
vercel pull --yes --environment development
vercel --yes # Preview
vercel --prod --yes # Production
vercel --prod --skip-domain --yes > staged-url.txt
# Test the staged deployment
vercel promote $(cat staged-url.txt) --yes
vercel env ls production
echo "secret" | vercel env add API_KEY production
vercel env rm OLD_KEY --yes
vercel logs <deployment-url>
vercel logs <url> --json | jq '.message'
vercel inspect <url>
vercel rollback <deployment-url>
Advanced workflows (CI/CD, blue-green, canary) in REFERENCE.md
| Error | Cause | Resolution |
|---|---|---|
command not found: vercel | Not installed | npm i -g vercel |
Not authorized | Invalid token | Check VERCEL_TOKEN |
Project not found | Wrong name | vercel project ls |
No project linked | Not linked | vercel link --yes --project <name> |
Domain already in use | On other project | Use --force |
Deployment failed | Build error | Check vercel logs |
vercel whoami # Verify auth
vercel --token $VERCEL_TOKEN whoami # Check token
vercel logs <url> # View errors
vercel inspect <url> # Deployment details
Deep troubleshooting in REFERENCE.md
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"framework": "nextjs",
"regions": ["iad1", "sfo1"]
}
{
"framework": "vite",
"buildCommand": "npm run build",
"outputDirectory": "dist"
}
More frameworks in REFERENCE.md
vercel.json or .vercel directoryVERCEL_TOKEN in .envHigh-confidence:
- "Deploy to Vercel"
- "vercel deploy", "Vercel logs"
- "Add domain to Vercel"
Medium-confidence:
- "Deploy frontend"
- "Next.js deployment"
Provide: vercel logs output, vercel inspect output, vercel.json
# Auth
export VERCEL_TOKEN="xxx"
vercel --token $VERCEL_TOKEN whoami
# Project
vercel link --yes --project myapp
vercel project ls
vercel project rm myapp --yes
# Deploy
vercel --yes # Preview
vercel --prod --yes # Production
vercel promote <url> --yes # Promote
# Rollback
vercel rollback <url>
# Env Vars
vercel env ls production
echo "value" | vercel env add KEY production
vercel env rm KEY --yes
vercel pull --yes --environment production
# Domains
vercel domains ls
vercel domains add api.example.com myapp
vercel domains rm api.example.com --yes
# Debug
vercel logs <url>
vercel inspect <url>
vercel list --json
See Also: REFERENCE.md for CI/CD integration, multi-region config, security, cost optimization
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.