# Environment variables setup (/utils--env-setup)

/utils--env-setup is a Claude Code skill in the Code section. Finds every environment variable your code uses and generates a .env.example, a validation schema and a config module that fails fast.

- Web version: https://skills.sgomez.dev/en/s/utils--env-setup
- Section: [Code](https://skills.sgomez.dev/en/code.md)
- Author: Santiago Gómez de la Torre
- License: MIT
- Source: https://github.com/sgomez-dev/claude-skills/blob/main/skills/utils/env-setup.md
- Updated 26 Mar 2026

## How to ask for it

- `/utils--env-setup create a .env.example file for my Next.js project`
- `/utils--env-setup add validation for required environment variables`
- `/utils--env-setup help me separate dev and production env vars`

## Install

macOS · Linux:

```
curl -fsSL https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.sh | bash
```

Windows:

```
irm https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.ps1 | iex
```

Claude Code plugin:

```
/plugin marketplace add sgomez-dev/claude-skills
/plugin install utility-skills@claude-skills-collection
```

## Permissions

- Reads: `**/*`
- Writes: `.env.example`, `**/*`
- Runs: —
- Network: No
- Destructive: No

## Author's description

Set up environment variables with .env files and validation

## Pairs well with

- [Project-specific skills setup (/meta--skills-init)](https://skills.sgomez.dev/en/s/meta--skills-init.md): Scans your project, detects its tech stack and activates only the relevant skills, saving the choice as a project configuration file.
- [Tailored .gitignore file (/utils--gitignore)](https://skills.sgomez.dev/en/s/utils--gitignore.md): Detects your project languages, frameworks and tools, then writes a commented .gitignore, merging with any existing one.
- [tsconfig.json setup (/utils--tsconfig)](https://skills.sgomez.dev/en/s/utils--tsconfig.md): Generates or tunes tsconfig.json for a backend, frontend, library or monorepo, with strict mode and an explanation of the settings.
- [ESLint setup (/utils--eslint-config)](https://skills.sgomez.dev/en/s/utils--eslint-config.md): Generates or tunes your ESLint config for TypeScript, React or Node, with rules, ignores, lint scripts and a pre-commit hook.
- [Production-ready Dockerfile (/devops--dockerfile)](https://skills.sgomez.dev/en/s/devops--dockerfile.md): Generates or optimizes a multi-stage Dockerfile for your project, with a minimal image, layer caching and a non-root user.
- [GitHub Actions workflows (/devops--github-actions)](https://skills.sgomez.dev/en/s/devops--github-actions.md): Generates GitHub Actions workflows for CI, CD, auto-labeling and other automation in your repository.
- Recipe: [/pipeline--new-project](https://github.com/sgomez-dev/claude-skills/blob/main/pipelines/new-project.yaml): New Project Setup

- [How we review this](https://skills.sgomez.dev/en/methodology.md)
