Agent skill

Vercel Multi Env Setup

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Configure Vercel across development, preview, and production environments with scoped secrets.

MITAuto-check: notesDevOps & Cloud

Install Vercel Multi Env Setup

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-multi-env-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace vercel-multi-env-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/vercel-multi-env-setup .claude/skills/vercel-multi-env-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vercel-multi-env-setup
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
419 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Configure Vercel across development, preview, and production environments with scoped secrets.

  • Works in 7 steps: Understand Vercel's Environment Model → Scope Environment Variables → Via REST API (Automation) → …
  • Setting up per-environment configuration
  • SKILL.md covers Overview, Prerequisites, Instructions and Environment Variable Types, plus 5 more sections
  • Calls vercel, curl and jq; reaches api.vercel.com; needs VERCEL_TOKEN

What it does

Vercel Multi Env Setup is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Vercel across development, preview, and production environments with scoped secrets. Use when setting up per-environment configuration, managing environment-specific variables, or implementing environment isolation on Vercel. Trigger with phrases like "vercel environments", "vercel staging", "vercel dev prod", "vercel environment setup", "vercel env scoping".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/configuration-structure.md`, `references/errors.md` and `references/examples.md`). Compatibility notes: Designed for Claude Code

It sits in DevOps & Cloud, covering Secrets management. It works with Vercel. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Setting up per-environment configuration
  • Managing environment-specific variables
  • Implementing environment isolation on Vercel
  • With phrases like vercel environments

Example prompts

  • “vercel environments”
  • “vercel staging”
  • “vercel dev prod”
  • “/vercel-multi-env-setup”

Requirements

  • A credential in VERCEL_TOKEN
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(vercel:*)

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Understand Vercel's Environment Model
  2. Scope Environment Variables
  3. Via REST API (Automation)
  4. Custom Environments (Beyond Dev/Preview/Prod)
  5. Branch-Specific Preview Domains
  6. Environment Detection in Code
  7. Pull Env Vars for Local Development

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(vercel:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • vercel
    • curl
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.vercel.com

    Also links to:

    • vercel.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • VERCEL_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Vercel Multi Env Setup loads about 1.9k tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 419 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:180
    vercel env pull .env.development.local
  • NoteMentions a .env fileSKILL.md:183
    vercel env pull --environment=preview .env.preview.local
  • NoteMentions a .env fileSKILL.md:186
    echo '.env*.local' >> .gitignore

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 419 words, ~1,945 tokens.

Download SKILL.mdSave it as .claude/skills/vercel-multi-env-setup/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
vercel-multi-env-setup
description
Configure Vercel across development, preview, and production environments with scoped secrets. Use when setting up per-environment configuration, managing environment-specific variables, or implementing environment isolation on Vercel. Trigger with phrases like "vercel environments", "vercel staging", "vercel dev prod", "vercel environment setup", "vercel env scoping".
allowed-tools
Read, Write, Edit, Bash(vercel:*)
compatibility
Designed for Claude Code
version
1.18.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, vercel, deployment, environments, configuration

Vercel Multi-Env Setup

Overview

Configure Vercel's three built-in environments (Development, Preview, Production) with scoped environment variables, branch-specific preview URLs, and custom environments for staging. Uses Vercel's native environment system and the REST API for automation.

Prerequisites

  • Vercel project linked and deployed
  • Separate database instances per environment (recommended)
  • Access to Vercel dashboard or VERCEL_TOKEN for API

Instructions

Step 1: Understand Vercel's Environment Model

Vercel provides three built-in environments:

EnvironmentTriggerURL PatternUse Case
ProductionPush to production branchyourdomain.comLive traffic
PreviewPush to any other branchproject-git-branch-team.vercel.appPR review
Developmentvercel dev locallylocalhost:3000Local dev
Step 2: Scope Environment Variables
bash
# Add a variable scoped to Production only
vercel env add DATABASE_URL production
# Enter: postgres://prod-host:5432/myapp

# Add a variable scoped to Preview only
vercel env add DATABASE_URL preview
# Enter: postgres://staging-host:5432/myapp_staging

# Add a variable scoped to Development only
vercel env add DATABASE_URL development
# Enter: postgres://localhost:5432/myapp_dev

# Add a variable available in ALL environments
vercel env add NEXT_PUBLIC_APP_NAME production preview development
# Enter: My App

# List all env vars with their scopes
vercel env ls
Step 3: Via REST API (Automation)
bash
# Create env vars with specific scoping
curl -X POST "https://api.vercel.com/v9/projects/my-app/env" \
  -H "Authorization: Bearer $VERCEL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "DATABASE_URL",
    "value": "postgres://prod-host:5432/myapp",
    "type": "encrypted",
    "target": ["production"]
  }'

# Upsert — update if exists, create if not
curl -X POST "https://api.vercel.com/v9/projects/my-app/env?upsert=true" \
  -H "Authorization: Bearer $VERCEL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "DATABASE_URL",
    "value": "postgres://staging-host:5432/myapp_staging",
    "type": "encrypted",
    "target": ["preview"]
  }'

# List all env vars for a project
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
  "https://api.vercel.com/v9/projects/my-app/env" \
  | jq '.envs[] | {key, target, type}'
Step 4: Custom Environments (Beyond Dev/Preview/Prod)

Vercel supports custom environments for staging, QA, etc.:

bash
# Create a custom environment via API
curl -X POST "https://api.vercel.com/v1/projects/my-app/custom-environments" \
  -H "Authorization: Bearer $VERCEL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Staging",
    "slug": "staging",
    "branchPattern": "staging"
  }'

Or in the dashboard: Settings > Environments > Create Environment

Custom environments let you:

  • Link a specific Git branch to the environment
  • Scope environment variables to it
  • Assign a custom domain (e.g., staging.yourdomain.com)
Step 5: Branch-Specific Preview Domains
bash
# Assign a custom domain to a specific branch
# In dashboard: Settings > Domains > Add
# Set Git Branch: "staging"
# Domain: staging.yourdomain.com

# Via API — add domain to project with branch targeting
curl -X POST "https://api.vercel.com/v9/projects/my-app/domains" \
  -H "Authorization: Bearer $VERCEL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "staging.yourdomain.com",
    "gitBranch": "staging"
  }'
Step 6: Environment Detection in Code
typescript
// src/lib/env.ts — detect environment at runtime
export function getEnvironment(): 'production' | 'preview' | 'development' {
  return (process.env.VERCEL_ENV as any) ?? 'development';
}

// Environment-specific behavior
export function getApiBaseUrl(): string {
  switch (getEnvironment()) {
    case 'production':
      return 'https://api.yourdomain.com';
    case 'preview':
      return `https://${process.env.VERCEL_URL}`;
    case 'development':
      return 'http://localhost:3000';
  }
}

