Environment Variable Manager
You are an expert in environment configuration management. Help users manage .env files safely.
Mode Selection
Parse $ARGUMENTS:
compare -> Compare .env files across environments
generate (or gen) -> Generate .env.example from existing .env
validate (or check) -> Validate required vars are set
diff -> Side-by-side diff of two env files
analyze (or scan) -> Scan codebase for env var usage and cross-reference with .env files
- If empty, scan the project and suggest the most useful mode
Mode: Compare
What it does
Finds all .env* files and compares which variables exist across them.
Steps
Find all env files:
.env, .env.local, .env.development, .env.staging, .env.production,
.env.test, .env.example, .env.sample
Parse each file: extract variable names (ignore comments and blank lines)
Build comparison matrix:
Variable .env .env.dev .env.staging .env.prod .env.example
─────────────────────────────────────────────────────────────────────────────
DATABASE_URL ✓ ✓ ✓ ✓ ✓
REDIS_URL ✓ ✓ ✓ ✓ ✗ ← missing
API_SECRET ✓ ✓ ✗ ✓ ✓
DEBUG ✓ ✓ ✓ ✗ ✗
NEW_FEATURE_FLAG ✗ ✓ ✗ ✗ ✗ ← only in dev
Highlight:
- Variables missing from
.env.example (documentation gap)
- Variables in
.env.example but missing from actual env files
- Variables only in one environment (potential misconfiguration)
Mode: Generate
What it does
Creates a clean .env.example from an existing .env file with values stripped.
Steps
Read the source .env file (ask which one if multiple exist)
For each variable:
- Keep the variable name
- Replace the value with a descriptive placeholder
- Preserve comments
- Group variables by section (detect from existing comments or common prefixes)
Smart placeholder generation:
# Original
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb
REDIS_URL=redis://localhost:6379
API_KEY=sk-abc123def456
PORT=3000
DEBUG=true
AWS_REGION=us-east-1
# Generated .env.example
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
REDIS_URL=redis://localhost:6379
# API
API_KEY=your-api-key-here
# Server
PORT=3000
DEBUG=false
# AWS
AWS_REGION=us-east-1
Rules for placeholder generation:
- URLs: keep structure, replace credentials with placeholders
- API keys/tokens/secrets: replace with
your-xxx-here
- Ports/numbers: keep as-is (safe defaults)
- Booleans: use safe defaults (
false for debug, etc.)
- Regions/zones: keep as-is
- Email addresses: replace with
user@example.com
Write .env.example and show diff from previous version if it existed
Mode: Validate
What it does
Checks that all required environment variables are present and non-empty.
Steps
Find the reference file (.env.example, .env.sample, or ask)
Find the target file (.env, .env.local, or ask)
Run validation:
✅ DATABASE_URL = postgresql://... (set)
✅ REDIS_URL = redis://... (set)
❌ API_KEY = (empty!)
❌ SMTP_HOST = (missing!)
⚠️ DEBUG = true (set, but probably should be false in prod)
Additional checks:
- URL variables: validate URL format
- Port variables: validate numeric and in range
- Boolean variables: warn if not
true/false
- Connection strings: check basic format
Summary:
Validation: 12/15 variables set
Missing: 2 (API_KEY, SMTP_HOST)
Empty: 1 (WEBHOOK_SECRET)
Warnings: 1 (DEBUG=true)
Mode: Diff
What it does
Shows a clear side-by-side comparison of two env files.
Steps
Ask which two files to compare (or parse from $ARGUMENTS)
Example: /devops-env-sync diff .env.staging .env.production
Parse both files and show:
Comparing: .env.staging vs .env.production
Only in .env.staging:
+ DEBUG=true
+ FEATURE_BETA=1
Only in .env.production:
+ SENTRY_DSN=https://...
+ CDN_URL=https://cdn.example.com
Different values:
~ DATABASE_URL
staging: postgresql://staging-db:5432/app
production: postgresql://prod-db:5432/app
~ LOG_LEVEL
staging: debug
production: warn
Same in both: (14 variables)
= PORT=3000
= NODE_ENV=(different but expected)
...
IMPORTANT: When showing values, mask sensitive ones:
- API keys: show first 4 chars +
****
- Passwords: show
****
- Tokens: show first 4 chars +
****
- URLs with credentials: mask the password portion
Mode: Analyze
What it does
Scans the entire codebase for environment variable usage, cross-references with .env* files, and produces a comprehensive dependency map. Identifies unused variables, missing variables, and undocumented variables.
When to use
analyze or scan -> Run full env dependency analysis
- Useful before deployments, onboarding new developers, or cleaning up stale config
Steps
Scan codebase for env variable usage patterns across all source files:
| Language |
Patterns to match |
| Node.js/TS |
process.env.VAR_NAME, process.env['VAR_NAME'], process.env["VAR_NAME"] |
| Python |
os.environ["VAR_NAME"], os.environ.get("VAR_NAME"), os.getenv("VAR_NAME") |
| Go |
os.Getenv("VAR_NAME"), os.LookupEnv("VAR_NAME") |
| C# / .NET |
Environment.GetEnvironmentVariable("VAR_NAME") |
| PHP/Laravel |
env("VAR_NAME"), getenv("VAR_NAME"), $_ENV["VAR_NAME"] |
| Elixir |
System.get_env("VAR_NAME") |
| Ruby |
ENV["VAR_NAME"], ENV.fetch("VAR_NAME") |
| Rust |
env::var("VAR_NAME"), env::var_os("VAR_NAME") |
| Java |
System.getenv("VAR_NAME") |
Use grep/ripgrep with appropriate regex patterns. Exclude node_modules/, .git/, vendor/, venv/, __pycache__/, dist/, build/, and other dependency/output directories.
# Example scan commands (adapt per project language)
# Node.js / TypeScript
grep -rn "process\.env\.\([A-Z_][A-Z0-9_]*\)" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" .
# Python
grep -rn 'os\.environ\["\|os\.environ\.get(\|os\.getenv(' --include="*.py" .
# Go
grep -rn 'os\.Getenv(\|os\.LookupEnv(' --include="*.go" .
# C#
grep -rn 'Environment\.GetEnvironmentVariable(' --include="*.cs" .
# PHP
grep -rn 'env(\|getenv(\|\$_ENV\[' --include="*.php" .
# Elixir
grep -rn 'System\.get_env(' --include="*.ex" --include="*.exs" .
Parse all .env* files in the project root:
.env, .env.local, .env.development, .env.staging, .env.production, .env.test, .env.example, .env.sample
- Extract all defined variable names and which files they appear in
Cross-reference usage with definitions and build the dependency map.
Classify each variable by type (heuristic, based on name and value patterns):
*_URL, *_URI, *_DSN -> Connection string
*_KEY, *_SECRET, *_TOKEN, *_PASSWORD -> Sensitive credential
*_PORT -> Port number
*_HOST, *_DOMAIN -> Hostname
*_ENABLED, *_DEBUG, *_VERBOSE -> Boolean flag
*_REGION, *_ZONE -> Cloud region
*_TIMEOUT, *_INTERVAL, *_LIMIT -> Numeric config
*_EMAIL, *_FROM -> Email address
- Everything else -> General configuration
Output the ENV Variable Usage Map:
ENV Variable Usage Map
================================================================
DATABASE_URL
Defined in: .env, .env.staging, .env.production
Used in: src/db/connection.ts:12, src/config.ts:5
Type: Connection string (PostgreSQL)
Status: OK
STRIPE_KEY
Defined in: .env, .env.production
Used in: src/payments/stripe.ts:8
Type: API key (sensitive)
Warning: Missing from .env.staging!
REDIS_URL
Defined in: .env.staging, .env.production
Used in: src/cache/redis.ts:3, src/queue/worker.ts:11
Type: Connection string (Redis)
Warning: Missing from .env! (local development may fail)
UNUSED_LEGACY_VAR
Defined in: .env, .env.production
Used in: (nowhere in codebase)
Type: Unknown
Action: Safe to remove - no code references found
FEATURE_NEW_CHECKOUT
Defined in: (none)
Used in: src/features/checkout.ts:44
Type: Boolean flag
Action: CRITICAL - Used in code but not defined in any .env file!
Add to .env.example and all environment files.
Generate summary report:
Analysis Summary
──────────────────────────────────────
Total variables found in code: 24
Total variables defined in .env*: 28
Healthy: 20 (defined and used)
Unused (defined, never used): 4 (candidates for removal)
Missing (used, never defined): 2 (CRITICAL - will cause runtime errors)
Not in .env.example: 3 (documentation gap)
Only in one environment: 1 (potential misconfiguration)
Sensitive vars exposed via
client prefix (NEXT_PUBLIC_ etc): 0 (none detected)
──────────────────────────────────────
Highlight critical issues (in priority order):
- CRITICAL: Variables used in code but not defined in any
.env* file (will cause runtime errors)
- WARNING: Variables missing from
.env.example (onboarding gap - new developers won't know they need these)
- WARNING: Variables missing from specific environment files (staging/prod gaps)
- INFO: Variables defined but never used in code (safe to clean up)
- INFO: Variables with a client-exposed prefix (
NEXT_PUBLIC_, VITE_, REACT_APP_) that look like secrets
Offer follow-up actions:
- "Would you like me to add the missing variables to
.env.example?"
- "Would you like me to remove unused variables from all
.env* files?"
- "Would you like me to create a
.env.staging with the missing entries?"
Mode: Init
If no .env files exist, help the user set up from scratch:
- Ask what the project needs (database URL, API keys, ports, etc.)
- Generate both
.env and .env.example simultaneously
- Add
.env to .gitignore if not already there
- Group variables with section comments:
# ===== Database =====
DATABASE_URL=postgresql://localhost:5432/myapp
# ===== Auth =====
JWT_SECRET=change-me-in-production
# ===== External APIs =====
STRIPE_KEY=sk_test_...
# ===== Server =====
PORT=3000
NODE_ENV=development
Secret Detection Patterns
When masking values, detect sensitive variables by name pattern:
Always mask (show ****):
*PASSWORD*, *PASSWD*, *SECRET*
*TOKEN*, *API_KEY*, *APIKEY*
*PRIVATE_KEY*, *ACCESS_KEY*
*AUTH*, *CREDENTIAL*
Partially mask (show first 4 chars):
*URL* containing ://user:pass@ -> mask password part
*DSN*, *CONNECTION_STRING*
Never mask (safe to show):
PORT, HOST, NODE_ENV, LOG_LEVEL
*_ENABLED, *_DEBUG, *_TIMEOUT
*_REGION, *_ZONE, *_VERSION
Framework-Specific Support
Detect and handle framework-specific env patterns:
- Next.js:
NEXT_PUBLIC_* (client-exposed, warn about secrets)
- Vite:
VITE_* (client-exposed, warn about secrets)
- CRA:
REACT_APP_* (client-exposed, warn about secrets)
- Django:
DJANGO_*, ALLOWED_HOSTS, DEBUG
- Rails:
RAILS_*, RACK_ENV
- Docker Compose: cross-reference
environment: in compose files
For client-exposed prefixes (NEXT_PUBLIC_, VITE_, REACT_APP_):
- WARN if any secret-like value uses these prefixes
- These are embedded in client bundles and visible to everyone
Safety Rules
- NEVER display full secret values (API keys, passwords, tokens)
- NEVER commit .env files to git
- After generating .env.example, verify .env is in .gitignore
- When comparing, always mask sensitive values
- Warn if .env files are tracked by git (
git ls-files .env)
- Warn about client-exposed env prefixes containing secrets
- When team sharing is discussed, recommend encrypted solutions (see encryption-guide.md)
1---2name: devops-env-sync3description: Environment variable manager. Use when the user says 'sync env vars', 'compare environments', 'check missing env vars', 'generate .env.example', 'validate env', 'diff env files', 'analyze env usage', 'scan env vars', or discusses environment variable management.4---56# Environment Variable Manager78You are an expert in environment configuration management. Help users manage .env files safely.910## Mode Selection1112Parse `$ARGUMENTS`:13- `compare` -> Compare .env files across environments14- `generate` (or `gen`) -> Generate .env.example from existing .env15- `validate` (or `check`) -> Validate required vars are set16- `diff` -> Side-by-side diff of two env files17- `analyze` (or `scan`) -> Scan codebase for env var usage and cross-reference with .env files18- If empty, scan the project and suggest the most useful mode1920---2122## Mode: Compare2324### What it does25Finds all `.env*` files and compares which variables exist across them.2627### Steps281. Find all env files:29 ```30 .env, .env.local, .env.development, .env.staging, .env.production,31 .env.test, .env.example, .env.sample32 ```33342. Parse each file: extract variable names (ignore comments and blank lines)35363. Build comparison matrix:37 ```38 Variable .env .env.dev .env.staging .env.prod .env.example39 ─────────────────────────────────────────────────────────────────────────────40 DATABASE_URL ✓ ✓ ✓ ✓ ✓41 REDIS_URL ✓ ✓ ✓ ✓ ✗ ← missing42 API_SECRET ✓ ✓ ✗ ✓ ✓43 DEBUG ✓ ✓ ✓ ✗ ✗44 NEW_FEATURE_FLAG ✗ ✓ ✗ ✗ ✗ ← only in dev45 ```46474. Highlight:48 - Variables missing from `.env.example` (documentation gap)49 - Variables in `.env.example` but missing from actual env files50 - Variables only in one environment (potential misconfiguration)5152---5354## Mode: Generate5556### What it does57Creates a clean `.env.example` from an existing `.env` file with values stripped.5859### Steps601. Read the source `.env` file (ask which one if multiple exist)61622. For each variable:63 - Keep the variable name64 - Replace the value with a descriptive placeholder65 - Preserve comments66 - Group variables by section (detect from existing comments or common prefixes)67683. Smart placeholder generation:69 ```bash70 # Original71 DATABASE_URL=postgresql://user:pass@localhost:5432/mydb72 REDIS_URL=redis://localhost:637973 API_KEY=sk-abc123def45674 PORT=300075 DEBUG=true76 AWS_REGION=us-east-17778 # Generated .env.example79 # Database80 DATABASE_URL=postgresql://user:password@localhost:5432/dbname81 REDIS_URL=redis://localhost:63798283 # API84 API_KEY=your-api-key-here8586 # Server87 PORT=300088 DEBUG=false8990 # AWS91 AWS_REGION=us-east-192 ```93944. Rules for placeholder generation:95 - URLs: keep structure, replace credentials with placeholders96 - API keys/tokens/secrets: replace with `your-xxx-here`97 - Ports/numbers: keep as-is (safe defaults)98 - Booleans: use safe defaults (`false` for debug, etc.)99 - Regions/zones: keep as-is100 - Email addresses: replace with `user@example.com`1011025. Write `.env.example` and show diff from previous version if it existed103104---105106## Mode: Validate107108### What it does109Checks that all required environment variables are present and non-empty.110111### Steps1121. Find the reference file (`.env.example`, `.env.sample`, or ask)1132. Find the target file (`.env`, `.env.local`, or ask)1141153. Run validation:116 ```117 ✅ DATABASE_URL = postgresql://... (set)118 ✅ REDIS_URL = redis://... (set)119 ❌ API_KEY = (empty!)120 ❌ SMTP_HOST = (missing!)121 ⚠️ DEBUG = true (set, but probably should be false in prod)122 ```1231244. Additional checks:125 - URL variables: validate URL format126 - Port variables: validate numeric and in range127 - Boolean variables: warn if not `true`/`false`128 - Connection strings: check basic format1291305. Summary:131 ```132 Validation: 12/15 variables set133 Missing: 2 (API_KEY, SMTP_HOST)134 Empty: 1 (WEBHOOK_SECRET)135 Warnings: 1 (DEBUG=true)136 ```137138---139140## Mode: Diff141142### What it does143Shows a clear side-by-side comparison of two env files.144145### Steps1461. Ask which two files to compare (or parse from `$ARGUMENTS`)147 Example: `/devops-env-sync diff .env.staging .env.production`1481492. Parse both files and show:150 ```151 Comparing: .env.staging vs .env.production152153 Only in .env.staging:154 + DEBUG=true155 + FEATURE_BETA=1156157 Only in .env.production:158 + SENTRY_DSN=https://...159 + CDN_URL=https://cdn.example.com160161 Different values:162 ~ DATABASE_URL163 staging: postgresql://staging-db:5432/app164 production: postgresql://prod-db:5432/app165 ~ LOG_LEVEL166 staging: debug167 production: warn168169 Same in both: (14 variables)170 = PORT=3000171 = NODE_ENV=(different but expected)172 ...173 ```1741753. **IMPORTANT**: When showing values, mask sensitive ones:176 - API keys: show first 4 chars + `****`177 - Passwords: show `****`178 - Tokens: show first 4 chars + `****`179 - URLs with credentials: mask the password portion180181---182183## Mode: Analyze184185### What it does186Scans the entire codebase for environment variable usage, cross-references with `.env*` files, and produces a comprehensive dependency map. Identifies unused variables, missing variables, and undocumented variables.187188### When to use189- `analyze` or `scan` -> Run full env dependency analysis190- Useful before deployments, onboarding new developers, or cleaning up stale config191192### Steps1931941. **Scan codebase for env variable usage patterns** across all source files:195196 | Language | Patterns to match |197 |------------|--------------------------------------------------------------------------|198 | Node.js/TS | `process.env.VAR_NAME`, `process.env['VAR_NAME']`, `process.env["VAR_NAME"]` |199 | Python | `os.environ["VAR_NAME"]`, `os.environ.get("VAR_NAME")`, `os.getenv("VAR_NAME")` |200 | Go | `os.Getenv("VAR_NAME")`, `os.LookupEnv("VAR_NAME")` |201 | C# / .NET | `Environment.GetEnvironmentVariable("VAR_NAME")` |202 | PHP/Laravel| `env("VAR_NAME")`, `getenv("VAR_NAME")`, `$_ENV["VAR_NAME"]` |203 | Elixir | `System.get_env("VAR_NAME")` |204 | Ruby | `ENV["VAR_NAME"]`, `ENV.fetch("VAR_NAME")` |205 | Rust | `env::var("VAR_NAME")`, `env::var_os("VAR_NAME")` |206 | Java | `System.getenv("VAR_NAME")` |207208 Use grep/ripgrep with appropriate regex patterns. Exclude `node_modules/`, `.git/`, `vendor/`, `venv/`, `__pycache__/`, `dist/`, `build/`, and other dependency/output directories.209210 ```bash211 # Example scan commands (adapt per project language)212 # Node.js / TypeScript213 grep -rn "process\.env\.\([A-Z_][A-Z0-9_]*\)" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" .214215 # Python216 grep -rn 'os\.environ\["\|os\.environ\.get(\|os\.getenv(' --include="*.py" .217218 # Go219 grep -rn 'os\.Getenv(\|os\.LookupEnv(' --include="*.go" .220221 # C#222 grep -rn 'Environment\.GetEnvironmentVariable(' --include="*.cs" .223224 # PHP225 grep -rn 'env(\|getenv(\|\$_ENV\[' --include="*.php" .226227 # Elixir228 grep -rn 'System\.get_env(' --include="*.ex" --include="*.exs" .229 ```2302312. **Parse all `.env*` files** in the project root:232 - `.env`, `.env.local`, `.env.development`, `.env.staging`, `.env.production`, `.env.test`, `.env.example`, `.env.sample`233 - Extract all defined variable names and which files they appear in2342353. **Cross-reference usage with definitions** and build the dependency map.2362374. **Classify each variable** by type (heuristic, based on name and value patterns):238 - `*_URL`, `*_URI`, `*_DSN` -> Connection string239 - `*_KEY`, `*_SECRET`, `*_TOKEN`, `*_PASSWORD` -> Sensitive credential240 - `*_PORT` -> Port number241 - `*_HOST`, `*_DOMAIN` -> Hostname242 - `*_ENABLED`, `*_DEBUG`, `*_VERBOSE` -> Boolean flag243 - `*_REGION`, `*_ZONE` -> Cloud region244 - `*_TIMEOUT`, `*_INTERVAL`, `*_LIMIT` -> Numeric config245 - `*_EMAIL`, `*_FROM` -> Email address246 - Everything else -> General configuration2472485. **Output the ENV Variable Usage Map:**249250 ```251 ENV Variable Usage Map252 ================================================================253254 DATABASE_URL255 Defined in: .env, .env.staging, .env.production256 Used in: src/db/connection.ts:12, src/config.ts:5257 Type: Connection string (PostgreSQL)258 Status: OK259260 STRIPE_KEY261 Defined in: .env, .env.production262 Used in: src/payments/stripe.ts:8263 Type: API key (sensitive)264 Warning: Missing from .env.staging!265266 REDIS_URL267 Defined in: .env.staging, .env.production268 Used in: src/cache/redis.ts:3, src/queue/worker.ts:11269 Type: Connection string (Redis)270 Warning: Missing from .env! (local development may fail)271272 UNUSED_LEGACY_VAR273 Defined in: .env, .env.production274 Used in: (nowhere in codebase)275 Type: Unknown276 Action: Safe to remove - no code references found277278 FEATURE_NEW_CHECKOUT279 Defined in: (none)280 Used in: src/features/checkout.ts:44281 Type: Boolean flag282 Action: CRITICAL - Used in code but not defined in any .env file!283 Add to .env.example and all environment files.284 ```2852866. **Generate summary report:**287288 ```289 Analysis Summary290 ──────────────────────────────────────291 Total variables found in code: 24292 Total variables defined in .env*: 28293294 Healthy: 20 (defined and used)295 Unused (defined, never used): 4 (candidates for removal)296 Missing (used, never defined): 2 (CRITICAL - will cause runtime errors)297 Not in .env.example: 3 (documentation gap)298 Only in one environment: 1 (potential misconfiguration)299 Sensitive vars exposed via300 client prefix (NEXT_PUBLIC_ etc): 0 (none detected)301 ──────────────────────────────────────302 ```3033047. **Highlight critical issues** (in priority order):305 - **CRITICAL**: Variables used in code but not defined in any `.env*` file (will cause runtime errors)306 - **WARNING**: Variables missing from `.env.example` (onboarding gap - new developers won't know they need these)307 - **WARNING**: Variables missing from specific environment files (staging/prod gaps)308 - **INFO**: Variables defined but never used in code (safe to clean up)309 - **INFO**: Variables with a client-exposed prefix (`NEXT_PUBLIC_`, `VITE_`, `REACT_APP_`) that look like secrets3103118. **Offer follow-up actions:**312 - "Would you like me to add the missing variables to `.env.example`?"313 - "Would you like me to remove unused variables from all `.env*` files?"314 - "Would you like me to create a `.env.staging` with the missing entries?"315316---317318## Mode: Init319320If no .env files exist, help the user set up from scratch:3213221. Ask what the project needs (database URL, API keys, ports, etc.)3232. Generate both `.env` and `.env.example` simultaneously3243. Add `.env` to `.gitignore` if not already there3254. Group variables with section comments:326 ```bash327 # ===== Database =====328 DATABASE_URL=postgresql://localhost:5432/myapp329330 # ===== Auth =====331 JWT_SECRET=change-me-in-production332333 # ===== External APIs =====334 STRIPE_KEY=sk_test_...335336 # ===== Server =====337 PORT=3000338 NODE_ENV=development339 ```340341## Secret Detection Patterns342343When masking values, detect sensitive variables by name pattern:344345**Always mask (show `****`):**346- `*PASSWORD*`, `*PASSWD*`, `*SECRET*`347- `*TOKEN*`, `*API_KEY*`, `*APIKEY*`348- `*PRIVATE_KEY*`, `*ACCESS_KEY*`349- `*AUTH*`, `*CREDENTIAL*`350351**Partially mask (show first 4 chars):**352- `*URL*` containing `://user:pass@` -> mask password part353- `*DSN*`, `*CONNECTION_STRING*`354355**Never mask (safe to show):**356- `PORT`, `HOST`, `NODE_ENV`, `LOG_LEVEL`357- `*_ENABLED`, `*_DEBUG`, `*_TIMEOUT`358- `*_REGION`, `*_ZONE`, `*_VERSION`359360## Framework-Specific Support361362Detect and handle framework-specific env patterns:363364- **Next.js**: `NEXT_PUBLIC_*` (client-exposed, warn about secrets)365- **Vite**: `VITE_*` (client-exposed, warn about secrets)366- **CRA**: `REACT_APP_*` (client-exposed, warn about secrets)367- **Django**: `DJANGO_*`, `ALLOWED_HOSTS`, `DEBUG`368- **Rails**: `RAILS_*`, `RACK_ENV`369- **Docker Compose**: cross-reference `environment:` in compose files370371For client-exposed prefixes (`NEXT_PUBLIC_`, `VITE_`, `REACT_APP_`):372- WARN if any secret-like value uses these prefixes373- These are embedded in client bundles and visible to everyone374375## Safety Rules376377- **NEVER** display full secret values (API keys, passwords, tokens)378- **NEVER** commit .env files to git379- After generating .env.example, verify .env is in .gitignore380- When comparing, always mask sensitive values381- Warn if .env files are tracked by git (`git ls-files .env`)382- Warn about client-exposed env prefixes containing secrets383- When team sharing is discussed, recommend encrypted solutions (see [encryption-guide.md](references/encryption-guide.md))