‹ 首页

vercel-cli

@nanocoai · 收录于 3 周前 · 上游提交 2 天前

Deploy apps to Vercel. Use when asked to deploy, ship, or publish a web application, or manage Vercel projects, domains, and environment variables.

适合你,如果经常需要将前端应用部署到 Vercel 平台

/ 下载安装
vercel-cli.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add nanocoai/nanoclaw/vercel-cli
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- nanocoai/nanoclaw/vercel-cli
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify nanocoai/nanoclaw/vercel-cli
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
30380GitHub stars
~883上下文体积 · 单文件
镜像托管

怎么用

商店整理自技能原文 · 版本 879835b · 表述以原文为准
它做什么

安装后,Claude 能用 Vercel 的命令行工具部署 Web 应用到生产或预览环境,管理项目、域名和环境变量。部署前后会自动检查构建是否通过、部署是否成功、URL 是否可访问,确认无误后才通知你。

什么时候触发

当你要求部署、发布或托管一个 Web 应用,或者要管理 Vercel 的项目、域名、环境变量时触发。

装好后可以这样说
Claude 会运行部署命令并验证成功
Claude 会运行 vercel project ls
Claude 会运行 vercel domains add
技能原文 SKILL.md作者撰写 · MIT · 879835b

Vercel CLI

You can deploy web applications to Vercel using the vercel CLI.

Auth

Auth is handled by OneCLI — the HTTPS_PROXY injects the real token into API requests automatically. The Vercel CLI requires a token to be present to skip its local credential check, so always pass --token placeholder on every command. OneCLI replaces this with the real token at the proxy level.

Before any Vercel operation, verify auth:

vercel whoami --token placeholder

If this fails with an auth error, ask the user to add a Vercel token to OneCLI. They can create one at https://vercel.com/account/tokens and register it via onecli secrets create on the host. Once added, retry vercel whoami.

Deploying

Always use --yes to skip interactive prompts and --token placeholder for auth (OneCLI replaces with real token).

# Deploy to production
vercel deploy --yes --prod --token placeholder

# Deploy from a specific directory
vercel deploy --yes --prod --token placeholder --cwd /path/to/project

# Preview deployment (not production)
vercel deploy --yes --token placeholder

After deploying, verify the live URL:

# Check deployment status
vercel inspect <deployment-url> --token placeholder
Pre-Send Checks (do this before sharing the URL)

Don't send the deployment URL to the user until you've confirmed it's actually working. At minimum:

  1. Local build passes — run npm run build (or the project's build command) before vercel deploy. If the build fails locally, fix it first; don't deploy broken code.
  2. Deployment succeeded — the vercel deploy output shows a "Production: https://..." URL and the status is READY (confirm with vercel inspect).
  3. Live URL respondscurl -sI <url> | head -1 should return HTTP/2 200 (or another 2xx/3xx). A 404/500 means something's broken even though Vercel reported success.
  4. Optional visual check — if agent-browser is loaded, open the URL and eyeball it. Helpful for catching broken layouts that a 200 response wouldn't reveal.

If any check fails, fix the issue and redeploy before reporting to the user.

Project Management
# Link to an existing Vercel project (non-interactive)
vercel link --yes --token placeholder

# List recent deployments
vercel ls --token placeholder

# List all projects
vercel project ls --token placeholder
Domains
# List domains
vercel domains ls --token placeholder

# Add a domain to the current project
vercel domains add example.com --token placeholder
Environment Variables
# Pull env vars from Vercel to local .env
vercel env pull --token placeholder

# Add an env var (use echo to pipe the value — avoids interactive prompt)
echo "value" | vercel env add VAR_NAME production --token placeholder
Common Errors

| Error | Fix | |-------|-----| | Error: No framework detected | Ensure the project has a package.json with a build script, or set the framework in vercel.json | | Error: Rate limited | Wait and retry. Don't loop — report to user | | Error: You have reached your project limit | User needs to upgrade Vercel plan or delete unused projects | | ENOTFOUND api.vercel.com | Network issue. Check proxy connectivity | | Auth error after vercel whoami | Credential may be expired. Ask the user to refresh the Vercel token in OneCLI |

Best Practices
  • Run npm run build locally before deploying to catch build errors early
  • Use --cwd instead of cd to keep your working directory stable
  • For Next.js projects, vercel deploy auto-detects the framework — no extra config needed
  • Use vercel.json only when you need custom build settings, rewrites, or headers
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。