with one click
doctor
环境检查与安装向导。检查数学建模工作流所需的全部依赖是否已安装,对缺失项提供安装命令,并在用户确认后执行安装。手动触发。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
环境检查与安装向导。检查数学建模工作流所需的全部依赖是否已安装,对缺失项提供安装命令,并在用户确认后执行安装。手动触发。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use this skill in the MathModel LaTeX sandbox when the user asks to reproduce built-in scientific visualization templates, especially prompts from the Improve tab mentioning $mathmodel-figure-templates, 科研绘图模板, SHAP蜂群柱状图, 配对云雨图, 交叉验证ROC, 泰勒图, 相关矩阵组合图, 预测真实值边缘分布图, TPE调参3D曲面, 下三角相关矩阵半边小提琴图, 分组环形热图, 城市公园降温组合图, or Nature和弦图. It provides ready-to-run Python scripts bundled inside the skill.
数学建模竞赛工作流入口。用于启动完整建模流程:询问用户偏好,生成 plan.md 和 todo.md,并按阶段调用赛题分析、建模、代码与图表、流程图、论文撰写、验证验收等 skills。
数学建模编程实现与数据图表生成阶段。根据 ANALYSIS_MODELING_REPORT.md 编写可复现代码、运行求解、验证约束、输出 RESULTS_REPORT.md 并生成论文可用的数据驱动图表 PDF。
数学建模非数据型图示绘制阶段。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和已有 figures/ 生成技术路线图、子问题求解流程图、模型结构图、数据处理流程图等 DrawIO 图,并导出论文可引用 PDF。
数学建模竞赛论文撰写阶段,支持 Typst 和 LaTeX 双引擎。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和 figures/*.pdf 选择比赛模板、排版引擎、组织章节,并在论文正文中按章节直接插入图表。
数学建模竞赛最终验证和验收阶段,支持 Typst 和 LaTeX 双引擎。用于论文写完后检查章节数量、标题顺序、图表引用、数值一致性、占位符、内部文件泄露、参考文献、代码可复现性、编译和提交就绪状态。
| name | doctor |
| description | 环境检查与安装向导。检查数学建模工作流所需的全部依赖是否已安装,对缺失项提供安装命令,并在用户确认后执行安装。手动触发。 |
| allowed-tools | Bash(*), Read, Write |
本 skill 检查完整数学建模工作流所需的所有工具是否已就绪,并帮助用户安装缺失项。本 skill 只在用户显式触发时运行,不自动执行。
| 工具 | 用途 | 检测命令 |
|---|---|---|
typst | 论文编译(5writing、6verity,Typst 引擎) | command -v typst |
xelatex | 论文编译(5writing、6verity,LaTeX 引擎,中文模板必需) | command -v xelatex |
python3 | 数值计算与图表(3coding-visual) | command -v python3 |
drawio / draw.io | DrawIO 流程图导出 PDF(4drawio) | command -v drawio || command -v draw.io |
pdftoppm | PDF 转 PNG 视觉检查(6verity) | command -v pdftoppm |
mutool | PDF 转 PNG 备用(6verity) | command -v mutool |
magick | PDF 转 PNG 备用(6verity) | command -v magick |
| 包 | 用途 |
|---|---|
numpy | 数值计算 |
scipy | 科学计算、优化求解 |
pandas | 数据处理 |
matplotlib | 图表生成 |
scikit-learn | 机器学习建模 |
openpyxl | 读写 Excel 数据附件 |
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"
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
将结果整理展示:
状态 工具/包 说明
---- -------- ----
✓ 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
仅对缺失项输出对应平台的命令。
| 平台 | 命令 |
|---|---|
| macOS | brew 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 发行版中(TeX Live / MiKTeX / MacTeX)。安装发行版即可获得 xelatex。
| 平台 | 命令 |
|---|---|
| macOS | brew 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(中文支持)。
| 平台 | 命令 |
|---|---|
| macOS | brew install python |
| Linux (apt) | sudo apt install python3 python3-pip |
| Linux (dnf) | sudo dnf install python3 python3-pip |
| Windows | winget install Python.Python.3 或从 python.org 下载安装包 |
pip3 install <缺失的包>
# Windows: pip install <缺失的包>
# 例如: pip3 install scipy scikit-learn openpyxl
| 平台 | 命令 |
|---|---|
| macOS | brew install --cask drawio |
| Linux | 从 https://github.com/jgraph/drawio-desktop/releases 下载 AppImage 或 deb |
| Windows | winget install JGraph.Draw 或从上述页面下载安装包 |
| 平台 | 命令 |
|---|---|
| macOS | brew install poppler |
| Linux (apt) | sudo apt install poppler-utils |
| Linux (dnf) | sudo dnf install poppler-utils |
| Windows | winget install oschwartz10612.poppler 或 scoop install poppler |
| 平台 | 命令 |
|---|---|
| macOS | brew install mupdf |
| Linux (apt) | sudo apt install mupdf-tools |
| Windows | scoop install mupdf 或从 mupdf.com 下载 |
| 平台 | 命令 |
|---|---|
| macOS | brew install imagemagick |
| Linux (apt) | sudo apt install imagemagick |
| Linux (dnf) | sudo dnf install imagemagick |
| Windows | winget install ImageMagick.ImageMagick 或 choco install imagemagick |
列出所有缺失的必须项后,询问用户:
以上必须项缺失,是否现在安装?(y/N)
Doctor 检查完成(macOS)
必须项:5/5 ✓
可选项:2/4(drawio、scipy 缺失)
工作流就绪状态:
1start-mathmodel ✓
2analysis-modeling ✓
3coding-visual ✓(scipy 缺失,部分功能受限)
4drawio ⚠ drawio 未安装,PDF 导出将跳过
5writing ✓(typst ✓,xelatex ✓)
6verity ⚠ 无 PDF 转 PNG 工具,视觉检查将跳过
sudo 命令会请求密码,执行前告知用户。