greglas75/zuvo/env-audit

Claude Code and agent skill by greglas75/zuvo

Trust tier 1
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Environment variable and configuration audit. 8 dimensions (ENV1-ENV8): variable completeness, unused vars, startup validation, secret exposure, environment parity, type safety, default values, and documentation. Supports Node.js (.env/process.env), Python (os.environ/settings), and framework-specific patterns (Vite import.meta.env, Next.js NEXT_PUBLIC_). Switches: zuvo:env-audit full | [path] | --secrets-only | --parity

Install

npx vskill@latest install greglas75/zuvo/env-audit

SKILL.md

The same SKILL.md was published earlier as greglas75/zuvo/env-audit.

zuvo:env-audit

Audit environment variable management for completeness, safety, and consistency across development, staging, and production environments. Single-pass execution.

When to use: After adding new env vars, before production deploy, when debugging config-related incidents, onboarding new environments, periodic check. When NOT to use: Secret scanning in source code (/security-audit), CI pipeline config (zuvo:ci-audit), infrastructure (/security-audit).

Mandatory File Loading

Read every file below before starting. Print the checklist.

CORE FILES LOADED:
1. ../../shared/includes/codesift-setup.md -- [READ | MISSING -> STOP]
2. ../../shared/includes/env-compat.md -- [READ | MISSING -> STOP]
3. ../../shared/includes/run-logger.md -- [READ | MISSING -> STOP]
4. ../../shared/includes/retrospective.md -- [READ | MISSING -> STOP]

If any file is MISSING, STOP. Do not proceed from memory.


Argument Parsing

TokenBehavior
_(empty)_ or fullAll 8 dimensions, scope = project root
[path]Scope to a directory (monorepo package, module)
--secrets-onlyENV4 only -- focus on secret exposure
--parityENV5 only -- compare environment configurations

Safety Gates

GATE 1 -- Read-Only

This audit is read-only. The only write target is zuvo/audits/.

FORBIDDEN:

  • Modifying any .env, config, or source file
  • Creating or deleting environment variables
  • Accessing external secret managers (analyze config references only)
GATE 2 -- PII and Secret Censorship

When including env var values in the report:

  • Replace actual values with ***
  • Show only variable names, never values
  • Exception: .env.example placeholder values can be shown as-is

MANDATORY TOOL CALLS — Env Audit Validity Gate

INVALID if any tool below is skipped. "DEFERRED", "N/A", "--secrets-only" NOT valid reasons.

ToolTriggerSkip allowed?
scan_secretsAlwaysNO — KEY: ENV4 secret exposure
search_textAlwaysNO — process.env / os.environ / import.meta.env scan
search_patternsAlwaysNO — ENV2/ENV3/ENV6 anti-patterns
find_referencesAlwaysNO — ENV2 unused detection
audit_scanAlwaysNO — compound check

Forbidden: scan_secrets: skipped, codesift: unavailable (when deferred), retrospective: skipped — all REJECTED.

POSTAMBLE: report on disk → retro appended → ~/.zuvo/append-runlog exit 0. Every ENV finding needs path/to/file.ext:LINE (verify-audit gate).

Mandatory-tools-acknowledgment: I will run scan_secrets + search_text + search_patterns + find_references + audit_scan for this env audit. Every ENV finding will cite a `path/to/file.ext:LINE` resolving in the current tree.

Use the deterministic preload helper FIRST. Run ~/.zuvo/compute-preload env-audit "$PWD". Copy [CodeSift matching trace] verbatim, issue printed ToolSearch(query="select:..."). Math gate enforced.


Phase 0: Detect and Scope

0.1 Target Resolution

Set TARGET_ROOT from arguments. All subsequent commands use this path.

0.2 Stack Detection

Detect which env access patterns to search for:

SignalStackAccess Pattern
package.jsonNode.jsprocess.env.VAR, process.env['VAR']
vite.config.*Viteimport.meta.env.VITE_VAR
next.config.*Next.jsprocess.env.NEXT_PUBLIC_VAR (client-safe)
requirements.txt, pyproject.tomlPythonos.environ['VAR'], os.getenv('VAR'), os.environ.get('VAR')
wrangler.tomlCloudflare Workersenv.VAR (binding)
docker-compose.*Docker Composeenvironment: / env_file: directives
0.3 Variable Name Extraction

Build a comprehensive inventory by scanning code for all env access patterns detected in 0.2. Collect unique variable names (not values).

0.4 Inventory

Cross-reference all sources:

  1. Variables defined in .env* files (names only)
  2. Variables accessed in code (from extraction)
  3. Variables in Docker Compose, CI config, or cloud deployment files

Print:

ENV VAR INVENTORY
------------------------------------
Target: [TARGET_ROOT]
Config sources: [.env, .env.example, .env.local, ...]
Stack: [Node.js / Python / Vite / Next.js]
Vars defined: [N]
Vars used in code: [N]
------------------------------------

Phase 1: Dimension Analysis (ENV1-ENV8)

Single-pass inline execution. No sub-agents required.

ENV1: Variable Completeness -- Weight 15, Max 15, Critical Gate

Are all required env vars defined and documented?

CheckGoodBadSeverity
Code vs example coverageAll used vars listed in .env.exampleVar used in code but missing from .env.exampleCRITICAL
Required vars guardedStartup fails fast on missing required varApp starts, crashes later when var accessedCRITICAL
.env.example existsYes, with all vars and placeholder valuesNo .env.example at allHIGH
Stale varsNo vars in .env.example that are unused in codeAccumulated dead configMEDIUM

Detection approach: Compare the set of variables found in code against the set defined in .env.example. Report both directions: used-but-undocumented and documented-but-unused.

Critical gate: no .env.example OR multiple critical vars undocumented → triggers FAIL. The gate fires on that FINDING; an ENV1 score of 0 also fires it but is not required.

