Dotenv Inheritance Mapper for Openclaw

A local environment variable analysis skill that resolves your framework's complex .env file override hierarchy, flags configuration risks, and cross-references usage against your source code.

phy041
v1.0.3
Mar 23, 2026
0
652
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install phy-dotenv-inheritance-mapper

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install phy-dotenv-inheritance-mapper using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Dotenv Inheritance Mapper?

The Dotenv Inheritance Mapper is a highly effective, zero-API environment utility designed for Openclaw Skills. It untangles the web of multiple configuration files (such as .env, .env.local, .env.staging, and .env.production) by analyzing them in their exact, framework-specific execution order. By flattening these layers into a single transparent view, it reveals precisely which configuration layer wins, where variables conflict across infrastructure, and what overrides are actually active.

Beyond simple parsing, this skill audits configuration hygiene againstTwelve-Factor App methodologies. It scans your source files to uncover dead environment configurations that are no longer referenced in code, catches undocumented items absent from your template files, and provides early protection against serious production outages or credential exposures.

Dotenv Inheritance Mapper Use Cases

  • Debugging discrepancy issues where a feature works in a staging environment but crashes or behaves unexpectedly in production.
  • Auditing repositories for exposed infrastructure credentials, un-gitignored secret variables, or misplaced production tokens.
  • Onboarding developers by auto-generating complete and accurate .env.example files from code usage.
  • Tracking down dead or stale configurations that are still maintained across files but have been removed from source code.
  • Reviewing full environmental compliance according to Twelve-Factor app architecture guidelines.

How Dotenv Inheritance Mapper Works

  1. Framework Fingerprinting: The tool scans workspace configuration files to identify the underlying technology stack (e.g., Next.js, Vite, NestJS, Rails, Django) and adopts its exact env load priority order.
  2. File Discovery: It performs a local filesystem audit up to two levels deep to aggregate all variants of environment files, including docker-compose parameters.
  3. Parsing and Hierarchy Simulation: Every file is safely parsed line-by-line to extract keys, comments, and values, then sequentially merged to isolate the precise winning values and layer overrides.
  4. Code Cross-Referencing: Static analysis scripts run target searches through application source directories to discover active process.env, os.environ, or ENV references.
  5. Classification and Reporting: The system evaluates every key against architectural risk definitions, outputting an actionable, interactive Markdown configuration map and status summary.

Dotenv Inheritance Mapper Setup

Invoke the utility directly within your workspace terminal or command line client using Openclaw Skills. No external tokens, accounts, or third-party API dependencies are required.

# Audit the current workspace directory
/dotenv-mapper

# Audit a specific subdirectory
/dotenv-mapper src/

# Investigate a single targeted configuration variable
/dotenv-mapper --check DATABASE_URL

Dotenv Inheritance Mapper Data Schema & Taxonomy

The skill generates structural, multi-dimensional matrix metrics. Data outputs organize into logical tables identifying variable properties, file intersections, and operational status:

Variable Classifications

Classification Trigger Condition Operational Risk
CONSISTENT Same exact configuration values across all environments Safe, no action required
OVERRIDDEN Values consciously differ by environmental stage Standard Expected Behavior
MISSING_FROM_EXAMPLE Present in local runtime file but missing from standard .env.example High: Blocks developer setup
STAGING_NOT_PRODUCTION Defined inside staging profile but absent from production files Critical: Triggers production runtime crashes
SENSITIVE_EXPOSED Key matches secret syntax (e.g., _SECRET, _KEY) and lives in tracked file Critical: Potential source control credential leak
REFERENCED_BUT_UNDEFINED Key actively used within application code but missing from all .env profiles High: Resolves to undefined at runtime

Dotenv Inheritance Mapper Advanced Features

  • Environment-Specific Side-by-Side Diff: Compare two distinct profiles instantly using commands like /dotenv-mapper --compare staging production to narrow down exact config drift.
  • Quick Scan Mode: Provides an ultra-fast, summarized terminal response highlighting just critical errors and security omissions for rapid code sanity checks.
  • Automated Template Patching: Auto-generates a perfectly tailored, documented .env.example boilerplate using context clues extracted from your runtime settings.
  • Twelve-Factor Compliance Audit: Measures workspace configuration architecture against continuous delivery benchmarks, delivering an automated readiness score out of five.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*