MCPInstall

doctor

环境检查与安装向导。检查数学建模工作流所需的全部依赖是否已安装,对缺失项提供安装命令,并在用户确认后执行安装。手动触发。

Installs
1.8K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/jihe520/mathmodelagent --skill doctor
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads doctor automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Doctor — 环境检查与安装向导

本 skill 检查完整数学建模工作流所需的所有工具是否已就绪,并帮助用户安装缺失项。本 skill 只在用户显式触发时运行,不自动执行。

检查项清单

核心工具

工具用途检测命令
typst论文编译(5writing、6verity,Typst 引擎)command -v typst
xelatex论文编译(5writing、6verity,LaTeX 引擎,中文模板必需)command -v xelatex
python3数值计算与图表(3coding-visual)command -v python3
drawio / draw.ioDrawIO 流程图导出 PDF(4drawio)command -v drawio || command -v draw.io
pdftoppmPDF 转 PNG 视觉检查(6verity)command -v pdftoppm
mutoolPDF 转 PNG 备用(6verity)command -v mutool
magickPDF 转 PNG 备用(6verity)command -v magick

Python 包

包用途
numpy数值计算
scipy科学计算、优化求解
pandas数据处理
matplotlib图表生成
scikit-learn机器学习建模
openpyxl读写 Excel 数据附件

工作流程

Step 1:检测当前平台

case "$(uname -s)" in
  Darwin) echo "PLATFORM=mac" ;;
  Linux)  echo "PLATFORM=linux" ;;
  MINGW*|MSYS*|CYGWIN*) echo "PLATFORM=windows" ;;
  *)      echo "PLATFORM=unknown" ;;
esac

Windows 下优先使用 winget,备用 scoop 或 choco。Linux 下优先使用 apt(Debian/Ubuntu),备用 dnf(Fedora/RHEL)或 pacman(Arch)。
检测包管理器:

# Linux 发行版检测
if [ -f /etc/os-release ]; then
  . /etc/os-release
  echo "DISTRO=$ID"
fi
# Windows 包管理器检测(在 Git Bash / PowerShell 中)
command -v winget >/dev/null 2>&1 && echo "PKG=winget"
command -v scoop  >/dev/null 2>&1 && echo "PKG=scoop"
command -v choco  >/dev/null 2>&1 && echo "PKG=choco"

Step 2:检查所有工具

check_cmd() {
  if command -v "$1" >/dev/null 2>&1; then
    echo "OK  $1 ($(command -v "$1"))"
  else
    echo "MISS $1"
  fi
}

check_cmd typst
check_cmd xelatex
check_cmd python3 || check_cmd python   # Windows 上可能是 python
command -v drawio >/dev/null 2>&1 || command -v draw.io >/dev/null 2>&1 \
  && echo "OK  drawio" || echo "MISS drawio"
check_cmd pdftoppm
check_cmd mutool
check_cmd magick

python3 - <<'PYEOF'
import importlib
pkgs = ["numpy", "scipy", "pandas", "matplotlib", "sklearn", "openpyxl"]
for p in pkgs:
    try:
        importlib.import_module(p)
        import importlib.metadata as meta
        try:
            ver = meta.version(p if p != "sklearn" else "scikit-learn")
        except Exception:
            ver = "?"
        print(f"OK  {p} ({ver})")
    except ImportError:
        print(f"MISS {p}")
PYEOF

Step 3:输出检查报告

将结果整理展示:

状态   工具/包              说明
----   --------             ----
✓      typst 0.13.0         论文编译
✗      drawio               DrawIO 导出 PDF(可选)
✓      python3 3.11.x       数值计算
✗      scipy                科学计算(可选)
...

必须项: typst 或 xelatex(至少一个论文编译器)、python3、numpy、pandas、matplotlib
可选项: drawio、pdftoppm/mutool/magick 三选一、scipy、scikit-learn、openpyxl

Step 4:提供安装命令(按平台)

仅对缺失项输出对应平台的命令。

typst

平台命令
macOSbrew install typst
Linux (apt)snap install typst 或从 GitHub Releases 下载二进制
Linux (arch)pacman -S typst
Windows (winget)winget install Typst.Typst
Windows (scoop)scoop install typst
通用cargo install --locked typst-cli(需要 Rust)

xelatex(TeX 发行版)

xelatex 包含在主流 TeX 发行版中(TeX Live / MiKTeX / MacTeX)。安装发行版即可获得 xelatex。

平台命令
macOSbrew install --cask mactex 或 brew install texlive
Linux (apt)sudo apt install texlive-full
Linux (dnf)sudo dnf install texlive-scheme-full
Linux (arch)sudo pacman -S texlive
Windows (winget)winget install MiKTeX.MiKTeX 或 winget install TeXLive
Windows (scoop)scoop install latex(需先添加 extras bucket)

注意:texlive-full 体积较大(约 5GB),如需精简可只装 texlive-xetex + texlive-lang-chinese(中文支持)。

Python 3

平台命令
macOSbrew install python
Linux (apt)sudo apt install python3 python3-pip
Linux (dnf)sudo dnf install python3 python3-pip
Windowswinget install Python.Python.3 或从 python.org 下载安装包

