Loading...
Loading...
Validates .env files and environment variable configurations against project requirements. Checks for missing required variables, type mismatches, insecure defaults, unreferenced variables, and common configuration errors. Compares .env against .env.example, code references, and deployment manifests. Produces a structured validation report with severity-ranked findings. Triggers on: "validate env file", "check environment variables", "env file audit", "missing env vars", "env validation", "check .env", "environment config check", "validate configuration", "env file review", "dotenv validation". Use this skill when verifying environment configuration completeness and correctness before deployment or after onboarding. NOT for secret scanning (use repo-sentinel or secret-scanner). NOT for general config file editing (use filesystem skill).
npx skill4agent add mathews-tom/armory env-validator.env| File | Contents | Load When |
|---|---|---|
| Built-in validation rules and severity definitions | Always |
.env.env.exampledocker-compose.yml.env.env.local.env.development.env.production.env.example.env.templateos.environprocess.envenv::varos.Getenvdocker-compose.ymlDockerfilek8s/${VAR}ENV VAR| Field | Source |
|---|---|
| Name | Variable name (e.g., |
| Required | Present in code references or marked required in example |
| Type hint | Inferred from usage (URL, integer, boolean, string, path) |
| Default | Value in |
| Used in | List of files that reference this variable |
.env.env.env.example.envPORT=abcint(os.environ["PORT"])DEBUG=yestruefalseSECRET_KEY=changemePASSWORD=passwordAPI_KEY=xxxDEBUG=trueDEBUG=1.envKEY=VALUEreferences/validation-rules.md# Environment Validation Report
**File:** `.env`
**Schema:** `.env.example` + code references
**Verdict:** PASS | FAIL
## Summary
| Severity | Count |
|----------|-------|
| CRITICAL | N |
| HIGH | N |
| MEDIUM | N |
| LOW | N |
## CRITICAL
### [ENV-001] Missing required variable: DATABASE_URL
- **Referenced in:** `src/db.py:12`, `docker-compose.yml:8`
- **Expected type:** URL (postgresql://...)
- **Fix:** Add `DATABASE_URL=postgresql://user:pass@localhost:5432/dbname` to `.env`
## HIGH
...
## Unreferenced Variables
| Variable | In .env | In Code | In Manifests | Status |
|-----------------|---------|---------|--------------|--------------|
| LEGACY_API_KEY | Yes | No | No | Unreferenced |
## Recommendations
1. [Highest priority fix]
2. [Second fix]| Error | Resolution |
|---|---|
| No .env file found | Report absence; check for alternative env sources |
| No .env.example or schema | Validate based on code references only |
| Binary or very large .env | Skip; report as unsupported format |
| No code references found | Validate format and security only; skip completeness |