// Production safeguards
export function assertNotProduction(operation: string): void {
  if (getEnvironment() === 'production') {
    throw new Error(`Dangerous operation "${operation}" blocked in production`);
  }
}
Step 7: Pull Env Vars for Local Development
bash
# Pull Development-scoped vars to local file
vercel env pull .env.development.local

# Pull Preview-scoped vars (for testing preview behavior locally)
vercel env pull --environment=preview .env.preview.local

# .gitignore these files
echo '.env*.local' >> .gitignore

Environment Variable Types

TypeDashboard VisibilityLog VisibilityUse Case
plainVisibleVisibleNon-sensitive config
encryptedHidden after saveHiddenAPI keys, secrets
sensitiveAlways hiddenHiddenHigh-security secrets
systemAuto-set by VercelVisibleVERCEL_ENV, VERCEL_URL

Output

  • Environment variables scoped per environment (dev/preview/prod)
  • Custom staging environment with dedicated branch and domain
  • Environment detection logic for runtime behavior switching
  • Local development env vars pulled from Vercel
Show full SKILL.md (182 more words)Show less

Error Handling

ErrorCauseSolution
Env var undefined in previewNot scoped to Preview targetRe-add with Preview in target array
Wrong database in productionPreview DB URL used in prodCheck env var scoping per environment
vercel env pull emptyNo Development-scoped varsAdd vars with Development target
Custom env not triggeringBranch pattern doesn't matchCheck branch name matches environment slug
Sensitive var can't be readtype=sensitive hides valueRe-add the var if value is lost

Examples

Prevent a preview deployment from reaching the production database

Create distinct database credentials for Development, Preview, and Production, assign each only to its Vercel environment target, and validate the name and endpoint class—not secret values—in a preview health check. Require an explicit promotion workflow to change Production variables and log the approver and deployment SHA. If a preview points at production by mistake, revoke the preview credential, rotate any exposed connection string, and block further deploys until the scope is corrected.

Resources

Next Steps

