vercel-deploy
Deploy a project to Vercel safely. Preview versus production, project linking, vercel CLI and Git-based flows, promote, rollback. Never deploys without the user's explicit approval. Use for any request to deploy, ship, publish, promote or roll back on Vercel.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 5
- Forks
- 2
01 前言 Front Matter
- name
- vercel-deploy
- description
- Deploy a project to Vercel safely. Preview versus production, project linking, vercel CLI and Git-based flows, promote, rollback. Never deploys without the user's explicit approval. Use for any request to deploy, ship, publish, promote or roll back on Vercel.
03 SKILL.md 正文
Vercel: deploy with approval
Hard rule. Never run a command from the "needs approval" list until the user has, in this conversation, said yes to that specific action after you showed them the command, the team and project it targets, whether it is a preview or production deployment, and what it changes. An earlier yes does not cover a later, different command.
Pushing a commit is a deploy when the project has Git integration: a push to the
production branch (usually main) creates a production deployment, and a push
to any other branch creates a preview. Treat git push, merging a pull request
and vercel --prod the same way.
Preview versus production
| Preview | Production | |
|---|---|---|
| Created by | vercel, vercel deploy, push to a non-production branch, a PR |
vercel --prod, vercel deploy --target=production, push to the production branch, promoting a deployment |
| URL | unique per deployment (and a branch URL) | your production domains |
| Env vars | Preview environment (optionally per branch) | Production environment |
| Risk | low, but may still run build hooks and write to shared services | real users, real data |
The first deployment of a brand-new project is always production, even if
you omit --prod. So vercel run in a directory that is not yet linked to a
project can create the project and make a production deployment. Check for
.vercel/project.json first (the /vercel-preflight command reports it); if it
is absent, say so and ask before linking or creating anything. Never use
--yes to skip the project-setup questions without approval; it answers them
with guessed defaults.
Custom environments (for example staging) are targeted with
vercel deploy --target=staging.
Commands by risk
Safe without approval (local or read-only):
vercel --version,vercel whoami,vercel list,vercel inspect <url>vercel logs ...(read-only; seevercel-logs-debug)vercel deploy --dry(CLI 59.x: reports the detected framework preset and the files that would be uploaded, without creating a deployment; it needs the user to be logged in, and you should confirm withvercel deploy --helpon their version)vercel build(builds locally into.vercel/output; needsvercel pullfirst)vercel env ls(names and types, not values);vercel env run -- <cmd>with the default Development values (production or preview values go to the command's process, so ask first)/vercel-preflight
Needs approval (changes the account, creates a deployment, or writes secrets):
vercel,vercel deploy(preview),vercel --prod(shorthand for--target=production),vercel deploy --prebuilt, andvercel deploy --temporary(uploads the source to a temporary public deployment without a login)vercel link,vercel project add|rm,vercel git connectvercel promote,vercel rollback,vercel redeploy,vercel removevercel env add|update|rm, andvercel env pull/vercel pull(they write environment values to files on disk; usevercel env runwhen you only need them for one command)vercel domains ...,vercel alias ...,vercel dns ...,vercel certs ...vercel loginand anything that opens a browser OAuth flow: the user does thisgit push/ opening or merging a PR on a Vercel-connected repository- Vercel MCP tools that deploy, change settings, or buy anything
Never ask for a Vercel token in chat and never print one. Authentication is the
user's vercel login or a VERCEL_TOKEN they export themselves. A Vercel
command run without credentials may start a browser login flow instead of
failing; if you see "No existing credentials found", stop and tell the user to
run vercel login. Do not drive the login yourself.
Agent-run CLIs are non-interactive by default (--non-interactive), so prompts
fail instead of waiting. Do not "fix" that by adding --yes; ask the user.
Workflow
- Preflight. Run
/vercel-preflight. Fix errors; explain warnings. - Identify the target.
vercel whoami, then read.vercel/project.json(project name and org) or the Git remote. State team, project and branch. If the team is ambiguous, ask. - Build and test locally with the project's own commands. To reproduce
Vercel's build:
vercel pull --environment=previewthenvercel build(--environment=productionandvercel build --prodfor production settings). Pulling writes env files under.vercel/; keep them gitignored. - Choose preview first. Even for a production release, deploy a preview, verify it, then promote or merge. Say that in the plan.
- Ask. Present a short plan:
- exact command, team/project, environment (preview, production, custom)
- what changes: new deployment, domains, env vars, build cache (
--force) - how you will verify, and how to roll back Then stop and wait for an explicit yes.
- Run only the approved command.
vercelprints the deployment URL on stdout; use--logsif you need build logs,--no-waitonly if asked. - Verify.
vercel inspect <url>for status. Request the URL withcurl -sS -o /dev/null -w "%{http_code}\n" <url>. A preview behind Deployment Protection answers 401 or redirects to login: that is expected. Do not disable protection or generate bypass links; ask the user to open it signed in, or to use the documentedvercel curlhelper themselves. - Report the deployment URL and ID from the command output. If it failed,
show the error text, run
vercel inspect <url> --logs, and only then propose a fix.
Promote and rollback
vercel promote <deployment-url-or-id>makes an existing deployment the current production deployment (promoting a preview creates a production deployment and asks for confirmation;--yesbypasses it, so do not add it without approval).vercel promote statusshows pending promotions.vercel rollback [deployment-url-or-id]points production back at an earlier deployment. On the Hobby plan only the previous production deployment is eligible.vercel rollback statusshows pending rollbacks. To undo a rollback,vercel promotea deployment.- A rollback restores code and its build-time configuration, not data. Database changes made by the bad release are not reverted.
Prebuilt deploys
vercel build followed by vercel deploy --prebuilt (optionally
--archive=tgz for thousands of files) deploys local build output. System
environment variables such as VERCEL_ENV are missing at build time then, so
use Git-based or plain vercel deploys if the build reads them.
If the user did not approve
Say what was done (preflight, local build), what was not, and the exact command they can run or approve. Do not deploy "to see if it works".
04 同仓库更多 Skills
xlsx
Create/edit/analyze/verify spreadsheet workbooks including XLSX/CSV/TSV.
webapp-testing
Start/reuse a local app, wait for readiness, inspect rendered state/console/network, act from observed selectors, and verify with evidence.
verify
Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.
tts
暂无简介
test
Detect the project’s test stack, run the narrowest useful tests, create tests when authorized, and report coverage/gaps honestly.
spreadsheets
Compatibility alias for the xlsx skill. Prefer loading xlsx.