home / skills / andrelandgraf / fullstackrecipes / env-workflow-vercel

env-workflow-vercel skill

/.agents/skills/env-workflow-vercel

This skill helps you manage environment variables across Vercel environments, syncing with the Vercel CLI and handling local overrides.

npx playbooks add skill andrelandgraf/fullstackrecipes --skill env-workflow-vercel

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
573 B
---
name: env-workflow-vercel
description: Manage environment variables across Vercel environments. Sync with Vercel CLI, handle local overrides, and load env vars in scripts.
---

# Environment Variable Management with Vercel

To set up Environment Variable Management with Vercel, refer to the fullstackrecipes MCP server resource:

**Resource URI:** `recipe://fullstackrecipes.com/env-workflow-vercel`

If the MCP server is not configured, fetch the recipe directly:

```bash
curl -H "Accept: text/plain" https://fullstackrecipes.com/api/recipes/env-workflow-vercel
```

Overview

This skill manages environment variables across Vercel environments and local development. It syncs variables with the Vercel CLI, supports local overrides, and provides a predictable way to load env vars into runtime scripts. Use it to keep production, preview, and development values consistent and auditable.

How this skill works

The skill inspects and synchronizes environment variables between your local files and Vercel projects using the Vercel CLI API. It can push and pull env vars for specific environments (production, preview, development), detect differences, and apply local overrides safely. It also exposes a loader that injects the resolved variables into scripts or build steps so your processes run with the correct values.

When to use it

  • Setting or updating environment variables for production, preview, and development in Vercel
  • Keeping local .env files in sync with Vercel deployments
  • Automating env var changes as part of CI/CD pipelines
  • Providing per-environment overrides for secrets and feature flags
  • Loading env variables reliably in build or runtime scripts

Best practices

  • Keep a minimal canonical list of keys tracked by the sync to avoid accidental deletions
  • Store secrets only in Vercel or a secrets manager; use local overrides for non-sensitive development values
  • Use the Vercel CLI with a service account or CI token to automate syncing from CI/CD safely
  • Review changes before pushing to production: use the preview sync path for testing
  • Commit no secret values to source control; commit example .env files or template keys only

Example use cases

  • Syncing updated API keys from local staging to Vercel preview environments before a QA release
  • Automating environment promotion: pull dev vars, update safe keys, and push to production via CI
  • Providing team members with a local .env.override file that never syncs back to Vercel
  • Loading configuration into a startup script so server processes read the same values during local and deployed runs
  • Detecting drift between Vercel and local environment variables and generating a diff report for review

FAQ

Can this skill handle secret rotation without downtime?

Yes. Rotate secrets using the preview environment first, validate behavior, then push to production. The skill supports staged rollouts and atomic updates via the Vercel CLI.

How are local overrides protected from accidental upload?

Local override files are excluded from automatic pushes by default. The workflow requires explicit commands to push overrides, and templates encourage ignoring override files in source control.