
Env Vars
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-codeInstalls 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:
| File | Purpose | Git-tracked? |
|---|---|---|
.env | Default values for all environments | Yes |
.env.local | Local overrides and secrets | No (gitignored) |
.env.development | Development-specific defaults | Yes |
.env.development.local | Local dev overrides | No |
.env.production | Production-specific defaults | Yes |
.env.production.local | Local prod overrides | No |
.env.test | Test-specific defaults | Yes |
.env.test.local | Local test overrides | No |
Load Order (Next.js)
.env(lowest priority).env.[environment](development, production, or test).env.local(skipped in test environment).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- Vercel Storage244
- Workflow236
- Auth232
- Runtime Cache228
- Verification226
- Vercel Sandbox219
- Next Cache Components218
- Next Upgrade213
- Bootstrap211
- Marketplace208
- Vercel Plugin Eval206
- Plugin Audit198
- Benchmark Agents197
- Release194
- Benchmark Testing193
- Knowledge Update190
- Benchmark E2e187
- Benchmark Sandbox181
- Next Forge158
- Nextjs4.3K
- React Best Practices721
- Shadcn399
- Deployments Cicd333
- Turbopack310