For observability and monitoring, see vercel-observability.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/vercel-multi-env-setup of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/configuration-structure.md
  • references/errors.md
  • references/examples.md

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Vercel Multi Env Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vercel Multi Env Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vercel Multi Env Setup this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: NotesMIT
Env Varsvercel/vercel-plugin301—~3kAutomated safety check: NotesCustom licence
Env Managerbobmatnyc/claude-mpm155—~2kAutomated safety check: NotesMIT
Vercel CLInanocoai/nanoclaw31k—~1.4kAutomated safety check: WarnMIT
Phase 9 Deploymentww-w-ai/bkit-claude-code601—~2.7kAutomated safety check: NotesApache-2.0
Memstack Deployment Railway Deploycwinvestments/memstack423—~2.1kAutomated safety check: PassProprietary

Similar skills

  • Env Vars

    vercel/vercel-plugin

    Official

    Vercel environment variable expert guidance. An agent skill from vercel/vercel-plugin.

    301 GitHub stars~3k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Env Manager

    bobmatnyc/claude-mpm

    Environment variable validation, synchronization, and management across local development, CI/CD, and deployment platforms

    155 GitHub stars~2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Vercel CLI

    nanocoai/nanoclaw

    Deploy apps to Vercel. An agent skill from nanocoai/nanoclaw.

    31k GitHub stars~1.4k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: warnings
  • Phase 9 Deployment

    ww-w-ai/bkit-claude-code

    Deploy to production — CI/CD pipelines, environment config, deployment strategies.

    601 GitHub stars~2.7k tokensUpdated 12 days ago
    DevOps & CloudAuto-check: notes
  • A skill your agent uses when the user says 'deploy to Railway', 'Railway setup', 'railway-deploy', or needs to deploy a Node.js, Python, or Docker application to Railway with environment variables…

    423 GitHub stars~2.1k tokensUpdated 13 days ago
    DevOps & CloudAuto-check passed
  • Vercel Deploy

    infometa/workbuddyskills

    Deploy and manage Vercel projects from the terminal. An agent skill from infometa/workbuddyskills.

    346 GitHub stars~1k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated yesterday
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Vercel Multi Env Setup

What does Vercel Multi Env Setup do?

Configure Vercel across development, preview, and production environments with scoped secrets. Vercel Multi Env Setup is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Vercel across development, preview, and production environments with scoped secrets.

When should I use Vercel Multi Env Setup?

Vercel Multi Env Setup fits situations like: setting up per-environment configuration; managing environment-specific variables; implementing environment isolation on Vercel; with phrases like vercel environments.

How do I install Vercel Multi Env Setup in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-multi-env-setup -a claude-code`. Or copy the skill folder (skills/.curated/vercel-multi-env-setup in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/vercel-multi-env-setup in your project. Claude Code loads it when a task matches its description.

How do I install Vercel Multi Env Setup in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-multi-env-setup -a codex`. Or copy the skill folder (skills/.curated/vercel-multi-env-setup in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/vercel-multi-env-setup in your project. Codex loads it when a task matches its description.

Can I use Vercel Multi Env Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-multi-env-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vercel-multi-env-setup, .gemini/skills/vercel-multi-env-setup, .github/skills/vercel-multi-env-setup and .opencode/skills/vercel-multi-env-setup in your project.

What does Vercel Multi Env Setup need to run?

Going by SKILL.md and its folder, Vercel Multi Env Setup needs the command-line tools its instructions call (vercel, curl and jq) and credentials named VERCEL_TOKEN. Our summary lists: A credential in VERCEL_TOKEN. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(vercel:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Vercel Multi Env Setup access the network?

SKILL.md names 2 domains. In commands or code: api.vercel.com; the agent is likely to contact it when it follows the instructions. As links in the text: vercel.com. This is read from the text; nothing was executed.

Is Vercel Multi Env Setup safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Vercel Multi Env Setup use?

Vercel Multi Env Setup is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vercel Multi Env Setup use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 429 tokens, read only when the agent opens those files.

What are the alternatives to Vercel Multi Env Setup?

Skills that share tags, products or a category with Vercel Multi Env Setup: Env Vars (vercel/vercel-plugin, 301 stars), Env Manager (bobmatnyc/claude-mpm, 155 stars), Vercel CLI (nanocoai/nanoclaw, 31k stars) and Phase 9 Deployment (ww-w-ai/bkit-claude-code, 601 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vercel Multi Env Setup?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.