env-vars

Manage Vercel environment variables and OIDC tokens via CLI.

246|42|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/vercel/vercel-plugin --skill env-vars-vercel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: env-vars
Source: https://github.com/vercel/vercel-plugin/tree/main/skills/env-vars
Command: npx skills add https://github.com/vercel/vercel-plugin --skill env-vars-vercel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides expert guidance for managing Vercel environment variables, .env workflows, and OIDC token lifecycles to keep deployments secure and predictable.

Core Features & Use Cases

  • Environment variable management across local development and Vercel deployments, including secret handling and variable scoping.
  • Guidance on the vercel env CLI (pull, add, ls, rm) and best practices for syncing .env.local with project secrets.
  • OIDC-based authentication workflows for AI gateway and cloud services, including token rotation and secure local development.
  • Best practices for avoiding secrets exposure, using NEXT_PUBLIC_ prefixes appropriately, and protecting local overrides.

Quick Start

Pull your environment vars into a local .env.local using vercel env pull and verify required keys against .env.example.

Frequently Asked Questions about env-vars

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync Vercel environment variables to my local .env file?▼

To sync Vercel environment variables locally, use the `vercel env pull` command to generate a `.env.local` file, ensuring your local development environment matches your deployment secrets without manual copying.

What is the best way to scope secrets across local and Vercel deployment environments?▼

Scoping secrets across Vercel deployment environments involves using environment-specific variable assignments and the `vercel env` CLI to manage access controls, ensuring sensitive data remains isolated to specific deployment targets like production or preview.

How does OIDC token management work for Vercel deployments?▼

OIDC token management for Vercel deployments handles authentication workflows for AI gateways and cloud services by defining token lifecycles and access scoping, replacing long-lived static secrets with dynamically rotated credentials.

When should I use the NEXT_PUBLIC_ prefix for environment variables?▼

Use the `NEXT_PUBLIC_` prefix for environment variables when you need to expose specific values to the browser client, while keeping non-prefixed variables secure and server-side only to prevent accidental secrets exposure.

What safety checks are included for protecting environment variables from prompt injection?▼

Safety checks for prompt injection and data exfiltration validate frontmatter metadata and restrict retrieval fields, preventing malicious inputs from accessing or exporting sensitive secrets during environment variable workflows.

Can I use vercel env CLI commands to add and remove project secrets?▼

Yes, you can use `vercel env add` to inject new secrets and `vercel env rm` to delete existing project variables across local and deployment environments, ensuring precise lifecycle management.