Deploy to Vercel
A structured decision flow for deploying applications to Vercel. Core principle: always deploy as preview (not production) unless the user explicitly asks for production.
Initial Setup: Gather Project State
Before choosing a deployment method, run these four checks:
git remote get-url origin 2>/dev/null
cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null
vercel whoami 2>/dev/null
vercel teams list --format json 2>/dev/null
Team Selection: When users belong to multiple teams, present available team slugs as a list and ask which to deploy to. Pass the team via --scope <team-slug> on subsequent commands.
Deployment Methods
Choose based on project state:
1. Linked Project + Git Remote → Git Push (Ideal)
git add . && git commit -m "deploy: <description>"
git push
vercel ls --format json # to retrieve preview URL
Ask explicit permission before pushing: "This project is connected to Vercel via git. I can commit and push to trigger a deployment. Proceed?"
2. Linked Project + No Git Remote → Direct CLI Deploy
vercel deploy [path] -y --no-wait
vercel inspect <deployment-url>
For production (only if explicitly requested):
vercel deploy [path] --prod -y --no-wait
3. Not Linked + CLI Authenticated → Link First, Then Deploy
vercel link --repo --scope <team-slug>
# or
vercel link --scope <team-slug>
vercel deploy -y --no-wait
4. CLI Not Installed/Authenticated → Install, Auth, Link, Deploy
npm install -g vercel
vercel login
vercel link --repo --scope <team-slug>
vercel deploy -y --no-wait --scope <team-slug>
No-Auth Fallback
For sandboxed environments (claude.ai, Codex) where authentication isn't possible:
bash /mnt/skills/user/deploy-to-vercel/resources/deploy.sh [path]
The script auto-detects frameworks, packages projects, and returns:
- Preview URL: Live deployed site
- Claim URL: Transfer deployment to user's Vercel account
Tell users: "Your deployment is ready at [previewUrl]. Claim it at [claimUrl] to manage your deployment."
Output Requirements
Always display the deployment URL to users. For builds, use vercel inspect <url> to check status and report results. Do not curl/fetch the deployed URL to verify functionality.
Key Agent Notes
- Terminal-based agents: Use the CLI directly; don't reference
/mnt/skills/paths - Sandboxed (claude.ai): Go directly to no-auth fallback; network access may be restricted
- Codex: Try CLI first; escalate network access only for actual deploy commands
Installation
npx skills add https://github.com/vercel-labs/agent-skills --skill deploy-to-vercel
Mirrored from https://github.com/vercel-labs/agent-skills — original author: vercel-labs, license: MIT. This is an unclaimed mirror. Content and ownership transfer to the author when they claim this account.