sync-env

Scan TypeScript/JavaScript code for process.env usage and report missing or unused keys against .env.example.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/SumitRajpal/nextjs-claude-architecture --skill sync-env-sumitrajpal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sync-env
Source: https://github.com/SumitRajpal/nextjs-claude-architecture/tree/main/.claude/skills/sync-env
Command: npx skills add https://github.com/SumitRajpal/nextjs-claude-architecture --skill sync-env-sumitrajpal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps environment configuration aligned by comparing code references of environment variables with .env.example, surfacing missing and unused keys.

Core Features & Use Cases

  • Scan code for process.env usages across .ts, .tsx, and .js files, building a comprehensive list of env var names
  • Compare discovered keys against .env.example to identify missing definitions and stale entries
  • Generate a patch-ready plan or diff-like summary to guide updates to the template and code

Quick Start

Run the sync-env skill to scan your repository for process.env usages and generate an updated .env.example with placeholders for new keys.

Frequently Asked Questions about sync-env

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

FAQPage Schema
How do I find missing environment variables in my TypeScript project?▼

Skill sync-env scans .ts, .tsx, and .js files for process.env references and compares them against .env.example to surface missing definitions and stale entries, generating a patch-ready summary.

How do I check if my .env.example is out of sync with my codebase?▼

Compare process.env usages across .ts, .tsx, and .js files with .env.example to identify missing definitions and stale entries, producing a diff-like summary to guide template updates.

Can I detect unused environment variables in a JavaScript codebase?▼

Scan .ts, .tsx, and .js files for process.env usages and compare against .env.example to identify unused template entries and missing definitions, generating a patch-ready plan.

Does this environment variable scanner work with React and TypeScript files?▼

The scan targets TypeScript/JavaScript projects, scanning src/ and common entry points across .ts/.tsx/.js files for process.env references, then comparing them to .env.example.

What is the best way to generate a .env.example from existing code?▼

Scan process.env references across .ts/.tsx/.js files, compare against .env.example, and generate an updated template with placeholders for newly discovered keys to keep configuration aligned.

Why are my environment variables undefined after updating the dotenv config?▼

Scan process.env references in .ts/.tsx/.js files and compare against .env.example to surface missing definitions, preventing undefined variables and generating a patch-ready plan to update the template.