1start-mathmodel
数学建模竞赛工作流入口。用于启动完整建模流程:询问用户偏好,生成 plan.md 和 todo.md,并按阶段调用赛题分析、建模、代码与图表、流程图、论文撰写、验证验收等 skills。
环境检查与安装向导。检查数学建模工作流所需的全部依赖是否已安装,对缺失项提供安装命令,并在用户确认后执行安装。手动触发。
Claude Code
$ npx -y skills add jihe520/mathmodelagent --skill doctor --agent claude-code
Codex
$ npx skills add jihe520/mathmodelagent --skill doctor -a codex -y
Cursor
$ npx skills add jihe520/mathmodelagent --skill doctor -a cursor -y
Gemini CLI
$ npx skills add jihe520/mathmodelagent --skill doctor -a gemini-cli -y
GitHub Copilot
$ npx skills add jihe520/mathmodelagent --skill doctor -a github-copilot -y
OpenCode
$ npx skills add jihe520/mathmodelagent --skill doctor -a opencode -y
Windsurf
$ npx skills add jihe520/mathmodelagent --skill doctor -a windsurf -y
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 工具,视觉检查将跳过
🤖📐专为数学建模设计的 Agent & skills ,自动完成数学建模,生成一份完整的可以直接提交的论文。 An Agent Designed for Mathematical Modeling ,Automatically complete mathmodel and generate a complete paper ready for submission.
数学建模竞赛工作流入口。用于启动完整建模流程:询问用户偏好,生成 plan.md 和 todo.md,并按阶段调用赛题分析、建模、代码与图表、流程图、论文撰写、验证验收等 skills。
数学建模赛题分析与建模设计合并阶段。用于读取题面和附件,完成子问题拆解、数据理解、假设预检、变量定义、模型公式、目标函数、约束条件、求解策略和可交给代码实现的建模报告。
数学建模编程实现与数据图表生成阶段。根据 ANALYSIS_MODELING_REPORT.md 编写可复现代码、运行求解、验证约束、输出 RESULTS_REPORT.md 并生成论文可用的数据驱动图表 PDF。
数学建模非数据型图示绘制阶段。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和已有 figures/ 生成技术路线图、子问题求解流程图、模型结构图、数据处理流程图等 DrawIO 图,并导出论文可引用…
数学建模竞赛论文撰写阶段,支持 Typst 和 LaTeX 双引擎。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和 figures/*.pdf…
Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Search literature across sources, verify or manage citations, and build MeSH strategies or citation-impact audits. Use for…