← 返回 Skills 市场
charlie-morrison

env-config-validator

作者 charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
108
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install env-config-validator
功能描述
Validate .env files against schemas, compare environments (dev vs prod), detect common mistakes (trailing spaces, placeholders, invalid ports, missing protoc...
使用说明 (SKILL.md)

Env Config Validator

Validate .env files, compare environments, detect common mistakes, and enforce schemas.

Quick Start

# Validate with auto-detected common checks
python3 scripts/validate_env.py .env

# Validate against a schema
python3 scripts/validate_env.py .env --schema env-schema.json

# Compare dev vs prod
python3 scripts/validate_env.py --diff .env.development .env.production

# Generate schema from existing .env
python3 scripts/validate_env.py --generate-schema .env -o env-schema.json

# JSON output for CI
python3 scripts/validate_env.py .env --output json --severity error

Common Checks (Auto-Detected)

The validator automatically detects these issues without a schema:

Check Severity What it catches
Trailing whitespace warning Invisible chars causing bugs
Unquoted spaces warning Values with spaces not wrapped in quotes
Placeholders error change_me, TODO, xxx, your_* values
Empty values info Defined but blank variables
Double-nested quotes warning ""value"" quoting errors
URL missing protocol warning URL vars without http(s)://
Port out of range error Port > 65535 or \x3C 1
Short secrets warning SECRET/PASSWORD/KEY \x3C 8 chars
Inconsistent booleans info yes/1 instead of true/false
Mixed case keys info some_Var instead of SOME_VAR
Inline comments warning value # comment (not all parsers support)
Duplicate keys warning Same variable defined twice

Options

Flag Default Description
--schema JSON schema file for type/required validation
--diff FILE FILE Compare two env files
--generate-schema Auto-generate schema from .env file
--output text Output format: text, json, markdown
-o stdout Output file path
--ignore Skip specific check IDs (repeatable)
--severity info Minimum severity: error, warning, info

Exit Codes

  • 0 — No issues (or only info)
  • 1 — Warnings found (or diff has differences)
  • 2 — Errors found

Workflow

Pre-deploy Validation

  1. Generate schema from working .env: --generate-schema .env -o schema.json
  2. Add schema to repo, validate in CI: validate_env.py .env --schema schema.json --severity error
  3. Diff staging vs prod: --diff .env.staging .env.production

Audit Existing Project

  1. Run validate_env.py .env to find common mistakes
  2. Fix errors and warnings
  3. Generate schema for future validation

References

  • schema-format.md — Full JSON schema specification, supported types, field reference
安全使用建议
This package appears coherent and implements a local .env validator in a single Python script. Before installing or running: (1) ensure you have Python 3 on the machine (SKILL.md assumes 'python3' but the registry metadata didn't list it), (2) review the script if you will run it on sensitive repositories (it reads and can write schema files), (3) test on non-production .env files first, and (4) if you use the diff or schema generation in CI, confirm the tool's secret-masking behavior meets your privacy requirements (Status.md says it masks secrets, review the diff output). No network or secret-exfiltration mechanisms were found in the provided files.
功能分析
Type: OpenClaw Skill Name: env-config-validator Version: 1.0.0 The skill bundle provides a legitimate utility for validating, comparing, and generating schemas for .env configuration files. The core logic in scripts/validate_env.py uses Python standard libraries to perform regex-based checks for common mistakes (e.g., trailing spaces, placeholders) and enforces type/pattern constraints. It includes security-positive features such as masking secrets in diff outputs and lacks any network access, obfuscation, or arbitrary code execution capabilities.
能力评估
Purpose & Capability
Name/description align with the provided files and code. The Python script implements parsing, common-mistake checks, schema generation, schema validation, and diffing as advertised. No unrelated services or credentials are requested.
Instruction Scope
SKILL.md instructs the agent to run the included Python script against .env files and to use flags for schema/diff/output. The runtime instructions reference only the files the tool is meant to inspect. There are no instructions to read arbitrary system files, call external endpoints, or exfiltrate data.
Install Mechanism
There is no install spec (instruction-only from the registry's perspective) and the code is pure Python stdlib, which is low risk. Minor inconsistency: the SKILL.md examples use 'python3' but the registry metadata lists no required binaries. The skill therefore implicitly requires a Python 3 runtime to be present; otherwise no additional installation is performed.
Credentials
The skill declares no required environment variables or credentials and the code reads only the .env files provided as input. It does not access system environment variables, cloud credentials, or external config paths.
Persistence & Privilege
always is false and the skill has no install hooks or claims to modify other skills or global agent settings. It writes output files only when explicitly asked (e.g., schema generation -o) and otherwise runs locally.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install env-config-validator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /env-config-validator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug env-config-validator
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

env-config-validator 是什么?

Validate .env files against schemas, compare environments (dev vs prod), detect common mistakes (trailing spaces, placeholders, invalid ports, missing protoc... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。

如何安装 env-config-validator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install env-config-validator」即可一键安装,无需额外配置。

env-config-validator 是免费的吗?

是的,env-config-validator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

env-config-validator 支持哪些平台?

env-config-validator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 env-config-validator?

由 charlie-morrison(@charlie-morrison)开发并维护,当前版本 v1.0.0。

💬 留言讨论