env-doctor
Skill1 starsChanged 6 months agoMITView on GitHub
项目跑前环境配置体检:检测缺失的 .env 文件、对比 .env.example 找出未配置的 key 和空值 key,提前报警别等运行时炸。当用户说「体检环境 / 检查 env / .env 缺了什么 / 跑前配置检查 / 环境变量有没有配好」时触发。
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- abigayleh/claude-workflow-plugintheir own version, first seen Sep 27, 2026
- angelgabrieljacintohuayllasco/clipboard-skillstheir own version, first seen Sep 20, 2026
- tellmefrankie/ai-investment-skillstheir own version, first seen May 13, 2026
- wittyreference/twilio-claude-plugintheir own version, first seen Apr 13, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- tellmefrankie/ai-investment-skills★ 20same name
- wittyreference/twilio-claude-plugin★ 2same name
- abigayleh/claude-workflow-plugin★ 0same name
- angelgabrieljacintohuayllasco/clipboard-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- branch-cleanerSkill
- changelog-zhSkill
- claude-code-zhSkill
- code-haikuSkill
- commit-guard-zhSkill
- commit-roastSkill
- conflict-resolver-zhSkill
- cron-regex-buddySkill
- curl-buddySkill
- dep-auditSkill
- dockerfile-doctorSkill
- doc-syncSkill
- error-explain-zhSkill
- figma-to-pageSkill
- git-blame-storySkill
- gitignore-doctorSkill
- git-undoSkill
- go-migration-guardSkill
- json-yaml-doctorSkill
- lambda-logs-zhSkill
- license-pickerSkill
- mermaid-buddySkill
- mock-data-genSkill
- naming-buddySkill
- port-killerSkill
- pr-desc-zhSkill
- readme-initSkill
- skill-doctorSkill
- skill-scaffoldSkill
- slack-to-specSkill
- source-to-specSkill
- sql-explain-zhSkill
- standup-zhSkill
- test-gen-zhSkill
- tldr-thisSkill
The file
Files
env-doctor — 环境配置体检
项目跑前先体检,缺啥提前报,别等运行时炸一脸。
何时触发
用户说以下任意一种:
- "体检环境 / 检查 env / 看看 env 配好没"
- ".env 缺了什么 / 环境变量有没有配好"
- "跑前配置检查 / 帮我检查一下环境配置"
- "为什么程序读不到环境变量"
用法
- 跑体检脚本(纯 bash,无外部依赖):
bash <skill>/bin/check-env.sh [项目目录] # 项目目录缺省 = 当前目录 # 例:bash env-doctor/bin/check-env.sh ~/my-project - 脚本自动识别模板文件(.env.example / .env.sample / .env.template)并输出:
- 有模板没有 .env → 警告,给出
cp命令 - 有模板有 .env → 列出缺失的 key 和值为空的 key
- 无缺失 → 配置完整提示
- 有模板没有 .env → 警告,给出
- 根据输出给用户中文说明:
- 缺失 key:在 .env.example 里有,但 .env 里没有该行
- 空值 key:key 存在但等号右侧为空(如
DB_PASSWORD=) - 建议编辑 .env 补全后再次运行体检确认
- 常见坑提醒:
有些项目(如 Go、Java、C)不会自动加载 .env 文件。 跑程序前需手动导入:
set -a; source .env; set +a只在当前 shell 生效;新终端或子进程需重新导入。
退出码约定
| 退出码 | 含义 |
0 | 配置完整,或无模板可对比 |
0 | 有模板但 .env 缺失(警告,不阻断) |
2 | 存在缺失 key 或空值 key,需用户补全 |
1 | 脚本本身出错(目录不存在等) |
硬规则
- 只读不改:脚本只读取 .env 和模板文件,绝不修改任何文件(除非用户明确要求补全)。
- 不臆造 key 含义:不猜测 key 该填什么值,只列出缺失和空值;若用户问某个 key 怎么填,结合项目上下文作答。
- 不联网、不扫历史:纯本地体检。
边界
- 只解析
KEY=VALUE格式的行;不处理export KEY=VAL(export 前缀)的 shell 脚本风格(可扩展)。 - 不检测 .env 里多余的 key(只看 .env.example 里有的)。
- 不验证值的格式/有效性(如 URL 格式、token 长度),只看是否为空。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

