env-resolution

Validates environment variable edits across .env.example, docker-compose fallbacks, and CORS configuration.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/hontauadrian/sfx-app-empty-test --skill env-resolution-hontauadrian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: env-resolution
Source: https://github.com/hontauadrian/sfx-app-empty-test/tree/main/.overstory/claude-profiles/reviewer/skills/env-resolution
Command: npx skills add https://github.com/hontauadrian/sfx-app-empty-test --skill env-resolution-hontauadrian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Environment variable changes often silently break panel UIs, docker-compose fallback chains, or CORS allowlists because a commented .env.example entry, a wrong shell fallback syntax, or a hardcoded port goes unnoticed until runtime. ## Core Features & Use Cases - Env editing rules: Enforces uncommented .env.example entries, ${VAR:-fallback} colon syntax in docker-compose.yml, and per-worktree port variables instead of hardcoded ports. - Three-mode validation: Ensures every variable resolves correctly across worktree dev, panel preview, and production modes. - Debugging playbook: Diagnoses common failures such as panel UI hiding fields, containers missing variables, NEXT_PUBLIC_* changes not applying, and CORS rejections. - Use Case: When adding a new WEB_ORIGIN variable for CORS, follow the checklist to update root and app .env.example files, the compose fallback chain, and the three-mode comment block so the panel Envs page and all deployment modes keep working. ## Quick Start Review my changes to .env.example and docker-compose.yml and verify the new environment variable resolves correctly in worktree dev, panel preview, and production modes.

Frequently Asked Questions about env-resolution

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

FAQPage Schema
How do I add a new environment variable to a docker-compose project?▼

Add an uncommented entry with an empty value to .env.example, use ${VAR:-fallback} colon syntax in the compose environment block, and reference per-worktree port variables in URL fallbacks. Mirror the entry to app-level .env.example files for standalone dev mode.

Why is my environment variable not showing in the panel UI?▼

The panel parses .env.example and skips lines starting with #, so commented entries are invisible. Uncomment the variable with an empty value so the UI renders it as an editable field.

What is the difference between ${VAR:-default} and ${VAR-default} in docker-compose?▼

The colon form ${VAR:-default} falls back when the variable is unset or empty, while ${VAR-default} only falls back when unset. An empty value bypasses the bare form, breaking defaults, so always use the colon form.

Why is my NEXT_PUBLIC_ variable change not visible in the browser?▼

Next.js bakes NEXT_PUBLIC_* variables into the bundle at build or dev-server start, so hot module replacement does not pick up changes. Restart the web container to apply the new value.

Why is CORS still rejecting requests after setting WEB_ORIGIN?▼

The browser Origin header must exactly match an allowlist entry including scheme, host, and port. Check the devtools network tab; comma-separated entries are trimmed but remain case-sensitive.