env-variable-management

Synchronizes environment variables across code, SST config, workflows, and GitHub secrets.

2|Updated Apr 9, 2023
One-click install
npx skills add https://github.com/Esdeveniments/esdeveniments-frontend --skill env-variable-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-variable-management
Source: https://github.com/Esdeveniments/esdeveniments-frontend/tree/main/.github/skills/env-variable-management
Command: npx skills add https://github.com/Esdeveniments/esdeveniments-frontend --skill env-variable-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically ensures environment variables are kept in sync across code, SST config, deployment workflows, and GitHub secrets to prevent production failures.

Core Features & Use Cases

  • Synchronize a new environment variable across code, SST, workflows, and secrets when introducing it in a project.
  • Enforce a required vs optional pattern for environment variables and provide a pragmatic checklist to avoid runtime crashes.
  • Support auditing and documenting changes to environment configuration in one centralized skill file.

Quick Start

Identify the new variable in code (where process.env.VAR_NAME is used), update the SST environment block, modify the deploy-sst.yml to propagate the secret, add the corresponding GitHub repository secret, and validate the changes in CI and local development.

Frequently Asked Questions about env-variable-management

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

FAQPage Schema
How do I synchronize environment variables across SST config, GitHub workflows, and repository secrets?

To keep environment variables in sync, you must update process.env references in code, the SST environment block, the deploy-sst.yml workflow, and GitHub repository secrets. This ensures consistent configuration across all four deployment locations.

Why does my Next.js SST deployment fail with missing environment variables in production?

Missing environment variables in production occur when new variables are added to code but not propagated across SST config, deploy workflows, and GitHub secrets. Enforcing a required vs optional pattern and validating changes prevents these runtime crashes.

What is the best way to add a new environment variable to a Next.js SST project?

Identify the new variable where process.env.VAR_NAME is used in code, update the SST environment block, modify deploy-sst.yml to propagate the secret, add the GitHub repository secret, then validate the changes in CI and local development.

Does this environment variable management approach support required vs optional patterns?

Yes, this approach enforces a required vs optional pattern for environment variables. It provides a pragmatic checklist to validate that required variables exist across code, SST config, deploy workflows, and GitHub secrets to avoid runtime crashes.

Can I use this skill to audit existing environment configuration in my SST deployment?

Yes, you can use it to audit and document changes to environment configuration in one centralized skill file. It verifies that variables remain consistent across code, SST config, workflows, and GitHub repository secrets.