env-manager

env-manager is a skill for Claude Code, Codex from laolaoshiren/claude-code-skills-zh. It costs 22 tokens per session (1,133 once invoked), scanned A, original, MIT.

An environment-variable manager for project settings stored outside the code, often in .env files. It checks variable definitions and usage while keeping secret values out of reports and terminal output.

In plain words
What is it for?
Use it to scan .env files and code references, compare .env.example with real files, validate URLs, ports, and booleans, and create safe templates or schemas. It can also prepare configuration lists for Docker Compose and CI/CD systems.
Why use it?
It helps find missing or unused configuration, mismatches between environments, invalid values, and hard-coded secrets. It also makes shared configuration easier to document across a monorepo, a repository containing multiple related projects.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan .env files and code references, compare .env.example with real files, validate URLs, ports, and booleans, and create safe templates or schemas. It can also prepare configuration lists for Docker Compose and CI/CD systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laolaoshiren/claude-code-skills-zh/env-manager
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add laolaoshiren/claude-code-skills-zh --skill env-manager
Clone the repo
git clone --depth 1 https://github.com/laolaoshiren/claude-code-skills-zh

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for env-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/laolaoshiren/claude-code-skills-zh/env-manager/github.svg)](https://agentmods.dev/skills/laolaoshiren/claude-code-skills-zh/env-manager)
Your own site
<a href="https://agentmods.dev/skills/laolaoshiren/claude-code-skills-zh/env-manager"><img src="https://agentmods.dev/badge/skills/laolaoshiren/claude-code-skills-zh/env-manager/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for env-manager

Your own site · 80×15
<a href="https://agentmods.dev/skills/laolaoshiren/claude-code-skills-zh/env-manager"><img src="https://agentmods.dev/badge/skills/laolaoshiren/claude-code-skills-zh/env-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,133 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 12 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 3
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 9
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 14
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 24
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 70
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 101
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 102
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 103
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 104
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 14
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 100
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 14
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01133
Opus 5 $0.00011 $0.00566
Sonnet 5 $0.00004 $0.00227
Haiku 4.5 $0.00002 $0.00113

Measured 11d ago against content hash b021d459cd29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

env-manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/env-manager/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

环境变量管理器

触发条件

当用户要求管理环境变量、.env 文件、配置同步、Secrets 检查时激活。

工作流程

1. 扫描项目

  • 检测所有 .env* 文件(.env / .env.local / .env.development / .env.production)
  • 默认只提取变量名、来源文件和是否为空;真实值必须脱敏,不写入报告或终端输出
  • 扫描代码中引用的环境变量(process.env.XXX / os.environ['XXX'] / os.getenv('XXX')
  • 识别静态扫描中未发现引用的变量(仅作为待人工确认候选)
  • 识别已使用但未定义的变量(缺失配置)

2. 校验分析

  • 检查必填变量是否有默认值
  • 验证 URL 格式、端口号范围、布尔值格式
  • 检测硬编码的敏感信息(API Key / Token / Password)
  • 对比 .env.example 与实际 .env 文件的差异

3. 生成/修复

  • 生成 .env.example 模板(仅包含变量名和说明,不含真实值)
  • 生成 .env.schema.json(结构化校验规则)
  • 检测到硬编码密钥时,建议迁移到环境变量
  • 生成 dotenv 加载配置(针对不同框架)

4. 同步

  • 在 monorepo 中同步共享环境变量
  • 生成 Docker Compose 的 env_file 配置
  • 生成 CI/CD 的 Secrets 配置清单

输出格式

.env.example 示例

# 应用配置
APP_NAME=my-app
APP_ENV=development          # development | staging | production
APP_PORT=3000                # 服务端口 (1-65535)
APP_DEBUG=true               # 调试模式

# 数据库
DB_HOST=localhost
DB_PORT=5432
DB_NAME=mydb
DB_USER=                     # 必填
DB_PASSWORD=                 # 必填,生产环境请使用 Secrets

# 第三方服务
REDIS_URL=                   # 必填,格式:redis://host:port
JWT_SECRET=                  # 必填,至少 32 位随机字符串

校验报告示例

📋 环境变量分析报告
==================
✅ 定义且使用: 12 个
⚠️  定义未使用: 2 个(S3_BUCKET, OLD_API_KEY)
❌ 使用未定义: 1 个(SENDGRID_API_KEY)
🔒 硬编码敏感信息: 1 处(src/auth.js:23)

建议:
1. 人工确认 S3_BUCKET 和 OLD_API_KEY 是否被 CI、部署脚本或动态代码引用,再决定是否删除
2. 在 .env 中添加 SENDGRID_API_KEY
3. 将 src/auth.js:23 的硬编码 token 迁移到环境变量

安全检查清单

  • 扫描和报告只展示变量名及脱敏状态,不回显真实 Secret
  • .env 已添加到 .gitignore
  • .env.example 存在且与代码同步
  • 无硬编码的 API Key / Token / Password
  • 生产环境使用 Secrets 管理(GitHub Secrets / AWS SSM / Vault)
  • JWT_SECRET / ENCRYPTION_KEY 足够随机(32+ 字符)
  • 数据库密码不在日志中输出

修改边界

  • 不要自动删除或改写真实 .env;先展示差异并取得用户确认。
  • “未使用”只代表静态扫描没有发现,仍需检查 CI、容器、部署平台和动态变量访问。
  • 不把生产 Secret 复制到 .env.example、Schema、日志、Issue 或聊天输出中。

常见陷阱

  • Next.js:只有 NEXT_PUBLIC_ 前缀的变量会暴露给客户端,后端专用变量不要加此前缀
  • Docker:构建时的 ARG 和运行时的 ENV 是不同的,不要混淆
  • Create React App.env 中的变量必须以 REACT_APP_ 开头才会被注入
  • Vite:使用 VITE_ 前缀暴露变量给客户端
  • monorepo:根目录的 .env 不会自动被子包读取,需要显式配置

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 105 lines · 22 tokens per session scan A b021d459cd29

Subscribe to this mod's changes

env-manager is a skill published in the GitHub repository laolaoshiren/claude-code-skills-zh (832 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 1,133 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

launch-tweet

Draft a launch tweet or short thread for a solo product launch on X / Twitter. Use when the user is shipping something (new product, major feature, side project) and asks for a launch post, "help me announce X", or mentions Product Hunt / Show HN / X launch.

rockscy/solo-skills · 63 tokens

postmortem-solo

Run a lightweight, blame-free postmortem after an incident, failed launch, or missed deadline — for one person. Use when the user says "that didn't go well", "the launch flopped", "we had an outage", "I missed my deadline", or wants to learn from a recent failure.

rockscy/solo-skills · 68 tokens

bug-from-user

Convert a vague user complaint into a reproducible bug report a solo dev can act on. Use when the user pastes a confusing customer message, says "user says it's broken but I can't repro", "this email makes no sense", or wants to triage a bug report.

rockscy/solo-skills · 60 tokens

changelog-from-commits

Generate a user-facing CHANGELOG entry from raw git log output. Use when the user is preparing a release, says "what changed since last version", asks to write release notes, or wants to summarize a batch of commits for end users.

rockscy/solo-skills · 55 tokens

standup-solo

Run a 5-minute personal standup for a solo dev — what shipped yesterday, what's blocked, what's next today. Use when the user asks for a daily check-in, says "what should I work on today", "what did I do yesterday", or wants to break out of a productivity slump.

rockscy/solo-skills · 66 tokens

email-customer

Draft a polite-but-firm reply to a tricky customer email — refund request, scope creep, complaint, billing dispute. Use when the user pastes a customer email and asks for a reply, mentions "how do I respond", "user is asking for a refund", "they want a discount", or any awkward customer-facing communication.

rockscy/solo-skills · 71 tokens