Agent skill

Env Doctor

by cat-xierluo in cat-xierluo/legal-skills

本机开发环境与全局包的体检、账本与安装纪律,覆盖所有包管理器(npm/npx、nvm、pip/pipx、uv、brew、bun)与运行时环境面(~/.local/bin 垫片、PATH、python 解释器版图、LaunchAgents、cron、shell rc 漂移对照)。当用户问「node/python 为什么是这个版本」「npm/pip…

MITAuto-check passedProductivity & Automation

Install Env Doctor

skills CLI
$ npx skills add cat-xierluo/legal-skills --skill env-doctor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cat-xierluo/legal-skills env-doctor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/env-doctor .claude/skills/env-doctor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
env-doctor
GitHub stars
720
Token cost
~756 tokens
SKILL.md length
207 words
Files
5 (incl. scripts, references)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

本机开发环境与全局包的体检、账本与安装纪律,覆盖所有包管理器(npm/npx、nvm、pip/pipx、uv、brew、bun)与运行时环境面(~/.local/bin 垫片、PATH、python 解释器版图、LaunchAgents、cron、shell rc 漂移对照)。当用户问「node/python 为什么是这个版本」「npm/pip…

  • Works in 5 steps: 全局安装只走白名单落点,装完必须记账(record 子命令,一条命令的事) → 三类操作默认禁止,除非用户当次明示授权且完成后立即记账:修改 shell rc 文件 → ~/.local/bin 是全机唯一垫片层:这里的 node/npm/npx… → …
  • Tasks that involve Scheduled and recurring tasks
  • SKILL.md covers 硬纪律(所有 agent 必须遵守,先于任何环境写操作), 体检(确定性检测), 记账 and 已知基线, plus 2 more sections
  • Runs Shell scripts from its folder; calls bash, npm and brew

What it does

Env Doctor is an agent skill from cat-xierluo/legal-skills. 本机开发环境与全局包的体检、账本与安装纪律,覆盖所有包管理器(npm/npx、nvm、pip/pipx、uv、brew、bun)与运行时环境面(~/.local/bin 垫片、PATH、python 解释器版图、LaunchAgents、cron、shell rc 漂移对照)。当用户问「node/python 为什么是这个版本」「npm/pip 全局包装到哪了」「环境怎么又乱了」「PATH/rc 被谁改了」「多了个 LaunchAgent」,或任何 agent 在执行 npm i -g / uv tool install / pipx install / brew install 等全局安装、修改 shell rc 文件、注册 LaunchAgent/cron、触碰 ~/.local/bin 符号链接、或在厂商应用(Hermes/Deck/Wukong 等)更新后复核环境之前,必须先读本 skill 并遵守其纪律。不要用于:单个项目内的 nodemodules / venv 依赖管理、CI 环境、Linux 服务器初始化。仅 macOS。

