Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

env-validator环境验证器

Agent Skill

env-validator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

917

周安装

39

GitHub Stars

216

下载量

321
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:env-validator(环境验证器)
来源仓库:https://github.com/mathews-tom/armory
仓库路径:skills/env-validator
安装命令:
npx skills add https://github.com/mathews-tom/armory --skill env-validator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mathews-tom/armory --skill env-validator

简介

env-validator 交叉比对 .env 文件与项目要求,发现缺失、类型错误或不安全默认值。

  • 依据 references/validation-rules.md 定义规则,按严重级别分类报告问题。
  • 适用于部署前检查与长期维护,自动清理 orphaned entries 提升配置整洁度。
  • 需至少存在一个 .env 文件或等效配置源方可启动验证流程。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Env Validator

Validates environment variable configurations by cross-referencing .env files against project requirements. Catches missing variables, type errors, insecure defaults, and orphaned entries before they cause runtime failures.

Reference Files

FileContentsLoad When
references/validation-rules.mdBuilt-in validation rules and severity definitionsAlways

Prerequisites

  • A .env file (or equivalent) in the project
  • Optionally: .env.example, docker-compose.yml, or deployment manifests for cross-referencing

Workflow

Phase 1: Discovery

Locate environment configuration sources in the project:

  1. Primary file: Find .env in the project root. If absent, check for .env.local, .env.development, .env.production
  2. Schema file: Find .env.example or .env.template — this defines the expected variables
  3. Code references: Grep for os.environ, process.env, env::var, os.Getenv patterns to find variables referenced in code
  4. Deployment manifests: Check docker-compose.yml, Dockerfile, k8s/ manifests for ${VAR} or ENV VAR patterns

Report what was found before proceeding.

Phase 2: Schema Extraction

Build the expected variable schema from discovered sources:

For each variable found across all sources, record:

FieldSource
NameVariable name (e.g., DATABASE_URL)
RequiredPresent in code references or marked required in example
Type hintInferred from usage (URL, integer, boolean, string, path)
DefaultValue in .env.example if present
Used inList of files that reference this variable

Phase 3: Validation

Run these checks against the primary .env file:

  1. Missing required variables (CRITICAL)

- Variable referenced in code but absent from .env - Variable in .env.example without a default but absent from .env

  1. Type mismatches (HIGH)

- PORT=abc when code does int(os.environ["PORT"]) - DEBUG=yes when code expects boolean (true/false) - URL variables without valid URL format

  1. Insecure defaults (HIGH)

- SECRET_KEY=changeme, PASSWORD=password, API_KEY=xxx - DEBUG=true or DEBUG=1 in production-targeted files - Empty values for security-critical variables

  1. Unreferenced variables (MEDIUM)

- Variables in .env not referenced anywhere in code or manifests - May indicate stale configuration

  1. Format issues (LOW)

- Lines without KEY=VALUE format - Trailing whitespace in values - Inconsistent quoting (mixing single/double/no quotes) - Duplicate variable definitions (last wins, but likely a mistake)

See references/validation-rules.md for the complete rule catalog.

Phase 4: Report

Produce a structured validation report:

# Environment Validation Report

**File:** `.env`
**Schema:** `.env.example` + code references
**Verdict:** PASS | FAIL

## Summary

| Severity | Count |
|----------|-------|
| CRITICAL | N     |
| HIGH     | N     |
| MEDIUM   | N     |
| LOW      | N     |

## CRITICAL

### [ENV-001] Missing required variable: DATABASE_URL

- **Referenced in:** `src/db.py:12`, `docker-compose.yml:8`
- **Expected type:** URL (postgresql://...)
- **Fix:** Add `DATABASE_URL=postgresql://user:pass@localhost:5432/dbname` to `.env`

## HIGH

...

## Unreferenced Variables

| Variable        | In .env | In Code | In Manifests | Status       |
|-----------------|---------|---------|--------------|--------------|
| LEGACY_API_KEY  | Yes     | No      | No           | Unreferenced |

## Recommendations

1. [Highest priority fix]
2. [Second fix]

Error Handling

ErrorResolution
No.env file foundReport absence; check for alternative env sources
No.env.example or schemaValidate based on code references only
Binary or very large.envSkip; report as unsupported format
No code references foundValidate format and security only; skip completeness

Limitations

  • Cannot validate runtime-injected variables (from vault, AWS SSM, etc.)
  • Type inference is heuristic — may misclassify complex values
  • Does not check variable values against external services (e.g., valid API key format)
  • Production vs. development distinction requires file naming conventions

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.52%
按下载量换算111

Claude

32.67%
按下载量换算105

Cursor

19.85%
按下载量换算64

Gemini CLI

10.29%
按下载量换算33

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills