{"id":"vercel-cli","name":"vercel-cli","summary":"Vercelにアプリをデプロイしてください。ウェブアプリケーションのデプロイ、出荷、公開、Vercelプロジェクト、ドメイン、環境変数の管理を依頼された際に使用してください。","body":"# Vercel CLI\n\nYou can deploy web applications to Vercel using the `vercel` CLI.\n\n**HARD RULE: You MUST NOT write HTML, CSS, or JavaScript yourself. When asked to build a website or web app, you MUST delegate to a Frontend Engineer subagent (see \"Building Websites\" section below). This is not optional. Violation wastes your context window on code that belongs in a separate agent.**\n\n## Auth\n\nAuth 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.\n\nBefore any Vercel operation, verify auth:\n\n```bash\nvercel whoami --token placeholder\n```\n\nIf 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`.\n\n## Deploying\n\nAlways use `--yes` to skip interactive prompts and `--token placeholder` for auth (OneCLI replaces with real token).\n\n```bash\n# Deploy to production\nvercel deploy --yes --prod --token placeholder\n\n# Deploy from a specific directory\nvercel deploy --yes --prod --token placeholder --cwd /path/to/project\n\n# Preview deployment (not production)\nvercel deploy --yes --token placeholder\n```\n\nAfter deploying, verify the live URL:\n\n```bash\n# Check deployment status\nvercel inspect <deployment-url> --token placeholder\n```\n\n## Pre-Send Checks (do this before sharing the URL)\n\nDon't send the deployment URL to the user until you've confirmed it's actually working. At minimum:\n\n1. **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.\n2. **Deployment succeeded** — the `vercel deploy` output shows a \"Production: https://...\" URL and the status is READY (confirm with `vercel inspect`).\n3. **Live URL responds** — `curl -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.\n4. **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.\n\nIf any check fails, fix the issue and redeploy before reporting to the user.\n\n## Project Management\n\n```bash\n# Link to an existing Vercel project (non-interactive)\nvercel link --yes --token placeholder\n\n# List recent deployments\nvercel ls --token placeholder\n\n# List all projects\nvercel project ls --token placeholder\n```\n\n## Domains\n\n```bash\n# List domains\nvercel domains ls --token placeholder\n\n# Add a domain to the current project\nvercel domains add example.com --token placeholder\n```\n\n## Environment Variables\n\n```bash\n# Pull env vars from Vercel to local .env\nvercel env pull --token placeholder\n\n# Add an env var (use echo to pipe the value — avoids interactive prompt)\necho \"value\" | vercel env add VAR_NAME production --token placeholder\n```\n\n## Common Errors\n\n| Error | Fix |\n|-------|-----|\n| `Error: No framework detected` | Ensure the project has a `package.json` with a `build` script, or set the framework in `vercel.json` |\n| `Error: Rate limited` | Wait and retry. Don't loop — report to user |\n| `Error: You have reached your project limit` | User needs to upgrade Vercel plan or delete unused projects |\n| `ENOTFOUND api.vercel.com` | Network issue. Check proxy connectivity |\n| Auth error after `vercel whoami` | Credential may be expired. Ask the user to refresh the Vercel token in OneCLI |\n\n## Building Websites — Delegate to Frontend Engineer\n\nWhen asked to **build, create, or redesign** a website or web app, do NOT build it yourself. You MUST delegate to a Frontend Engineer agent. This is a two-step process and **both steps are required**:\n\n**Step 1 — Create the agent** (skip if you already have a \"frontend-engineer\" destination):\n\n```\ncreate_agent({\n  name: \"Frontend Engineer\",\n  instructions: \"You are a dedicated frontend engineer. Your frontend-engineer skill has your full workflow. Build what is requested, test it visually with agent-browser, deploy to Vercel, and send back the live URL + screenshots to your parent agent when done.\"\n})\n```\n\n**Step 2 — Send the build request** (MANDATORY — do this immediately after step 1):\n\n```\nsend_message(to: \"frontend-engineer\", text: \"<full description of what to build, including design requirements, content, colors, and any assets>\")\n```\n\n⚠️ **CRITICAL**: If you skip step 2, nothing happens. The agent exists but has no work. You MUST send the message. Do NOT tell the user \"it's working on it\" until you have actually called send_message.\n\nAfter sending, tell the user you've handed it off and will share the result when it comes back. The Frontend Engineer will send you the live URL + screenshots when done — forward those to the user.\n\n**When to delegate vs do it yourself:**\n- **Delegate**: building new sites, redesigns, multi-page apps, anything that needs visual testing\n- **Do yourself**: simple `vercel deploy` of an existing project, checking deployment status, managing domains/env vars\n\n## Best Practices\n\n- Run `pnpm run build` locally before deploying to catch build errors early\n- Use `--cwd` instead of `cd` to keep your working directory stable\n- For Next.js projects, `vercel deploy` auto-detects the framework — no extra config needed\n- Use `vercel.json` only when you need custom build settings, rewrites, or headers","author":"@nanocoai","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/nanocoai/nanoclaw/tree/main/.claude/skills/add-vercel/container-skills/vercel-cli","license":"MIT","category":"writing","lang":"en","tokens":1330,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[{"code":"injection.hide","kind":"injection","where":"SKILL.md:114","excerpt":"Do NOT tell the user","message":"asks the agent to hide activity from the user","severity":"warn"}],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["vercel.com"]}}