Its SKILL.md is about 760 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/known-baseline.md` and `scripts/env-doctor.sh`).

It sits in Productivity & Automation, covering Scheduled and recurring tasks. It works with npm, Python, Homebrew and macOS. The licence is MIT.

When your agent uses it

  • Tasks that involve Scheduled and recurring tasks

Example prompts

  • “/env-doctor”

Requirements

  • Python 3
  • Node.js
  • A Bash shell

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 全局安装只走白名单落点,装完必须记账(record 子命令,一条命令的事)
  2. 三类操作默认禁止,除非用户当次明示授权且完成后立即记账:修改 shell rc 文件
  3. ~/.local/bin 是全机唯一垫片层:这里的 node/npm/npx 链接决定所有 shell(包括
  4. 厂商应用升级后先体检:跑一次 env-doctor.sh,若报 🚨(垫片漂移,多为 Hermes
  5. 判断运行时/包的归属看链接与 prefix,不看表面:which -a node + readlink 读

What it can do on your machine

Read from SKILL.md and the folder at commit db2c58c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • npm
    • brew
    • pip
    • uv
    • pipx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, pip, uv and pipx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Env Doctor loads about 756 tokens when it runs, and up to ~1.7k if it reads all its reference files. Until then it costs about 122 tokens; SKILL.md has 207 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~122
When it runs · the whole SKILL.md, loaded when a task matches
~756
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cat-xierluo/legal-skills at commit db2c58c, republished under its MIT licence (© cat-xierluo). 207 words, ~756 tokens.

Download SKILL.mdSave it as .claude/skills/env-doctor/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
env-doctor
description
本机开发环境与全局包的体检、账本与安装纪律,覆盖所有包管理器(npm/npx、nvm、pip/pipx、uv、brew、bun)与运行时环境面(~/.local/bin 垫片、PATH、python 解释器版图、LaunchAgents、cron、shell rc 漂移对照)。当用户问「node/python 为什么是这个版本」「npm/pip 全局包装到哪了」「环境怎么又乱了」「PATH/rc 被谁改了」「多了个 LaunchAgent」,或任何 agent 在执行 npm i -g / uv tool install / pipx install / brew install 等全局安装、修改 shell rc 文件、注册 LaunchAgent/cron、触碰 ~/.local/bin 符号链接、或在厂商应用(Hermes/Deck/Wukong 等)更新后复核环境之前,必须先读本 skill 并遵守其纪律。不要用于:单个项目内的 node_modules / venv 依赖管理、CI 环境、Linux 服务器初始化。仅 macOS。
homepage
https://github.com/cat-xierluo/legal-skills
author
杨卫薪律师(微信ywxlaw)
version
0.3.0
license
MIT

env-doctor · 环境与全局包体检、账本与安装纪律

本机装了大量自带运行时的 agent 应用(Hermes、Deck、Wukong、Eigent……),加上 nvm / uv / pipx / brew / bun 多套包管理器并存,摩擦全部出现在接缝处:谁排 PATH 前面、 node/python 归谁、全局包装进哪个 prefix、哪个链接死了。本 skill 用「确定性体检 + 账本 + 安装纪律」把地质层变成可查账的:脏了立刻可见,每次变更有据可查。 (心智模型同 brew doctor / npm doctor:环境医生。)

硬纪律(所有 agent 必须遵守,先于任何环境写操作)

  1. 全局安装只走白名单落点,装完必须记账(record 子命令,一条命令的事):
    • Node 包:npm i -g,且 npm 必须是 nvm 当前默认版本 的(用 npm prefix -g 核对,不是则先停下报告);
    • Python CLI:uv tool install(或 pipx install),不要 pip install --user 手装 CLI;
    • 系统依赖:brew install;
    • bun 全局尽量少用,装了必记账。
  2. 三类操作默认禁止,除非用户当次明示授权且完成后立即记账:修改 shell rc 文件 (~/.zshenv / ~/.zprofile / ~/.zshrc / ~/.profile);注册 LaunchAgent 或 cron;在 ~/.local/bin 新增或改指 node/npm/npx/python 等运行时垫片。
  3. ~/.local/bin 是全机唯一垫片层:这里的 node/npm/npx 链接决定所有 shell(包括 launchd 拉起的干净 shell)的默认运行时。只允许跟随 nvm default 重指,且必须记账。
  4. 厂商应用升级后先体检:跑一次 env-doctor.sh,若报 🚨(垫片漂移,多为 Hermes 等把 node 链接抢回自家),只报告用户,不擅自改回——那可能是该应用有意的依赖。
  5. 判断运行时/包的归属看链接与 prefix,不看表面:which -a node + readlink 读 出真实目标,npm prefix -g / pip -V 看真实落点;版本号一致不代表是同一个 node(本机曾有 4 个并存、pip 有 user/brew/uv 多套)。

体检(确定性检测)

bash
bash "<本skill目录>/scripts/env-doctor.sh"               # 快速体检(本地信息,秒级)
bash "<本skill目录>/scripts/env-doctor.sh" full          # 深度体检(追加 brew outdated,需网络)
bash "<本skill目录>/scripts/env-doctor.sh" snapshot      # 立漂移基线(rc 哈希 + LaunchAgents 名单)
bash "<本skill目录>/scripts/env-doctor.sh" record "说明"  # 记账

输出八段:① node/npm/npx 垫片归属比对(✅/🚨)② PATH 实际解析与解释器版图(node 与 python3 全量清单)③ 各包管理器与全局落点(npm 全局清单 / uv tools / pipx / pip --user / bun / brew leaves 与 services / cron 概览)④ 缓存体积(npm/bun/uv/pip/ brew)⑤ ~/.local/bin 全部符号链接与死链 ⑥ LaunchAgents 与 cron 明细 ⑦ 账本尾部 ⑧ 环境漂移对照——rc 文件哈希与 LaunchAgents 名单 diff 上次 snapshot 基线,报 🚨新增/变更、ℹ️消失。 退出码:0 正常;2 检测到垫片漂移(见 🚨 标记);3 无法解析 nvm 默认、未验证。 第 8 节环境面漂移只报告不计入退出码(见 DECISIONS D7)。agent 巡检以退出码为准; full 模式额外报告 brew 过时包清单。变更确认合法后重跑 snapshot 重立基线并记账。

记账

账本在 ~/.config/env-ledger.md(纯文本,随写随追加),每行一条: - 日期 时间 — 谁做了什么、如何回滚。环境被谁动过、怎么还原,查这里,不做考古。 任何全局安装/卸载、垫片改指、rc 修改、LaunchAgent 增删,都要有一行。

已知基线

机器现状(4 个 node 的分布、各包管理器落点、Hermes 自管边界、历史修复与回滚命令) 见 references/known-baseline.md。基线漂移时更新该 文件并记账。

依赖

无外部硬依赖:bash 3.2+ 与 macOS 标准命令;npm/uv/pipx/brew 缺失时对应段自动降级。

部署

~/.agents/skills/env-doctor → 本目录(符号链接),跨 agent 生效。

© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/env-doctor of cat-xierluo/legal-skills.

  • SKILL.md
  • CHANGELOG.md
  • LICENSE.txt
  • references/known-baseline.md
  • scripts/env-doctor.sh

Open the folder on GitHubat commit db2c58c

Compare with similar skills

Env Doctor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Env Doctor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Env Doctor this skillcat-xierluo/legal-skills720—~756Automated safety check: PassMIT
Daily Briefleiting-eric/DailyBrief367—~3kAutomated safety check: NotesMIT
Tdoc DOCXLeoYeAI/openclaw-master-skills2.2k—~3.6kAutomated safety check: NotesMIT
Re Stegodslsdzc/rev-skills135—~1.2kAutomated safety check: PassApache-2.0
OrcaSlicer G-code Slicingearthtojake/text-to-cad19k—~989Automated safety check: PassMIT
Shadowvpn Deploy Clientmadeye/shadowvpn101—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Daily Brief

    leiting-eric/DailyBrief

    Operational knowledge for the daily-brief digest pipeline (this project).

    367 GitHub stars~3k tokensUpdated yesterday
    Productivity & AutomationAuto-check: notes
  • Tdoc DOCX

    LeoYeAI/openclaw-master-skills

    Word 文档全能处理技能 | Complete Word Document Processing Skill. An agent skill from LeoYeAI/openclaw-master-skills.

    2.2k GitHub stars~3.6k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Re Stego

    dslsdzc/rev-skills

    隐写术检测与提取:文件尾附加、图片 LSB、音频与其他载体、提取验证. An agent skill from dslsdzc/rev-skills.

    135 GitHub stars~1.2k tokensUpdated 6 days ago
    SecurityAuto-check passed
  • OrcaSlicer G-code Slicing

    earthtojake/text-to-cad

    Slices STL, 3MF or OBJ models into printer-ready G-code with OrcaSlicer, either headless from the command line or by opening the model in the app.

    19k GitHub stars~989 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Shadowvpn Deploy Client

    madeye/shadowvpn

    Deploy, install, and run the ShadowVPN client in a target environment — Linux (systemd), macOS (launchd), or Windows (Wintun, foreground launcher or scheduled-task service).

    101 GitHub stars~2.4k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check: notes
  • Manage

    kenneth-liao/ai-launchpad-marketplace

    Manage scheduled Claude Code tasks — add (recurring or one-off), list, pause, resume, remove, view results, and test execution of skills, prompts, and scripts with safety controls and notifications.

    126 GitHub stars~4.1k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check passed

More from cat-xierluo/legal-skills

All 62 skills in this repo
  • Elements-Style Complaint Generator

    cat-xierluo/legal-skills

    Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.

    721 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Lecture Performance Review

    cat-xierluo/legal-skills

    Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.

    721 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • De-AI Polish for Chinese Articles

    cat-xierluo/legal-skills

    Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.

    721 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • GitHub Star Manager

    cat-xierluo/legal-skills

    Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.

    721 GitHub stars~2k tokensUpdated yesterday
    Auto-check: notes
  • Legal Harness Initializer

    cat-xierluo/legal-skills

    Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.

    721 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Moot Court Simulation Builder

    cat-xierluo/legal-skills

    Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.

    721 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Questions about Env Doctor

What does Env Doctor do?

本机开发环境与全局包的体检、账本与安装纪律,覆盖所有包管理器(npm/npx、nvm、pip/pipx、uv、brew、bun)与运行时环境面(~/.local/bin 垫片、PATH、python 解释器版图、LaunchAgents、cron、shell rc 漂移对照)。当用户问「node/python 为什么是这个版本」「npm/pip…. Env Doctor is an agent skill from cat-xierluo/legal-skills.

When should I use Env Doctor?

Env Doctor fits situations like: tasks that involve Scheduled and recurring tasks.

How do I install Env Doctor in Claude Code?

Run `npx skills add cat-xierluo/legal-skills --skill env-doctor -a claude-code`. Or copy the skill folder (skills/env-doctor in cat-xierluo/legal-skills) into .claude/skills/env-doctor in your project. Claude Code loads it when a task matches its description.

How do I install Env Doctor in Codex?

Run `npx skills add cat-xierluo/legal-skills --skill env-doctor -a codex`. Or copy the skill folder (skills/env-doctor in cat-xierluo/legal-skills) into .agents/skills/env-doctor in your project. Codex loads it when a task matches its description.

Can I use Env Doctor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill env-doctor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/env-doctor, .gemini/skills/env-doctor, .github/skills/env-doctor and .opencode/skills/env-doctor in your project.

What does Env Doctor need to run?

Going by SKILL.md and its folder, Env Doctor needs a shell for the scripts in its folder and the command-line tools its instructions call (bash, npm, brew, pip, uv and pipx). Our summary lists: Python 3; Node.js; A Bash shell.

Does Env Doctor access the network?

SKILL.md contains no URLs. Its commands use npm, pip and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Env Doctor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Env Doctor use?

Env Doctor is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Env Doctor use?

About 756 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 939 tokens, read only when the agent opens those files.

What are the alternatives to Env Doctor?

Skills that share tags, products or a category with Env Doctor: Daily Brief (leiting-eric/DailyBrief, 367 stars), Tdoc DOCX (LeoYeAI/openclaw-master-skills, 2.2k stars), Re Stego (dslsdzc/rev-skills, 135 stars) and OrcaSlicer G-code Slicing (earthtojake/text-to-cad, 19k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Env Doctor?

cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 720 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 10, 2026.

Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.