Labsco
vercel-labs logo

deploy-to-vercel

β˜… 28,600

by vercel Β· part of vercel-labs/agent-skills

Deploy applications and websites to Vercel with automatic git integration and preview URLs. Supports three deployment paths: git-push (ideal for linked projects), direct CLI deployment, and no-auth fallback for sandboxed environments Automatically detects project state (linked via .vercel/project.json or .vercel/repo.json , git remote presence, CLI authentication) and chooses the best deployment method Handles team selection for multi-team accounts and uses --scope to deploy to the correct...

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup
🧩 One of 7 skills in the vercel-labs/agent-skills package β€” works on its own, and pairs well with its siblings.

Deploy applications and websites to Vercel with automatic git integration and preview URLs. Supports three deployment paths: git-push (ideal for linked projects), direct CLI deployment, and no-auth fallback for sandboxed environments Automatically detects project state (linked via .vercel/project.json or .vercel/repo.json , git remote presence, CLI authentication) and chooses the best deployment method Handles team selection for multi-team accounts and uses --scope to deploy to the correct...

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates β€” shown here so you can audit it before installing. You don't need to read it to use the skill.

by vercel

Deploy applications and websites to Vercel with automatic git integration and preview URLs. Supports three deployment paths: git-push (ideal for linked projects), direct CLI deployment, and no-auth fallback for sandboxed environments Automatically detects project state (linked via .vercel/project.json or .vercel/repo.json , git remote presence, CLI authentication) and chooses the best deployment method Handles team selection for multi-team accounts and uses --scope to deploy to the correct... npx skills add https://github.com/vercel-labs/agent-skills --skill deploy-to-vercel Download ZIPGitHub28.6k

Step 1: Gather Project State

Run all four checks before deciding which method to use:

Copy & paste β€” that's it
# 1. Check for a git remote
git remote get-url origin 2>/dev/null

# 2. Check if locally linked to a Vercel project (either file means linked)
cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null

# 3. Check if the Vercel CLI is installed and authenticated
vercel whoami 2>/dev/null

# 4. List available teams (if authenticated)
vercel teams list --format json 2>/dev/null

Team selection

If the user belongs to multiple teams, present all available team slugs as a bulleted list and ask which one to deploy to. Once the user picks a team, proceed immediately to the next step β€” do not ask for additional confirmation.

Pass the team slug via --scope on all subsequent CLI commands (vercel deploy, vercel link, vercel inspect, etc.):

Copy & paste β€” that's it
vercel deploy [path] -y --no-wait --scope 

If the project is already linked (.vercel/project.json or .vercel/repo.json exists), the orgId in those files determines the team β€” no need to ask again. If there is only one team (or just a personal account), skip the prompt and use it directly.

About the .vercel/ directory: A linked project has either:

  • .vercel/project.json β€” created by vercel link (single project linking). Contains projectId and orgId.

  • .vercel/repo.json β€” created by vercel link --repo (repo-based linking). Contains orgId, remoteName, and a projects array mapping directories to Vercel project IDs.

Either file means the project is linked. Check for both.

Do NOT use vercel project inspect, vercel ls, or vercel link to detect state in an unlinked directory β€” without a .vercel/ config, they will interactively prompt (or with --yes, silently link as a side-effect). Only vercel whoami is safe to run anywhere.

Agent-Specific Notes

Claude Code / terminal-based agents

You have full shell access. Do NOT use the /mnt/skills/ path. Follow the decision flow above using the CLI directly.

For the no-auth fallback, run the deploy script from the skill's installed location:

Copy & paste β€” that's it
bash ~/.claude/skills/deploy-to-vercel/resources/deploy.sh [path]

The path may vary depending on where the user installed the skill.

Sandboxed environments (claude.ai)

You likely cannot run vercel login or git push. Go directly to the no-auth fallback β€” claude.ai sandbox.

Codex

Codex runs in a sandbox. Check if the CLI is available first, then fall back to the deploy script. Go to the no-auth fallback β€” Codex sandbox.

Output

Always show the user the deployment URL.

  • Git push: Use vercel ls --format json to find the preview URL. If the CLI isn't authenticated, tell the user to check the Vercel dashboard or commit status checks.

  • CLI deploy: Show the URL returned by vercel deploy --no-wait. Use vercel inspect <url> to check build status and report it to the user.

  • No-auth fallback: Show both the preview URL and the claim URL:

Copy & paste β€” that's it
Deployment successful!

Preview URL: https://my-app-abc123.vercel.app
Claim URL: https://vercel.com/claim-deployment?code=...

View your site at the Preview URL.
To transfer this deployment to your Vercel account, visit the Claim URL.

Do not curl or fetch the deployed URL to verify it works. Just return the link.