Analyze environment variables in JavaScript/TypeScript projects. Identifies unused variables, infers permission scopes, detects specific services (Stripe, AWS, Supabase), and documents code paths. Includes optional cleanup of unused variables with regression detection.
SkillScore64Maintained
Automatic
◆Coding pack
Last verified 8/13/2026
What it changes
Passed 13 of 21 test cases with the skill, and 10 of 21 without it.
Without skill45%
With skill64%
Checks it passed that the model alone missed
The Git branch name starts with the env-cleanup/ prefix.
The cleanup procedure forbids removing variables from .env.example.
High-risk administrative keys are assigned a Critical permission level.
and 3 more in the full report
6 fixed8 passed either way6 still failing2 broke
Pass-rate lift
+18 pp
Tokens
+72%
Agent turns
0%
Response time
-60%
Model gemini-3.6-flashMeasured 8/13/2026v114 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
When removing unreferenced keys from `.env` and `.env.local` files, what directory path prefix should be used to store timestamped backups of the original configuration files?
What was checked, without and with the skill
Checked
Without skill
With skill
Backup copies of configuration files are stored inside subdirectories of .env-backups/.
Missed
Passed
case-08 · gemini-3.6-flash · 8/13/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md387 lines3 files
Discovery - Find all env files and code references
Usage Analysis - Identify which variables are used vs unused
Service Detection - Recognize services (Stripe, AWS, Supabase, etc.) and their permission implications
Code Path Mapping - Document where each variable is used in the codebase
Report Generation - Output a structured markdown document
Cleanup (optional) - Safely remove unused variables with user confirmation
Regression Prevention - Validate no regressions via build/test validation with automatic rollback
<quick_start>
Audit only (default):
Scan for .env* files in project root
Grep codebase for process.env., import.meta.env., and destructured env patterns
Cross-reference declared vs used variables
Identify services by naming patterns and categorize permissions
Generate markdown report using the template
With cleanup (--cleanup flag):
6. Check for dynamic access patterns that might hide usage
7. Present unused variables and get user confirmation
8. Create backups, remove confirmed variables
9. Run build/tests to detect regressions
10. Auto-rollback if regressions detected
</quick_start>