config-env-contract-check

Audit environment variable contracts across backend settings, Docker, Compose, CI, and documentation.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/ZaxbyHub/ragappv3 --skill config-env-contract-check-zaxbyhub
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: config-env-contract-check
Source: https://github.com/ZaxbyHub/ragappv3/tree/main/.opencode/skills/config-env-contract-check
Command: npx skills add https://github.com/ZaxbyHub/ragappv3 --skill config-env-contract-check-zaxbyhub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Environment variable defaults often drift across deployment surfaces like .env.example, Dockerfiles, Compose files, and CI scripts, causing hard-to-diagnose configuration mismatches that only surface at build or runtime. ## Core Features & Use Cases - Cross-Surface Contract Audit: Checks backend settings, frontend env usage, Docker, Compose, CI workflows, docs, and examples for consistent env var defaults. - Atomicity Enforcement: Ensures any env var default change updates .env.example, docker-compose.yml, both Dockerfiles, and the CI contract script in the same commit. - Validation Parity Check: Verifies that inline frontend Dockerfile validation and scripts/validate_vite_env.mjs implement identical rules. - Use Case: When changing APP_ROOT_PATH or VITE_API_URL defaults, run this audit to confirm all five deployment surfaces agree before CI fails with an obscure mismatch error. ## Quick Start Audit the repository's environment variable contracts and report any mismatches between runtime config, Docker defaults, and documentation.

Frequently Asked Questions about config-env-contract-check

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

FAQPage Schema
How do I keep environment variable defaults consistent across Docker and Compose?▼

Update all deployment surfaces atomically in one commit: .env.example, docker-compose.yml, the root Dockerfile, frontend/Dockerfile, and the CI contract script. Run scripts/check_config_contract.py to verify the defaults match before pushing.

How do I audit frontend and backend env variable alignment?▼

Check that build-time variables like VITE_APP_BASENAME and VITE_API_URL stay aligned with runtime values like APP_ROOT_PATH. The audit covers frontend/src/lib/api.ts, vite configs, and backend/app/config.py to confirm coordination.

Why does check_config_contract.py fail after changing an env default?▼

The CI script fails when any of the five contract surfaces disagree on a default value. The script itself is part of the contract, so it must be updated in the same commit as the env var change, not treated as a stale observer.

Does the frontend Dockerfile validation need to match validate_vite_env.mjs?▼

Yes, the inline validation in frontend/Dockerfile and the standalone scripts/validate_vite_env.mjs must implement identical rules. Adding or relaxing a check in one requires updating the other to avoid build-time inconsistencies.

When should I run a config contract audit?▼

Run it whenever a change touches environment variables, deployment paths, Docker or Compose files, settings APIs, CORS, or documentation describing configuration. It is also required before merging any env var default change.