.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/agent-skills/vercel-cli-with-tokens
home/skills/vercel-labs/agent-skills/vercel-cli-with-tokens
vercel-labs avatar

vercel-cli-with-tokens

byvercel-labs· 154 skills

Installs

75k

Stars

29k

Forks

2.6k

Category

DevOps & CI/CD

View on GitHub

TL;DR

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

How to install vercel-cli-with-tokens?

vercel-labs/agent-skills/vercel-cli-with-tokens
$npx -y skills add vercel-labs/agent-skills --skill vercel-cli-with-tokens

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/vercel-labs/agent-skills" --skill "vercel-labs/agent-skills/vercel-cli-with-tokens"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/vercel-labs/agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/vercel-labs/agent-skills"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# Vercel CLI with Tokens
2 
3Deploy and manage projects on Vercel using the CLI with token-based authentication, without relying on `vercel login`.
4 
5## Step 1: Locate the Vercel Token
6 
7Before running any Vercel CLI commands, identify where the token is coming from. Work through these scenarios in order:
8 
9### A) `VERCEL_TOKEN` is already set in the environment
10 
11```bash
12printenv VERCEL_TOKEN
13```
14 
15If this returns a value, you're ready. Skip to Step 2.
16 
17### B) Token is in a `.env` file under `VERCEL_TOKEN`
18 
19```bash
20grep '^VERCEL_TOKEN=' .env 2>/dev/null
21```
22 
23If found, export it:
24 
25```bash
26export VERCEL_TOKEN=$(grep '^VERCEL_TOKEN=' .env | cut -d= -f2-)
27```
28 
29### C) Token is in a `.env` file under a different name
30 
31Look for any variable that looks like a Vercel token (Vercel tokens typically start with `vca_`):
32 
33```bash
34grep -i 'vercel' .env 2>/dev/null
35```
36 
37Inspect the output to identify which variable holds the token, then export it as `VERCEL_TOKEN`:
38 
39```bash
40export VERCEL_TOKEN=$(grep '^<VARIABLE_NAME>=' .env | cut -d= -f2-)
41```
42 
43### D) No token found — ask the user
44 
45If none of the above yield a token, ask the user to provide one. They can create a Vercel access token at vercel.com/account/tokens.
46 
47---
48 
49**Important:** Once `VERCEL_TOKEN` is exported as an environment variable, the Vercel CLI reads it natively — **do not pass it as a `--token` flag**. Putting secrets in command-line arguments exposes them in shell history and process listings.
50 
51```bash
52# Bad — token visible in shell history and process listings
53vercel deploy --token "vca_abc123"
54 
55# Good — CLI reads VERCEL_TOKEN from the environment
56export VERCEL_TOKEN="vca_abc123"
57vercel deploy
58```
59 
60## Step 2: Locate the Project and Team
61 
62Similarly, check for the project ID and team scope. These let the CLI target the right project without needing `vercel link`.
63 
64```bash
65# Check environment
66printenv VERCEL_PROJECT_ID
67printenv VERCEL_ORG_ID
68 
69# Or check .env
70grep -i 'vercel' .env 2>/dev/null
71```
72 
73**If you have a project URL** (e.g. `https://vercel.com/my-team/my-project`), extract the team slug:
74 
75```bash
76# e.g. "my-team" from "https://vercel.com/my-team/my-project"
77echo "$PROJECT_URL" | sed 's|https://vercel.com/||' | cut -d/ -f1
78```
79 
80**If you have both `VERCEL_ORG_ID` and `VERCEL_PROJECT_ID` in your environment**, export them — the CLI will use these automatically and skip any `.vercel/` directory:
81 
82```bash
83export VERCEL_ORG_ID="<org-id>"
84export VERCEL_PROJECT_ID="<project-id>"
85```
86 
87Note: `VERCEL_ORG_ID` and `VERCEL_PROJECT_ID` must be set together — setting only one causes an error.
88 
89## CLI Setup
90 
91Ensure the Vercel CLI is installed and up to date:
92 
93```bash
94npm install -g vercel
95vercel --version
96```
97 
98## Deploying a Project
99 
100Always deploy as **preview** unless the user explicitly requests production. Choose a method based on what you have available.
101 
102### Quick Deploy (have project ID — no linking needed)
103 
104When `VERCEL_TOKEN` and `VERCEL_PROJECT_ID` are set in the environment, deploy directly:
105 
106```bash
107vercel deploy -y --no-wait
108```
109 
110With a team scope (either via `VERCEL_ORG_ID` or `--scope`):
111 
112```bash
113vercel deploy --scope <team-slug> -y --no-wait
114```
115 
116Production (only when explicitly requested):
117 
118```bash
119vercel deploy --prod --scope <team-slug> -y --no-wait
120```
121 
122Check status:
123 
124```bash
125vercel inspect <deployment-url>
126```
127 
128### Full Deploy Flow (no project ID — need to link)
129 
130Use this when you have a token and team but no pre-existing project ID.
131 
132#### Check project state first
133 
134```bash
135# Does the project have a git remote?
136git remote get-url origin 2>/dev/null
137 
138# Is it already linked to a Vercel project?
139cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null
140```
141 
142#### Link the project
143 
144**With git remote (preferred):**
145 
146```bash
147vercel link --repo --scope <team-slug> -y
148```
149 
150Reads the git remote and connects to the matching Vercel project. Creates `.vercel/repo.json`. More reliable than plain `vercel link`, which matches by directory name.
151 
152**Without git remote:**
153 
154```bash
155vercel link --scope <team-slug> -y
156```
157 
158Creates `.vercel/project.json`.
159 
160**Link to a specific project by name:**
161 
162```bash
163vercel link --project <project-name> --scope <team-slug> -y
164```
165 
166If the project is already linked, check `orgId` in `.vercel/project.json` or `.vercel/repo.json` to verify it matches the intended team.
167 
168#### Deploy after linking
169 
170**A) Git Push Deploy — has git remote (preferred)**
171 
172Git pushes trigger automatic Vercel deployments.
173 
1741. **Ask the user before pushing.** Never push without explicit approval.
1752. Commit and push:
176 ```bash
177 git add .
178 git commit -m "deploy: <description of changes>"
179 git push
180 ```
1813. Vercel builds automatically. Non-production branches get preview deployments.
1824. Retrieve the deployment URL:
183 ```bash
184 sleep 5
185 vercel ls --format json --scope <team-slug>
186 ```
187 Find the latest entry in the `deployments` array.
188 
189**B) CLI Deploy — no git remote**
190 
191```bash
192vercel deploy --scope <team-slug> -y --no-wait
193```
194 
195Check status:
196 
197```bash
198vercel inspect <deployment-url>
199```
200 
201### Deploying from a Remote Repository (code not cloned locally)
202 
2031. Clone the repository:
204 ```bash
205 git clone <repo-url>
206 cd <repo-name>
207 ```
2082. Link to Vercel:
209 ```bash
210 vercel link --repo --scope <team-slug> -y
211 ```
2123. Deploy via git push (if you have push access) or CLI deploy.
213 
214### About `.vercel/` Directory
215 
216A linked project has either:
217- `.vercel/project.json` — from `vercel link`. Contains `projectId` and `orgId`.
218- `.vercel/repo.json` — from `vercel link --repo`. Contains `orgId`, `remoteName`, and a `projects` map.
219 
220Not needed when `VERCEL_ORG_ID` + `VERCEL_PROJECT_ID` are both set in the environment.
221 
222**Do NOT** run `vercel project inspect` or `vercel link` in an unlinked directory to detect state — they will interactively prompt or silently link as a side-effect. `vercel ls` is safe (in an unlinked directory it defaults to showing all deployments for the scope). `vercel whoami` is safe anywhere.
223 
224## Managing Environment Variables
225 
226```bash
227# Set for all environments
228echo "value" | vercel env add VAR_NAME --scope <team-slug>
229 
230# Set for a specific environment (production, preview, development)
231echo "value" | vercel env add VAR_NAME production --scope <team-slug>
232 
233# List environment variables
234vercel env ls --scope <team-slug>
235 
236# Pull env vars to local .env.local file
237vercel env pull --scope <team-slug>
238 
239# Remove a variable
240vercel env rm VAR_NAME --scope <team-slug> -y
241```
242 
243## Inspecting Deployments
244 
245```bash
246# List recent deployments
247vercel ls --format json --scope <team-slug>
248 
249# Inspect a specific deployment
250vercel inspect <deployment-url>
251 
252# View build logs (requires Vercel CLI v35+)
253vercel inspect <deployment-url> --logs
254 
255# View runtime request logs (follows live by default; add --no-follow for a one-shot snapshot)
256vercel logs <deployment-url>
257```
258 
259## Managing Domains
260 
261```bash
262# List domains
263vercel domains ls --scope <team-slug>
264 
265# Add a domain to the project — linked or env-linked directory (1 arg)
266vercel domains add <domain> --scope <team-slug>
267 
268# Add a domain — unlinked directory (requires <project> positional)
269vercel domains add <domain> <project> --scope <team-slug>
270```
271 
272## Stripe Projects Plan Changes
273 
274If this project is managed by Stripe Projects. **Ask the user before running any paid or destructive plan change** — upgrades bill a real card, downgrades remove seats.
275 
276First run `stripe projects status --json` to confirm the Vercel resource's local name. The examples below assume the default (`vercel-plan`); substitute the actual name if it was renamed at `stripe projects add` time.
277 
278- **Upgrade to Pro:** `stripe projects add vercel/pro` (or `stripe projects upgrade vercel-plan pro`)
279- **Downgrade to Hobby:** `stripe projects downgrade vercel-plan hobby`
280 
281### What Pro gives you
282 
283- $20/month platform fee, includes $20/month of usage credit.
284- Turbo build machines (30 vCPUs, 60 GB memory) by default for new projects — significantly faster builds than Hobby.
285- 1 deploying seat + unlimited free Viewer seats (read-only collaborators, preview comments).
286- Higher included allocations (1 TB Fast Data Transfer, 10M Edge Requests per month).
287- Paid add-ons available: SAML SSO, HIPAA BAA, Flags Explorer, Observability Plus, Speed Insights, Web Analytics Plus.
288 
289Full details: https://vercel.com/docs/plans/pro-plan
290 
291## Working Agreement
292 
293- **Never pass `VERCEL_TOKEN` as a `--token` flag.** Export it as an environment variable and let the CLI read it natively.
294- **Check the environment for tokens before asking the user.** Look in the current env and `.env` files first.
295- **Default to preview deployments.** Only deploy to production when explicitly asked.
296- **Ask before pushing to git.** Never push commits without the user's approval.
297- **Do not modify `.vercel/` files directly.** The CLI manages this directory. Reading them (e.g. to verify `orgId`) is fine.
298- **Do not curl/fetch deployed URLs to verify.** Just return the link to the user.
299- **Use `--format json`** when structured output will help with follow-up steps.
300- **Use `-y`** on commands that prompt for confirmation to avoid interactive blocking.
301 
302## Troubleshooting
303 
304### Token not found
305 
306Check the environment and any `.env` files present:
307 
308```bash
309printenv | grep -i vercel
310grep -i vercel .env 2>/dev/null
311```
312 
313### Authentication error
314 
315If the CLI fails with `Authentication required`:
316- The token may be expired or invalid.
317- Verify: `vercel whoami` (uses `VERCEL_TOKEN` from environment).
318- Ask the user for a fresh token.
319 
320### Wrong team
321 
322Verify the scope is correct:
323 
324```bash
325vercel whoami --scope <team-slug>
326```
327 
328### Build failure
329 
330Check the build logs:
331 
332```bash
333vercel inspect <deployment-url> --logs
334```
335 
336Common causes:
337- Missing dependencies — ensure `package.json` is complete and committed.
338- Missing environment variables — add with `vercel env add`.
339- Framework misconfiguration — check `vercel.json`. Vercel auto-detects frameworks (Next.js, Remix, Vite, etc.) from `package.json`; override with `vercel.json` if detection is wrong.
340 
341### CLI not installed
342 
343```bash
344npm install -g vercel
345```

