← ClaudeAtlas

configuration-validatorlisted

Validates environment variables, config files, and ensures all required settings are documented. Use when working with .env files, configs, or deployment settings.
aiskillstore/marketplace · ★ 329 · Data & Documents · score 82
Install: claude install-skill aiskillstore/marketplace
# Configuration Validator Validates configuration files and environment variables to prevent runtime errors and missing settings. ## When to Use - Working with environment variables or config files - Deployment or configuration issues - User mentions ".env", "config", "environment variables", or "settings" ## Instructions ### 1. Find Configuration Files Search for: - `.env`, `.env.example`, `.env.local` - `config/`, `config.js`, `config.json` - `settings.py`, `application.yml` - `appsettings.json`, `.env.production` ### 2. Detect Missing Variables **Compare .env.example vs .env:** ```bash # Variables in example but not in .env comm -23 <(grep -o '^[A-Z_]*' .env.example | sort) <(grep -o '^[A-Z_]*' .env | sort) ``` **Common required variables:** ``` DATABASE_URL API_KEY SECRET_KEY NODE_ENV PORT ``` ### 3. Validate Variable Format **Check for common issues:** ```javascript // Missing quotes for values with spaces DATABASE_URL=postgres://localhost/db name // Bad DATABASE_URL="postgres://localhost/db name" // Good // Missing protocol API_URL=example.com // Bad API_URL=https://example.com // Good // Boolean as string DEBUG=true // Might be interpreted as string DEBUG=1 // More explicit ``` ### 4. Validate Required Variables at Runtime **Node.js example:** ```javascript const requiredEnvVars = [ 'DATABASE_URL', 'API_KEY', 'JWT_SECRET' ]; const missing = requiredEnvVars.filter(v => !process.env[v]); if (missing.length > 0) { throw new Error(`Missing re