env-setup
Installation
SKILL.md
Env Setup
Scan the codebase for environment variable usage, generate or update .env.example, validate .env completeness, and detect leaked secrets.
Anti-Hallucination Guidelines
Only report variables that are actually found in the code:
- Grep before reporting: Never invent variable names; only list what grep actually returns
- Read .env.example before writing: Preserve existing entries; only add/update what changed
- No actual secrets:
.env.examplemust only contain placeholder values (e.g.,your_api_key_here) - Verify .gitignore: Actually read the file before claiming
.envis ignored - Never echo a found secret value: when Phase 6 flags a leaked secret, report the variable name and
file:lineonly. Never print, quote, or write the actual value into chat output, a report file, or anywhere else: the scan's job is to locate leaks, not to create a second one.
Workflow
Phase 1: Scan Codebase
Grep for environment variable usage matching the project's actual language/framework: see references/scan-patterns.md for the ready-to-run pattern per language (Node/TS, Python, Ruby, Rust, Java/Kotlin, Docker Compose, client-exposed prefixes). Only run the pattern(s) for stacks present in the repo.