# Env vars

> Env vars is an open-source agent skill for cloud and infrastructure. Guides an agent through Vercel env files, the vercel env CLI and OIDC tokens. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ScaleDockHQ/better-supabase/tree/main/.agents/skills/env-vars
- **Repository:** https://github.com/scaledockhq/better-supabase
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** env-vars
- **Collection:** https://github.com/ScaleDockHQ/better-supabase
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill gives the agent working knowledge of Vercel environment variables. It explains how .env, .env.local and environment-specific files layer in Next.js, which values belong in git-tracked files versus local-only files, and why NEXT_PUBLIC_ prefixes expose values to the browser. It also covers the Secret and Config variable types, how values are added, updated, listed and removed with the vercel env commands, and how to scope variables to Production, Preview, Development or specific Git branches.

The guidance includes a fresh-clone bootstrap sequence: link the project, pull variables into .env.local, and check that keys listed in .env.example are present. It also documents the OIDC token lifecycle for local development, where a token is provisioned on pull and lasts about 12 hours, along with a troubleshooting table for common auth failures. Gotchas cover how pulls merge into existing files and why pulled files omit Production and Preview Secrets.

The skill is documentation-only with no scripts. It assumes a Vercel project and the Vercel CLI, and its examples use Next.js conventions and Node tooling such as dotenv-cli, drizzle-kit and tsx.

## When your agent uses it

> 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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/env-vars)
- [License: MIT](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/env-vars)

## Features

- **Env file hierarchy:** Explains how .env, environment-specific and .local files override one another and which ones are safe to commit.
- **Vercel env CLI usage:** Covers pulling, adding, updating, listing and removing variables with the vercel env commands.
- **Secret and Config types:** Describes how each variable type is stored and read back, and the defaults applied when adding variables.
- **OIDC token troubleshooting:** Covers how local OIDC tokens are provisioned, when they expire and how to fix common auth errors.
- **Environment scoping:** Shows how variables map to Production, Preview, Development and specific Git branches.
- **Project bootstrap steps:** Lists a sequence for setting up a fresh clone or new machine with the correct Vercel environment values.

## Good for

- Pull the latest Vercel environment variables into a local .env.local file
- Add a secret API key to production and preview without exposing it in shell history
- Fix an OIDC authentication error that appears after a few hours of local development
- Check that every key in .env.example is present in the local environment file
- Run a standalone seed script with variables loaded from .env.local

## Install

### Claude Code

This skill ships in the `better-supabase` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase
```

Or copy only this skill to `~/.claude/skills/env-vars`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/env-vars &&
cp -R "$tmp/.agents/skills/env-vars" ~/.claude/skills/env-vars &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/env-vars` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/env-vars` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/env-vars &&
cp -R "$tmp/.agents/skills/env-vars" ~/.agents/skills/env-vars &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/env-vars` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/env-vars` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/env-vars &&
cp -R "$tmp/.agents/skills/env-vars" ~/.cursor/skills/env-vars &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/env-vars` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/env-vars
```

Or copy the folder to `~/.gemini/skills/env-vars` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/env-vars`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/env-vars &&
cp -R "$tmp/.agents/skills/env-vars" ~/.copilot/skills/env-vars &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/env-vars` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git
```

Then copy `better-supabase/.agents/skills/env-vars` into your agent's skills folder as `env-vars`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Env vars need any scripts or extra tools to run?

It has no scripts. Its examples assume the Vercel CLI and, for standalone scripts, optional tools such as dotenv-cli, drizzle-kit or tsx.

### Will pulling environment variables overwrite my local custom values?

Current Vercel CLI versions merge pulled values into the existing file and keep variables that exist only locally. Older CLIs replace the whole file, so the guidance suggests backing up custom variables first.

### Can production secrets be copied to a local machine with this?

No. Pulling with the production or preview environment does not write Secret values, so the guidance recommends keeping separate Development values for local work.

### Why can't I use --type secret for NEXT_PUBLIC variables?

Variables with public prefixes such as NEXT_PUBLIC_ or VITE_ are exposed to browsers, so the CLI always stores them as Config.

### How do I install Env vars in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/env-vars to use it in all your projects, or to .claude/skills/env-vars in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

### Does Env vars run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Env vars?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Env vars?

The closest alternatives to Env vars are Vercel CLI with tokens, Vercel deploy, Deploy to vercel, Pulumi esc and Vercel optimize.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Vercel CLI with tokens](https://ai-powered.com/skills/vercel-cli-with-tokens): Vercel CLI with tokens is a free agent skill for cloud and infrastructure.
- [Vercel deploy](https://ai-powered.com/skills/vercel-deploy): Vercel deploy is a free agent skill for cloud and infrastructure.
- [Deploy to vercel](https://ai-powered.com/skills/deploy-to-vercel): Deploy to vercel is a free agent skill for cloud and infrastructure.
- [Pulumi esc](https://ai-powered.com/skills/pulumi-esc): Pulumi esc is an open-source agent skill for cloud and infrastructure.
- [Vercel optimize](https://ai-powered.com/skills/vercel-optimize): Vercel optimize is an open-source agent skill for cloud and infrastructure.
- [V development](https://ai-powered.com/skills/v-development): V development is an open-source agent skill for developer tools.
- [Vercel sandbox](https://ai-powered.com/skills/vercel-sandbox): Vercel sandbox is an open-source agent skill for cloud and infrastructure.
- [Env bootstrap](https://ai-powered.com/skills/env-bootstrap): Env bootstrap is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/env-vars