ENV2: Unused Variables -- Weight 5, Max 5
CheckGoodBadSeverity
Defined but never usedAll defined vars referenced in codeStale vars accumulateMEDIUM
Dead config sectionsRemoved features cleaned upConfig references removed featuresLOW

Detection approach: Check each var in .env.example against code access patterns. A var referenced only in comments or documentation counts as unused.

ENV3: Startup Validation -- Weight 15, Max 15, Critical Gate

Does the app fail fast on missing or invalid configuration?

CheckGoodBadSeverity
Schema validationZod/Joi/Pydantic/envalid validates all vars at startupNo validation, raw access everywhereCRITICAL
Fail-fast behaviorApp throws before serving requests on missing varStarts, breaks when var first accessedCRITICAL
Type coercionParsed and validated (parseInt, Number, schema)Port used as string in numeric contextHIGH

What to search for:

  • Validation libraries: z.object, Joi.object, BaseSettings, envalid,

envsafe, convict, cleanEnv, ConfigModule, @IsString

  • Fail-fast patterns: throw with env/config message, process.exit on

missing env

  • Raw usage: process.env.VAR without validation wrapper
  • NestJS: ConfigModule.forRoot() with validationSchema

Critical gate: no validation anywhere → triggers FAIL. The gate fires on that FINDING; an ENV3 score of 0 also fires it but is not required.

ENV4: Secret Exposure -- Weight 15, Max 15, Critical Gate
CheckGoodBadSeverity
.env in .gitignore.env and .env.local listed in .gitignore.env committed to repositoryCRITICAL
Client-side exposureOnly NEXT_PUBLIC_/VITE_ vars are non-sensitiveAPI keys in NEXT_PUBLIC_* variablesCRITICAL
Hardcoded secretsSecrets only in env vars or secret managerAPI keys hardcoded in config filesCRITICAL
Docker image leakage.env listed in .dockerignore.env copied into Docker imageHIGH
Git historyNo .env files in git historyPast .env commits (secrets may still be in history)HIGH

Detection approach:

  • Check .gitignore for .env patterns
  • git ls-files for committed .env files
  • Search for NEXT_PUBLIC_*KEY, NEXT_PUBLIC_*SECRET, VITE_*KEY etc.
  • Search for hardcoded secrets: (api_key|secret|password|token)\s*[:=]\s*['"][^'"{}$]

excluding test/mock/example files

  • Check .dockerignore for .env

Critical gate: secrets committed or API keys in client-side vars → triggers FAIL. The gate fires on that FINDING; an ENV4 score of 0 also fires it but is not required.

ENV5: Environment Parity -- Weight 10, Max 10

Are dev/staging/production environments consistent?

CheckGoodBadSeverity
Same var set across envsAll environments define the same variablesProd has vars dev lacksHIGH
Docker Compose alignmentdocker-compose env matches app configDocker sets vars not in .env.exampleMEDIUM
Feature flag documentationFeature flags documented per environmentUndocumented per-env behaviorMEDIUM

Detection approach: Compare variable sets across all .env* files found at the target root. Check Docker Compose environment: sections against the .env.example inventory.

ENV6: Type Safety -- Weight 8, Max 8
CheckGoodBadSeverity
Central config moduleTyped config with validated accessorsRaw process.env.X scattered across 50+ filesHIGH
Boolean parsing=== 'true' or schema-parsedif (process.env.FLAG) (any string is truthy)HIGH
Number parsingparseInt with NaN check or schemaPort used as stringMEDIUM
Access centralization< 3 files access process.env directly20+ files with raw env accessMEDIUM

Detection approach: Count per-file occurrences of raw env access. Search for boolean truthy gotchas (if (process.env.VAR)). Check for number conversion patterns.

ENV7: Default Values -- Weight 7, Max 7
CheckGoodBadSeverity
Dev-friendly defaultsPORT ?? 3000 for local developmentApp crashes without complete .envMEDIUM
No secret defaultsSecret vars always required, no fallbackJWT_SECRET ?? 'default-secret'CRITICAL
Documented defaults.env.example shows which vars have defaultsDeveloper cannot tell required vs optionalLOW

Detection approach:

  • Search for ?? and || operators after env access (Node.js)
  • Search for os.getenv('VAR', 'default') patterns (Python)
  • Flag any default on SECRET/KEY/PASSWORD/TOKEN variables
ENV8: Documentation -- Weight 5, Max 5
CheckGoodBadSeverity
Inline commentsEach var in .env.example has a comment explaining purposeBare variable names onlyMEDIUM
Required vs optionalMarked with # Required / # Optional (default: 3000)No indication which vars are neededMEDIUM
Setup instructionsREADME covers env setupNew developer has to guessLOW

Phase 2: Scoring

ENV1 = [0-15] Variable Completeness (critical gate)
ENV2 = [0-5] Unused Variables
ENV3 = [0-15] Startup Validation (critical gate)
ENV4 = [0-15] Secret Exposure (critical gate)
ENV5 = [0-10] Environment Parity
ENV6 = [0-8] Type Safety
ENV7 = [0-7] Default Values
ENV8 = [0-5] Documentation

Score = sum / 80 x 100

Critical gates — any ONE of these findings triggers FAIL, whatever the numeric score:

GateFires on
ENV1no .env.example, OR multiple critical vars undocumented
ENV3no startup validation anywhere
ENV4any secret committed to the repo, OR an API key in a client-side (NEXT_PUBLIC_/VITE_) var, OR a hardcoded secret

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
8
7-day trend score
11

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/greglas75/zuvo/env-audit/badge)](https://verified-skill.com/skills/greglas75/zuvo/env-audit)

Something wrong with this skill or its page? Tell us.