Python 包(批量安装缺失项)

pip3 install <缺失的包>
# Windows: pip install <缺失的包>
# 例如: pip3 install scipy scikit-learn openpyxl

drawio

平台命令
macOSbrew install --cask drawio
Linux从 https://github.com/jgraph/drawio-desktop/releases 下载 AppImage 或 deb
Windowswinget install JGraph.Draw 或从上述页面下载安装包

pdftoppm(来自 poppler)

平台命令
macOSbrew install poppler
Linux (apt)sudo apt install poppler-utils
Linux (dnf)sudo dnf install poppler-utils
Windowswinget install oschwartz10612.poppler 或 scoop install poppler

mutool(来自 mupdf)

平台命令
macOSbrew install mupdf
Linux (apt)sudo apt install mupdf-tools
Windowsscoop install mupdf 或从 mupdf.com 下载

ImageMagick

平台命令
macOSbrew install imagemagick
Linux (apt)sudo apt install imagemagick
Linux (dnf)sudo dnf install imagemagick
Windowswinget install ImageMagick.ImageMagick 或 choco install imagemagick

Step 5:询问用户是否安装

列出所有缺失的必须项后,询问用户:

以上必须项缺失,是否现在安装?(y/N)

  • 若用户确认,按检测到的平台依次执行安装命令,每步完成后打印结果。
  • 若用户拒绝或只有可选项缺失,打印可手动执行的命令列表并退出。
  • 安装完成后重新运行 Step 2,确认已生效。

Step 6:最终摘要

Doctor 检查完成(macOS)
必须项:5/5 ✓
可选项:2/4(drawio、scipy 缺失)

工作流就绪状态:
  1start-mathmodel   ✓
  2analysis-modeling ✓
  3coding-visual     ✓(scipy 缺失,部分功能受限)
  4drawio            ⚠ drawio 未安装,PDF 导出将跳过
  5writing           ✓(typst ✓,xelatex ✓)
  6verity            ⚠ 无 PDF 转 PNG 工具,视觉检查将跳过

注意事项

  • 执行安装前必须获得用户明确确认,不得静默安装。
  • Windows 下建议在 PowerShell(管理员)或 Git Bash 中运行,部分命令需要管理员权限。
  • Linux 的 sudo 命令会请求密码,执行前告知用户。
  • drawio 和 PDF 转 PNG 工具缺失不影响核心工作流,仅影响导出质量。
  • 如平台检测为 unknown,打印所有平台命令供用户手动选择。

FAQ

What does the doctor skill do?

环境检查与安装向导。检查数学建模工作流所需的全部依赖是否已安装,对缺失项提供安装命令,并在用户确认后执行安装。手动触发。

How do I install doctor?

Run npx skills add https://github.com/jihe520/mathmodelagent --skill doctor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/doctor/ (personal) or .claude/skills/doctor/ (project).

Which AI agents can use doctor?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is doctor safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains doctor?

It is published by jihe520 in jihe520/mathmodelagent. It has 1,840 recorded installs.

More from jihe520/mathmodelagent

View all →

1start-mathmodel

jihe520/mathmodelagent

数学建模竞赛工作流入口。用于启动完整建模流程:询问用户偏好,生成 plan.md 和 todo.md,并按阶段调用赛题分析、建模、代码与图表、流程图、论文撰写、验证验收等 skills。

2analysis-modeling

jihe520/mathmodelagent

数学建模赛题分析与建模设计合并阶段。用于读取题面和附件,完成子问题拆解、数据理解、假设预检、变量定义、模型公式、目标函数、约束条件、求解策略和可交给代码实现的建模报告。

1.9K installs

5writing

jihe520/mathmodelagent

数学建模竞赛论文撰写阶段,支持 Typst 和 LaTeX 双引擎。根据 ANALYSISMODELINGREPORT.md、RESULTSREPORT.md 和 figures/.pdf 选择比赛模板、排版引擎、组织章节,并在论文正文中按章节直接插入图表。

Docs & Writing1.9K installs

4drawio

jihe520/mathmodelagent

数学建模非数据型图示绘制阶段。根据 ANALYSISMODELINGREPORT.md、RESULTSREPORT.md 和已有 figures/ 生成技术路线图、子问题求解流程图、模型结构图、数据处理流程图等 DrawIO 图,并导出论文可引用 PDF。

Docs & Writing1.9K installs

3coding-visual

jihe520/mathmodelagent

数学建模编程实现与数据图表生成阶段。根据 ANALYSISMODELINGREPORT.md 编写可复现代码、运行求解、验证约束、输出 RESULTSREPORT.md 并生成论文可用的数据驱动图表 PDF。

Docs & Writing1.9K installs

6verity

jihe520/mathmodelagent

数学建模竞赛最终验证和验收阶段,支持 Typst 和 LaTeX 双引擎。用于论文写完后检查章节数量、标题顺序、图表引用、数值一致性、占位符、内部文件泄露、参考文献、代码可复现性、编译和提交就绪状态。

1.9K installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs