env-precheck
Skill1 starsChanged 6 months agoMITView on GitHub
项目启动前的环境审计。新项目开始时检查:运行时版本、包管理器状态、所需依赖(标注已有/需安装)、 磁盘占用预估、环境限制与已知问题。避免项目写到一半才发现环境跑不通。
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- chipweaver/veripowertheir own version, first seen Sep 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- chipweaver/veripower★ 10same 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.
The file
Files
env-precheck
何时触发
以下情况必须先执行环境审计再动手:
- 创建新项目(无论前端/后端/CLI/脚本)
- 用户说"帮我搭建一个 X"
- 引入新的包管理器、运行时或系统依赖
- 切换工作环境(本地 → 远程、Windows → WSL、etc)
执行步骤/ Execution Steps
1. 收集信息/ Collect Information
先列出这个项目需要的所有依赖:
// 内部判断用,不需要展示
{
"runtime": ["Node.js", "Python", "Go", ...],
"packageManager": ["npm", "pip", "go mod", ...],
"frameworks": ["React", "Express", ...],
"systemDeps": ["git", "docker", "gcc", ...],
"devDeps": ["vite", "typescript", ...]
}2. 逐项检查
对每一项,运行版本检查命令并记录结果。示例:
node --version # 检查 Node 版本
npm --version # 检查 npm 版本
git --version # 检查 Git3. 输出清单
用以下固定模板输出给用户:
## 🔍 环境审计 — [项目名称]
### 运行时
| 依赖 | 状态 | 版本 |
|------|------|------|
| Node.js | ✅ 已有 | v24.14.0 |
| Python | ❌ 需要 | 3.10+ |
### 包依赖 (npm)
| 包名 | 大小 | 用途 |
|------|------|------|
| react + react-dom | ~200 KB | UI 框架 |
| vite | ~8 MB | 构建工具 |
### 系统依赖
| 工具 | 状态 |
|------|------|
| git | ✅ 已有 |
### 📦 总预估
- node_modules: ~50-80 MB
- 构建产物: ~300 KB
- 安装时间: ~1-2 分钟 (视网络)
### ⚠️ 环境限制
- WSL UNC 路径不支持 npm 脚本 → 需要 Windows 本地路径
- esbuild 需要额外二进制下载
### 🎯 建议
- 使用 `npm install --ignore-scripts` 可跳过二进制编译问题4. 决策
清单输出后,等待用户确认再开始安装依赖。不要自动安装。
输出原则
- 只列出这个项目真正需要的依赖,不要列无关的
- 已有/需安装 必须明确标注
- 如果发现环境限制,不要隐瞒,立即告知并给出替代方案
- 如果用户环境缺少关键依赖(如没装 Node),建议先装好再继续
- 大小估算不需要精确,数量级对即可
不要做的
- 不要在审计完成前开始创建文件
- 不要跳过检查直接装包
- 不要假设用户环境是正常的
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.

