skills/env-setup/SKILL.md
Discover the environment variables a codebase actually reads, generate or update a grouped .env.example template, validate that required variables are set, and keep secrets out of git. Use when setting up environment variables for a project, scaffolding .env templates, validating an existing .env file, documenting required configuration, or checking that .gitignore covers env files. Backs the /env command.
npx skillsauth add shipshitdev/library env-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Make a project's environment configuration explicit: find every variable the
code reads, keep .env.example truthful, verify the developer's real .env
satisfies it, and make sure no secret file can reach git.
Inputs:
setup (default, discover + scaffold + validate),
validate (check only), or scaffold (regenerate templates only).Outputs:
.env.example, missing/unset required variables, and any .gitignore holes.Creates/Modifies:
setup/scaffold: creates or updates .env.example (and per-app templates
in a monorepo). May add missing .env* rules to .gitignore..env/.env.local — it reports
what is missing there and leaves the values to the developer.External Side Effects:
Confirmation Required:
.env.example that has hand-written comments
or values the scan did not produce..env.example after configuration drift.env satisfies what the code requires.gitignore keeps secret env files out of gitScan the codebase for environment reads:
grep -rEoh "(process\.env|import\.meta\.env)(\.[A-Z0-9_]+|\[['\"][A-Z0-9_]+['\"]\])" \
--include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" \
--include="*.mjs" --include="*.cjs" \
--exclude-dir=node_modules --exclude-dir=dist --exclude-dir=build \
--exclude-dir=.next --exclude-dir=coverage . \
| grep -oE "[A-Z0-9_]{2,}" | sort -u
Treat that grep as a starting inventory, never as the answer. It knows one
language family (JS/TS) and two syntaxes (process.env.X and
process.env["X"], plus the import.meta.env equivalents). It cannot see a
variable read through a helper (getEnv("STRIPE_KEY")), a destructure
(const { DATABASE_URL } = process.env), a dynamic key, or a non-JS service in
the same repo — Python os.environ, Go os.Getenv, Dockerfiles, CI workflows.
Exclusions are directory-scoped (--exclude-dir) because filtering grep -oh
output by path is impossible: -o prints only the matched text and -h
suppresses the filename, so a downstream grep -v node_modules matches nothing
and silently filters nothing.
Widen the sweep by hand from there: framework config (next.config.*,
nest-cli.json, deploy config), schema-based env validation modules
(zod/valibot env files), container and CI definitions, and existing .env*
files. In a monorepo, inventory per app/package — apps often need different
variables. Report the inventory as "found by scan + found by hand", so a reader
can see what the automated pass could not cover.
Create or update .env.example from the inventory. Group by service with a
comment header per group, placeholder values only — never a real credential:
# Application
NODE_ENV=development
PORT=3001
# Database
DATABASE_URL=postgresql://user:password@host:5432/dbname
# Authentication
AUTH_SECRET=...
# Monitoring
SENTRY_DSN=https://...
For monorepos, write per-app templates when apps diverge. Preserve existing hand-written comments; confirm before overwriting anything the scan did not produce. Document any variable whose purpose is not obvious from its name.
.env.example; every template
variable is actually read somewhere (flag dead entries)..env (if present) sets every required variable; report gaps
without printing secret values..gitignore must cover .env, .env.local, and every .env.* variant
except .env.example (which must be committed).git ls-files '.env*' should return
only templates. A tracked secret file is a finding to surface — removing it
from history belongs to git-safety, not this skill.State the mode that ran, variables discovered (per app where relevant),
template files created or updated, validation gaps, and any .gitignore or
tracked-secret findings.
development
Coordinates a weekly engineering review of board accuracy, recent code changes, operational health, and scoped cleanup. Use for a recurring repository health review or a review of the last several days.
testing
Audits project board configuration and prepares explicitly requested setup, copy, or normalization changes while preserving the existing workflow and provider boundaries. Use when inspecting a board's fields, columns, scope, or configuration.
testing
Reconciles a project board with current work and delivery evidence, reports incomplete coverage and metadata gaps, and applies only approved provider-supported field changes. Use when auditing board drift, reviewing blocked work, or assessing upcoming delivery.
development
Walk through how a subsystem works. Use for "how does X work", code walkthroughs before changing something, and placement or ownership questions. Explains architecture, runtime flow, and onboarding mental models. Can critique architecture. Use why for motivation.