Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Env Var and Config Validator: .env Drift and Typed Config

    1

    Find .env drift between code, .env.example and deploys, secrets leaked via NEXT_PUBLIC_/VITE_, unsafe defaults, then add fail-fast typed config. VALID / DRIFTED / UNSAFE.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Env Var and Config Validator: .env Drift and Typed Config

    Env Var and Config Validator: .env Drift and Typed Config

    Example session with this skill installed

    Our Next.js app plus a Python worker keeps breaking on deploy because of missing env vars, and I'm worried something secret is exposed to the browser. Audit our config and set up proper validation.

    • Read your context and instructions
    • Compiled the env var
    • Generated the UI component

    Config audit: shop-platform (2026-10-19)

    Verdict: UNSAFE - 1 secret exposed to the browser, 1 unsafe default; 9 drift findings. Fixed in code on branch fix/env-config; 2 actions need you.
    Stack: Next.js 15, Python 3.12 worker, deploys: Vercel (web), Fly.io (worker), GitHub Actions.
    Counts: 31 variables read in code, 24 in .env.example, 12 findings.

    Findings (names only, no values)

    VariableCodeWhereFix
    NEXT_PUBLIC_STRIPE_SECRET_KEYCLIENT-SECRETweb/lib/pay.ts:8Moved call to a server action; renamed STRIPE_SECRET_KEY
    JWT_SECRETUNSAFE-DEFAULTworker/auth.py:12 (getenv("JWT_SECRET", "secret"))Required; startup fails if missing
    RESEND_API_KEYMISSING-EXAMPLE, MISSING-DEPLOY (Fly)worker/mail.py:4Added to example; set on Fly
    SENTRY_DSNMISSING-EXAMPLEweb/sentry.server.config.ts:3Added
    FEATURE_CHECKOUT_V2UNTYPEDweb/app/cart/page.tsx:15Parsed as strict boolean
    PORTUNTYPEDworker/main.py:30int with 1-65535 check
    LEGACY_S3_BUCKET + 5 moreSTALE-EXAMPLE.env.exampleRemoved
    NEXT_PUBLIC_API_URLBUILD-TIMEwebDocumented: needs rebuild per environment
    (process.env in 14 files)SCATTEREDweb/**Replaced with imports from web/src/env.ts

    Changes made

    • web/src/env.ts using @t3-oss/env-nextjs: 18 server and 4 client variables, build fails on missing or invalid names
    • worker/config.py using pydantic-settings: 9 variables, typed
    • .env.example regenerated: 25 variables, grouped, placeholders only
    • CI: python3 scripts/env_inventory.py . --check added to the lint job

    Action list for you (not done by me)

    Rotate the Stripe secret key now. It was shipped in client bundles since the commit on 2026-09-02. Then set STRIPE_SECRET_KEY in Vercel (Production + Preview).
    2. Set on Fly (worker): RESEND_API_KEY, JWT_SECRET.
    3. Not visible to me: Vercel dashboard-only variables. Compare them with the new .env.example.

    Next steps

    Merge after rotating, redeploy web and worker, confirm both boot (startup validation will name anything still missing).

    page.tsx

    TSX · React component

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A deploy fails at 2 AM because a new environment variable was never added to production. A new teammate needs a Slack thread to get the app running. A Stripe secret ends up in the browser bundle because someone gave it a NEXT_PUBLIC_ prefix. process.env.DEBUG is "false", which JavaScript treats as true. Config problems are boring until they take the site down or leak a key.

    This skill gives your coding agent a complete config audit and a bundled inventory script that works with variable names only, never values. It:

    • Inventories every variable your code reads across JS/TS (process.env, import.meta.env, Deno, Bun), Python, Go, Rust, Ruby and PHP, and compares them with .env.example
    • Checks CI and deploy declarations: GitHub Actions, docker-compose, Dockerfile, Kubernetes and Helm, Vercel/Netlify/Render/Fly config, Terraform
    • Flags each variable with a clear code: MISSING-EXAMPLE, STALE-EXAMPLE, MISSING-DEPLOY, CLIENT-SECRET, UNSAFE-DEFAULT, UNTYPED, SCATTERED, COMMITTED, BUILD-TIME
    • Knows the client-exposure rules for Next.js, Vite, SvelteKit, Nuxt, Astro, Expo, Gatsby and CRA, including build-time inlining
    • Adds one typed config module that fails fast at startup with Zod, t3-env, envalid, pydantic-settings or your stack's equivalent, with a clean server/client split
    • Regenerates .env.example with grouped, commented, safe placeholders
    • Adds a CI check so a new variable without documentation fails the build
    • Gives a verdict: VALID, DRIFTED or UNSAFE, plus a names-only action list of what to set in each environment and what to rotate

    For developers and teams with more than one environment, a growing list of third-party keys, or onboarding pain.

    Safety and honesty: it never prints, copies or summarizes secret values, not even partially. It does not edit real .env files or deploy settings, and it does not rewrite git history. If a real secret is committed, it stops and tells you to rotate it first. It lists the platforms it could not see (such as dashboard-only variables) instead of guessing.

    Dashboard-only variables on hosting platforms are not visible from the repo and are listed as not checked. Dynamically constructed variable names cannot be found by static scan. Secret rotation and git history cleanup are left to you.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 28 days ago

    Requires

    Git
    Python 3.8+

    Permissions

    Environment Variables
    Write Files
    Terminal / Shell
    Read Files
    Listed28 days ago

    What's inside

    Frequently Asked Questions

    Any agent that supports the SKILL.md standard, including Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI.

    SKILL.md with the audit procedure, finding codes, verdict rules and report format; a stack guide covering client-exposed prefixes and validation libraries per framework; and a Python script that inventories variable names in your code and compares them with .env.example (with a --check mode for CI).

    It works with variable names only. The bundled script never reads values from real .env files, and the skill is instructed never to print, copy or summarize secret values, even partially.

    Next.js, Vite (React, Vue, Svelte), SvelteKit, Nuxt, Astro, Expo, Gatsby and Create React App for client exposure, plus Node, Deno, Bun, Python, Django, Go, Rust, Ruby and PHP for reading variables.

    No. It writes code changes (config module, .env.example, CI check) and gives you a names-only list of what to set in each environment and what to rotate.

    Variables set only in hosting dashboards are not visible in the repo, so they are listed as not checked. Dynamically built variable names (for example process.env[prefix + name]) cannot be detected statically and are flagged for manual review.

    New in Code Quality & Review