env-vars
БесплатноБез исполняемых скриптовНе проверенVercel environment variable expert guidance. Use when working with .env files, vercel env commands, Secret or Config variable types, OIDC tokens, or managing…
от vercel★ 356 звёзд на GitHubОб этом скилле
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
- Never commit secrets to
.env,.env.development, or.env.production— use.localvariants or Vercel environment variables .env.localis always gitignored by Next.js — this is wherevercel env pullwrites secrets- Variables prefixed with
NEXT_PUBLIC_are exposed to the browser bundle — never put secrets inNEXT_PUBLIC_vars - All other variables are server-only (API routes, Server Components, middleware)
vercel env CLI
Pull Environment Variables
# Pull all env vars for the current environment into .env.local
vercel env pull .env.local
# Pull for a specific environment
vercel env pull .env.local --environment=production
vercel env pull .env.local --environment=preview
vercel env pull .env.local --environment=development
# Overwrite existing file without prompting
vercel env pull .env.local --yes
# Pull to a custom file
vercel env pull .env.production.local --environment=production
Add Environment Variables
Every variable has a type:
| Type | After saving | Use for |
|---|---|---|
| Secret | Hidden in the dashboard and vercel env ls; can be replaced, never read back. Production and Preview Secrets are not returned by vercel env pull. |
Passwords, API keys, tokens, database URLs |
| Config | Readable by members with access | Non-sensitive values you need to read later |
Deployments receive both types at build time and runtime. Secret and Config replaced the Sensitive toggle; existing Sensitive variables are Secrets.
# Interactive — prompts for value, environments, and type
vercel env add MY_SECRET
# Non-interactive: read the value from a file so it never lands in shell
# history or process arguments (echo "value" | ... and --value do both)
vercel env add MY_SECRET --environment production < ./secret.txt
# Add to production and preview in one command
vercel env add MY_SECRET --environment production,preview < ./secret.txt
# Set the type explicitly
vercel env add MY_SECRET --environment production --type secret < ./secret.txt
vercel env add SITE_REGION --environment production --type config < ./region.txt
# Add development in its own command; development-only adds default to Config
vercel env add MY_SECRET --environment development < ./dev-secret.txt
# Update an existing value (--yes: piped input can't answer the confirmation)
vercel env update MY_SECRET --environment production --yes < ./secret.txt
- Defaults: a non-interactive add to production, preview, or a custom environment is stored as Secret.
- Public prefixes are always Config: variables such as
NEXT_PUBLIC_*orVITE_*are exposed to browsers, so the CLI refuses--type secretfor them. Keep a private value under a name without the prefix. - Flags:
--type config|secretneeds Vercel CLI 59.6 or later. Older CLIs use--visibility, now a deprecated alias of--type.--sensitive(Secret) and--no-sensitive(Config) still work in every version. - Environment flag:
--environmentand--git-branchonenv add,ls,rm, andupdateneed Vercel CLI 64.6.0 or later. Older CLIs take the environment and branch as bare arguments (vercel env add NAME production); current CLIs still accept them with a deprecation warning. - Team policy: Separate Production Secret Values requires a Production Secret to differ from the Preview, Development, and custom environment values of the same key. Under it, create separate Production and non-Production values instead of adding one value to all targets. It replaces the deprecated Enforce Sensitive Environment Variables policy.
List Environment Variables
# List all environment variables
vercel env ls
# Filter by environment
vercel env ls --environment production
Remove Environment Variables
# Remove from specific environment
vercel env rm MY_SECRET --environment production
Установить env-vars в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл env-vars?
Vercel environment variable expert guidance. Use when working with .env files, vercel env commands, Secret or Config variable types, OIDC tokens, or managing environment-specific configuration.
Как установить скилл env-vars?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл env-vars запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic