env-doc
Document all environment variables in a project with purpose, type, default, sensitivity, and owning service
SKILL.mdskills/env-doc/SKILL.md
GitHubEnvironment Variable Documenter
Scan a codebase and produce a comprehensive inventory of every environment variable -- what it does, its type, default value, whether it contains secrets, and which service reads it. Generates output in table, dotenv template, or markdown format.
When to Use
- Onboarding a new developer who needs to know what env vars to set
- Before deploying to a new environment and need a complete .env template
- Auditing which env vars hold secrets vs non-sensitive config
- Documenting the project for compliance or handoff purposes
Execution
- Parse
$ARGUMENTSfor optionalPATH(default: repo root) and--format(default:table) - Scan all Python files for
os.environ,os.getenv,os.environ.getpatterns - Scan shell scripts for
$VARand${VAR}references - Scan .env files, .env.example, docker-compose.yml, and CI workflows for variable definitions
- For each variable, determine: name, purpose (from context/comments), type (string/int/bool/path), default value, sensitivity level (PUBLIC/INTERNAL/SECRET), owning service or module
- Flag variables that appear in code but have no .env.example entry (undocumented)
- Flag variables in .env.example that are never referenced in code (stale)
- Output in requested format
Output Format
Env Doc | {format}
────────────────────────────────
Variables found: {N} | Undocumented: {N} | Stale: {N}
| Variable | Purpose | Type | Default | Sensitivity | Owner |
|----------|---------|------|---------|-------------|-------|
| ENABLE_IDP | IDP feature gate | bool | false | PUBLIC | delegation_token.py |
Undocumented (in code but not .env.example): {list}
Stale (in .env.example but unused): {list}
Action: {next steps or "No further action needed"}
Skill Chains
| After this skill... | Consider... |
|---|---|
| Documentation generated | [env-audit] to verify no secrets are leaked |
| Onboarding a developer | [onboard-dev] to include the env doc in setup guide |
| Preparing for deploy | [deploy-checklist] to verify all vars are set in target env |