This is your reference when juggling Vercel environment variables, `.env` file hierarchy, and the `vercel env` CLI. It walks you through the load order (`.env`, `.env.local`, `.env.production.local`), when to use `vercel env pull` versus dashboard settings, and how OIDC tokens expire after 12 hours locally. The chainTo pattern catches raw API keys like `OPENAI_API_KEY` and nudges you toward Vercel's keyless OIDC flow instead. Honest take: `vercel env pull` overwrites your entire `.env.local`, so any custom debug flags you added manually vanish. Back them up first or you'll be recreating them every time you pull fresh secrets.

skills.sh installs
250
GitHub stars
183
last updated
Jun 3, 2026

Install

$ npx -y skills add vercel-labs/vercel-plugin --skill env-vars --agent claude-code

Installs into .claude/skills of the current project.

Files

Vercel Environment Variables

You are an expert in Vercel environment variable management — .env file conventions, the vercel env CLI, OIDC token lifecycle, and environment-specific configuration.

.env File Hierarchy

Vercel and Next.js load environment variables in a specific order. Later files override earlier ones:

FilePurposeGit-tracked?
.envDefault values for all environmentsYes
.env.localLocal overrides and secretsNo (gitignored)
.env.developmentDevelopment-specific defaultsYes
.env.development.localLocal dev overridesNo
.env.productionProduction-specific defaultsYes
.env.production.localLocal prod overridesNo
.env.testTest-specific defaultsYes
.env.test.localLocal test overridesNo

Load Order (Next.js)

  1. .env (lowest priority)
  2. .env.[environment] (development, production, or test)
  3. .env.local (skipped in test environment)
  4. .env.[environment].local (highest priority)

Critical Rules

Sponsors

Details

Repository
github.com/vercel-labs/vercel-plugin
Category
Cloud & Infrastructure
First seen
Jun 3, 2026

More from vercel-labs/vercel-plugin

All 32
1vercel-labs avatarworkflowvercel-labs/vercel-pluginworkflow236skills.sh installs
2vercel-labs avatarauthvercel-labs/vercel-pluginauth232skills.sh installs
3danielmiessler avatarDocumentsdanielmiessler/personal_ai_infrastructuredocuments231skills.sh installs
4vercel-labs avatarruntime-cachevercel-labs/vercel-pluginruntime cache228skills.sh installs
5vercel-labs avatarverificationvercel-labs/vercel-pluginverification226skills.sh installs
6vercel-labs avatarcsvvercel-labs/bash-toolAnalyze and transform CSV data using bash tools224skills.sh installs