Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
girijashankarj avatar

Env File Generator

  • 1 installs
  • 27 repo stars
  • Updated April 25, 2026
  • girijashankarj/cursor-handbook

Scans source for process.env references and generates a complete .env.example with documentation and safe placeholder values.

About

Scans the codebase for environment variable references and produces a documented .env.example with safe placeholders. A developer uses it to audit env var usage or keep .env.example complete.

  • Finds all process.env.* references in source
  • Emits documented, safe placeholder values

Env File Generator by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #1,172 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Jul 22, 2026 (Skillselion catalog sync)
npx skills add https://github.com/girijashankarj/cursor-handbook --skill env-file-generator

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars27
Last updatedApril 25, 2026
Repositorygirijashankarj/cursor-handbook

What it does

Scans source for process.env references and generates a complete .env.example with documentation and safe placeholder values.

Files

SKILL.mdMarkdownGitHub ↗

Skill: Env File Generator

Scan source code for process.env.* references and produce a comprehensive .env.example with documentation and safe placeholder values.

Trigger

When the user asks to create .env.example, audit environment variables, or ensure all required env vars are documented.

Prerequisites

  • [ ] Access to project source code
  • [ ] Knowledge of which env vars are required vs optional

Steps

Step 1: Scan for Environment Variable References

  • [ ] Search for process.env. patterns across source files
  • [ ] Search for os.environ / os.getenv (Python projects)
  • [ ] Search for System.getenv (Java projects)
  • [ ] Check existing config loader files for env var mappings
  • [ ] Check Docker/compose files for environment: and ${VAR} references
  • [ ] Check CI/CD config for required secrets

Step 2: Catalog Variables

For each variable found:

  • [ ] Name (e.g., DB_PASSWORD)
  • [ ] Where it's used (file and line)
  • [ ] Whether it has a default value in code
  • [ ] Whether it's required (no default, throws if missing)
  • [ ] Data type (string, number, boolean, URL)
  • [ ] Category (database, auth, cloud, feature flags, etc.)

Step 3: Classify Sensitivity

LevelExamplesPlaceholder Format
SecretDB_PASSWORD, JWT_SECRET, API_KEYyour-secret-here
InfrastructureDB_HOST, REDIS_URL, S3_BUCKETlocalhost / descriptive example
ConfigPORT, LOG_LEVEL, NODE_ENVActual default value
FeatureENABLE_FEATURE_X, MAX_RETRIEStrue / false / number

Step 4: Generate .env.example

# ============================================
# {{CONFIG.project.name}} Environment Variables
# ============================================
# Copy this file to .env and fill in the values
# NEVER commit .env to version control
# ============================================

# ---------------------
# Application
# ---------------------
NODE_ENV=development
PORT=3000
LOG_LEVEL=info

# ---------------------
# Database
# ---------------------
DB_HOST=localhost
DB_PORT=5432
DB_NAME={{CONFIG.project.name}}
DB_USERNAME=your-db-username
DB_PASSWORD=your-db-password

# ---------------------
# Authentication
# ---------------------
JWT_SECRET=your-jwt-secret-min-32-chars
JWT_EXPIRY=15m

# ---------------------
# Cloud / AWS
# ---------------------
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key

# ---------------------
# External Services
# ---------------------
# REDIS_URL=redis://localhost:6379
# SMTP_HOST=smtp.example.com

Step 5: Cross-Reference

  • [ ] Compare with existing .env.example (if any) to find new/removed vars
  • [ ] Check .gitignore includes .env (add if missing)
  • [ ] Verify config validation code matches the env var list
  • [ ] Flag any env vars in code that are NOT in .env.example

Step 6: Generate Validation Code (Optional)

const required = ['DB_PASSWORD', 'JWT_SECRET'] as const;
for (const key of required) {
  if (!process.env[key]) {
    throw new Error(`Missing required environment variable: ${key}`);
  }
}

Step 7: Output

  • [ ] Present .env.example content
  • [ ] List any discrepancies (vars in code but not in example, or vice versa)
  • [ ] Note which vars are required at startup

Rules

  • NEVER put real secret values in .env.example
  • ALWAYS use safe placeholder values (your-xxx-here, localhost, defaults)
  • ALWAYS include comments explaining each section
  • ALWAYS verify .env is in .gitignore
  • Group variables by category with section headers
  • Mark optional variables with comments (prefix with #)
  • Include type hints in comments where ambiguous

Completion

Complete .env.example with all environment variables, grouped by category, with safe placeholders and documentation.

If a Step Fails

  • Too many vars (>50): Group by service/module, add a table of contents comment
  • Dynamic env var names: Flag for manual review (e.g., process.env[varName])
  • Can't determine required vs optional: Default to required, flag for user review
  • Existing .env.example out of date: Show diff of changes (added/removed vars)

Related skills

DevOps & CI/CDbackenddevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.