env-config-validator

Validate .env files for secrets, URLs, API keys, and variable scoping.

6|Updated Nov 11, 2025
One-click install
npx skills add https://github.com/hopeoverture/worldbuilding-app-skills --skill env-config-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-config-validator
Source: https://github.com/hopeoverture/worldbuilding-app-skills/tree/main/skills/development/env-config-validator
Command: npx skills add https://github.com/hopeoverture/worldbuilding-app-skills --skill env-config-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Validates environment configuration files such as .env and NEXT_PUBLIC_* variables across local, staging, and production environments. Ensures required secrets, database URLs, API keys, and public variables are properly scoped and set. Detects exposed secrets and weak values to prevent production incidents.

Core Features & Use Cases

  • Validate environment files (local, staging, production)
  • Check scoping of NEXT_PUBLIC_* vs private vars
  • Detect exposed secrets and weak values
  • Cross-environment auditing against a template

Quick Start

Run the provided Python script to validate your current .env file or compare environments:

  • python scripts/validate_env.py

Frequently Asked Questions about env-config-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate environment variables across different environments?

Environment variable validation checks that required secrets, API keys, and database URLs are correctly configured across local, staging, and production .env files. Run the provided Python script to audit variables for presence, proper scoping (NEXT_PUBLIC_ vs private), and secure values, receiving structured reports with severity levels and fix suggestions.

What's the difference between NEXT_PUBLIC_ variables and private environment variables?

NEXT_PUBLIC_ variables are exposed to the browser and safe for public data; private variables remain server-side only. The validator enforces this scoping, detecting when secrets or sensitive configuration are incorrectly marked as public, preventing accidental exposure in Next.js and Node.js projects.

Can I detect exposed secrets and weak values in my .env files?

Yes, the validator scans environment files to identify exposed secrets, weak or missing credentials, and misconfigured values. It flags issues by category and severity, cross-references against environment templates, and suggests fixes to prevent production incidents.

How do I check if my .env files are consistent across environments?

The validator performs cross-environment auditing by comparing .env, .env.local, and .env.production files against a template, verifying required variables exist in each environment and that naming conventions and scoping rules are applied consistently.

Does environment validation work with Next.js projects?

Yes, the validator is built for Next.js and Node.js projects, parsing .env variants including .env.local and .env.production, enforcing NEXT_PUBLIC_ scoping conventions, and validating the full configuration pipeline for both frameworks.

What should I do before running environment validation?

Ensure your .env files exist in the project root, define which variables are required for your application, and optionally create a .env.template or schema file to validate against. The validator then checks presence, format, and cross-environment consistency.