The specialist-subagent pattern forced every /add-vercel user through the OneCLI credential-assignment plumbing (dynamically created Frontend Engineer agents had no Vercel secret on first deploy). For a personal assistant the isolation wasn't worth the complexity — the host agent can deploy to Vercel directly using the same CLI. - Remove the Phase 5 CLAUDE.md patch that forbade writing frontend code - Drop the bundled frontend-engineer container skill - Strip the HARD RULE + "Building Websites" delegation from vercel-cli - Add a concise "Pre-Send Checks" section: local build, deployment READY, live URL returns 2xx, optional agent-browser visual check Net: -194 lines. /add-vercel now installs the CLI, registers the secret, assigns it to existing agents, and teaches the agent to verify before sharing the URL. No subagent plumbing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.8 KiB
name, description
| name | description |
|---|---|
| vercel-cli | Deploy apps to Vercel. Use when asked to deploy, ship, or publish a web application, or manage Vercel projects, domains, and environment variables. |
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:
- Local build passes — run
npm run build(or the project's build command) beforevercel deploy. If the build fails locally, fix it first; don't deploy broken code. - Deployment succeeded — the
vercel deployoutput shows a "Production: https://..." URL and the status is READY (confirm withvercel inspect). - Live URL responds —
curl -sI <url> | head -1should returnHTTP/2 200(or another 2xx/3xx). A 404/500 means something's broken even though Vercel reported success. - Optional visual check — if
agent-browseris 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 buildlocally before deploying to catch build errors early - Use
--cwdinstead ofcdto keep your working directory stable - For Next.js projects,
vercel deployauto-detects the framework — no extra config needed - Use
vercel.jsononly when you need custom build settings, rewrites, or headers