env-config-validator

Validate .env files against schemas, compare environments (dev vs prod), detect common mistakes (trailing spaces, placeholders, invalid ports, missing protocols, duplicate keys, unquoted spaces), auto-generate schemas, and type-check values. Supports text, JSON, and markdown output with CI-friendly exit codes. Use when asked to validate environment config, check .env files for errors, compare env files, diff environments, detect env misconfigurations, generate env schema, audit .env variables, check for missing env vars, or ensure env consistency across environments. Triggers on "validate env", "check .env", "compare environments", "env diff", "env schema", "env audit", "missing env vars", "environment config".

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "env-config-validator" with this command: npx skills add charlie-morrison/env-config-validator

Env Config Validator

Validate .env files, compare environments, detect common mistakes, and enforce schemas.

Quick Start

# Validate with auto-detected common checks
python3 scripts/validate_env.py .env

# Validate against a schema
python3 scripts/validate_env.py .env --schema env-schema.json

# Compare dev vs prod
python3 scripts/validate_env.py --diff .env.development .env.production

# Generate schema from existing .env
python3 scripts/validate_env.py --generate-schema .env -o env-schema.json

# JSON output for CI
python3 scripts/validate_env.py .env --output json --severity error

Common Checks (Auto-Detected)

The validator automatically detects these issues without a schema:

CheckSeverityWhat it catches
Trailing whitespacewarningInvisible chars causing bugs
Unquoted spaceswarningValues with spaces not wrapped in quotes
Placeholderserrorchange_me, TODO, xxx, your_* values
Empty valuesinfoDefined but blank variables
Double-nested quoteswarning""value"" quoting errors
URL missing protocolwarningURL vars without http(s)://
Port out of rangeerrorPort > 65535 or < 1
Short secretswarningSECRET/PASSWORD/KEY < 8 chars
Inconsistent booleansinfoyes/1 instead of true/false
Mixed case keysinfosome_Var instead of SOME_VAR
Inline commentswarningvalue # comment (not all parsers support)
Duplicate keyswarningSame variable defined twice

Options

FlagDefaultDescription
--schemaJSON schema file for type/required validation
--diff FILE FILECompare two env files
--generate-schemaAuto-generate schema from .env file
--outputtextOutput format: text, json, markdown
-ostdoutOutput file path
--ignoreSkip specific check IDs (repeatable)
--severityinfoMinimum severity: error, warning, info

Exit Codes

  • 0 — No issues (or only info)
  • 1 — Warnings found (or diff has differences)
  • 2 — Errors found

Workflow

Pre-deploy Validation

  1. Generate schema from working .env: --generate-schema .env -o schema.json
  2. Add schema to repo, validate in CI: validate_env.py .env --schema schema.json --severity error
  3. Diff staging vs prod: --diff .env.staging .env.production

Audit Existing Project

  1. Run validate_env.py .env to find common mistakes
  2. Fix errors and warnings
  3. Generate schema for future validation

References

  • schema-format.md — Full JSON schema specification, supported types, field reference

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Spicy Ai Video

Turn a 60-second talking head clip into 1080p high-energy edited videos just by typing what you need. Whether it's turning bland footage into visually intens...

Registry SourceRecently Updated
Coding

Video Maker Fast

Get polished MP4 videos ready to post, without touching a single slider. Upload your video clips (MP4, MOV, AVI, WebM, up to 500MB), say something like "trim...

Registry SourceRecently Updated
Coding

Generation Generator

generate text prompts or clips into AI generated videos with this skill. Works with MP4, MOV, PNG, JPG files up to 500MB. marketers, content creators, social...

Registry SourceRecently Updated
Coding

Editor On Android

Get edited MP4 clips ready to post, without touching a single slider. Upload your video clips (MP4, MOV, AVI, WebM, up to 500MB), say something like "trim th...

Registry SourceRecently Updated