audit-env-variables

Audit environment variables in JavaScript/TypeScript projects and generate a Markdown ENV_AUDIT report.

1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/hbvg234/jnmt.vn --skill audit-env-variables
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-env-variables
Source: https://github.com/hbvg234/jnmt.vn/tree/main/.claude/skills/audit-env-variables
Command: npx skills add https://github.com/hbvg234/jnmt.vn --skill audit-env-variables

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes environment variables in JavaScript and TypeScript projects to identify unused entries, infer permissions, detect service keys (Stripe, AWS, Supabase, etc.), map their usage paths, and generate a comprehensive security-focused report. Includes optional cleanup with safe rollback and regression checks to prevent production issues.

Core Features & Use Cases

  • Discovery: Locate all .env* and environment declarations across the repository.
  • Usage Mapping: Correlate declared vars with code references and file contexts.
  • Service & Permissions: Detect service keys and infer permission implications for risk assessment.
  • Report & Compliance: Produce a structured ENV_AUDIT markdown report suitable for audits.
  • Optional Cleanup: Safe removal of unused vars with backups and regression validation.

Quick Start

Audit all environment files (.env*) and code references, map usage, and generate a markdown ENV_AUDIT report.

Frequently Asked Questions about audit-env-variables

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

FAQPage Schema
How do I find unused environment variables in a JavaScript or TypeScript project?

To find unused environment variables in a JavaScript or TypeScript project, audit your .env files and code references. This process maps declared variables to their actual usage, highlighting unused entries for potential safe cleanup.

How do I detect service keys and infer permissions for environment variables?

Detecting service keys and inferring permissions for environment variables involves analyzing variable names and usage paths across your codebase. This identifies keys like Stripe or AWS and assesses their risk implications for a security audit.

Can I automatically remove unused .env declarations without breaking my application?

You can remove unused .env declarations safely by generating backups and running regression checks. This validates that the cleanup of unused variables does not introduce production issues or break existing code paths.

What is the best way to generate a security audit report for environment variables?

The best way to generate a security audit report for environment variables is to map their usage and infer permissions automatically. This produces a structured Markdown report detailing declared, used, and undeclared variables for compliance review.

Does the environment variable audit work with both .env files and code declarations?

Yes, the environment variable audit works with both .env files and code declarations. It locates all .env* files and environment declarations across the repository, correlating them with code references to determine which variables are actively used.