Security

Review

  • Gen Agent Trust Hubpass
  • Socketpass
  • Snykwarn
  • ZeroLeakspass

Preview

vercel-labs/agent-skillsvercel-labs/agent-skills

$ npx -y skills add vercel-labs/agent-skills --skill vercel-cli-with-tokens

▸ installing to .claude/skills…

✓ vercel-cli-with-tokens ready

Repovercel-labs/agent-skills
TypeSkills
CategoryDevOps & CI/CD
ForOpsDeveloper
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. mattpocock avatarsetup-matt-pocock-skillsConfigure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout.SkillsJul 2026495k189k
  2. microsoft avatarmicrosoft-foundryDeploy, evaluate, fine-tune, and manage Foundry agents end-to-end with azd: hosted agent scaffold/run/deploy, prompt agent create, batch eval, continuous eval,…SkillsJul 2026490k1.3k
  3. microsoft avatarazure-deployExecute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files.SkillsJul 2026485k1.3k
  4. microsoft avatarazure-preparePrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd)…SkillsJul 2026485k1.3k
  5. microsoft avatarazure-validatePre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity…SkillsJul 2026484k1.3k
  6. microsoft avatarazure-aigatewayConfigure Azure API Management as an AI Gateway for AI models, MCP tools, and agents.SkillsJul 2026484k1.3k