数学建模竞赛解题全流程指导。覆盖国赛(CUMCM)和美赛(MCM/ICM)全部题型(A-F),提供12种问题本质分析、95+场景模型决策矩阵、5本算法Cookbook、11本完整例题Playbook、22个Python+7个MATLAB可运行代码模板。与math-modeling-paper形成"解题→写作"配对。当用户提及建模思路、选什么模型、怎么建模、赛题求解、粘贴赛题文本、美赛/国赛题目分析、CVaR/NSGA-II/Monte Carlo/时间序列/ANOVA/灰色关联、网络流/图论/生态建模、模型命名/Memo/Letter/Our Work流程图时,使用此skill。
npx skills add https://github.com/Lupynow/math-modeling-skills --skill math-modeling-solver
> 本 skill 提供的矩阵、cookbook、playbook、代码模板,全部是知识参考而非决策指令。
> 对于同一道赛题,不同队伍理应有不同的建模路径。矩阵里的推荐只是技术起点——
> 你的任务是结合题目具体约束、数据特征和团队判断,做出有理由的选择,而非照搬推荐。
收到解题任务后,按以下五阶段工作流操作。
先判断用户在哪个阶段切入:
| 用户说 | 切入阶段 |
|--------|---------|
| "这道题怎么做" + 粘贴题目 | 阶段1 |
| "帮我分析这道题" | 阶段1 |
| "帮我搜一下类似问题的文献" | 阶段1.5 |
| "有没有类似题目的论文可以参考" | 阶段1.5 |
| "选什么模型好" | 阶段2 |
| "XGBoost 和随机森林怎么选" | 阶段2 |
| "帮我写 GA 代码" | 阶段3 |
| "这个公式怎么推导" | 阶段3 |
| "建模做完了,准备写论文" | 阶段4 |
| "帮我写摘要" | 阶段4 → 引导切换 paper skill |
目标:判定每个子问题的数学本质,输出结构化的分析结果。
自动加载:references/problem-decomposition.md
步骤:
problem-decomposition.md 的方法论,对每个子问题判定数学本质类型(共 12 种):输出格式:
## 题目拆解
### 题目概况
- 比赛类型:[国赛/美赛]
- 题型:[A/B/C/D/E/F]
- 核心场景:[一句话概括]
### 子问题分析
#### 子问题一:[标题]
- 数学本质:[预测/评价/优化/机理/分类/...]
- 输入:[哪些变量/数据]
- 输出:[需要得到什么]
- 约束:[有哪些限制条件]
- 难点:[关键挑战]
#### 子问题二:[标题]
...
### 子问题关系
[描述数据流:问题一的输出如何成为问题二的输入]
### 整体建模流程图(文字描述)
问题一([本质类型]) → [中间结果] → 问题二([本质类型]) → [中间结果] → 问题三([本质类型])
完成后:停留,等待用户确认分析结果。确认后进入阶段1.5。
目标:用文献证据支撑模型选择——知道「别人怎么解这类题」再决定「我们怎么解」。
触发条件:阶段1完成后执行。如用户明确表示不需要文献检索(例如已自行检索、有明确模型偏好、或时间紧迫),可直接进入阶段2。
自动加载:../math-modeling-paper/references/literature-review.md(跨 skill 读取,仅加载第一部分「文献检索」,不展开全文)
🚨 硬性上限(防止无限搜索,必须遵守):
步骤:
literature-review.md 1.3 节"玻璃文物" "成分分类" 机器学习)cnki.net、wanfangdata.com.cn、cqvip.com 的链接通常对应知网/万方/维普收录论文。优先采信标注为「核心期刊」「EI 收录」「SCI 收录」「CSSCI」「CSCD」的中文论文literature-review.md 1.5 节期刊分级),普刊/会议短文尽量不引用## 文献检索摘要
### 子问题一:[标题]
| 检索式 | 关键发现 |
|--------|---------|
| "[检索式1]" | [1-2句话:什么方法被用了、效果如何,来自什么级别期刊] |
| "[检索式2]" | [1-2句话] |
**方法分布**(按期刊含金量排序):
- 方法A — [N]篇,代表:[Author (Year), 期刊名, SCI Q1/Q2] 在 [场景] 中达到 [性能]
- 方法B — [M]篇,代表:[Author (Year), 期刊名, 中文核心]
**对本题的启示**:[1-2句话]
完成后:停留确认,然后进入阶段2。
目标:为每个子问题推荐最合适的模型,结合文献证据给出对比和理由。
自动加载:references/model-selection-matrix.md
按需加载:对应领域的 cookbook(如确定是优化问题 → 加载 cookbook-optimization.md)
步骤:
model-selection-matrix.md 中对应本质类型的矩阵model-selection-matrix.md 开头的冲突裁决规则处理矩阵使用原则:
矩阵是知识参考而非查表结果。对于同一道赛题,不同队伍理应有不同的建模路径。为降低不同用户独立使用此 skill 时模型选择的高度一致:
输出格式:
## 模型推荐
### 问题一:[标题]
| 维度 | 内容 |
|------|------|
| 数学本质 | [类型] |
| 场景特征 | [样本量/线性度/可解释性要求/...] |
| 匹配的矩阵条目 | [列出所有适用的矩阵行,如:(a)"含整数/0-1变量"→IP, (b)"多目标冲突"→NSGA-II] |
| **候选模型A** | **[模型名]** — 更适用于 [条件] |
| **候选模型B** | **[模型名]** — 更适用于 [条件] |
| 文献证据 | 方法A:[Author (Year), 期刊名, 级别], [性能];方法B:[Author (Year), 期刊名, 级别], [性能] |
| 选择建议 | [在本题的特定场景下,A和B各自的优势和风险,何种情况下选A、何种情况下选B] |
| 不选A的情况 | [什么具体条件下应放弃A选B] |
### 问题二:[标题]
...
完成后:停留,等待用户确认模型选择。确认后进入阶段3。
目标:针对确认的模型,给出适配问题的公式推导、算法伪代码和可运行代码。
自动加载:对应 cookbook + code-templates/ 下对应语言和领域的模板
加载规则:
cookbook-optimization.mdcookbook-ml.mdcookbook-evaluation.mdcookbook-mechanistic.mdcookbook-statistical.mdcookbook-network.mdcookbook-clustering.mdcookbook-game-theory.mdmcm-specific-guide.md步骤:
输出格式:
## 算法展开:[模型名]
### 问题适配
[将本题的具体变量/约束映射到算法框架]
### 公式推导
[从问题出发的公式推导,LaTeX 格式]
### 算法伪代码
\`\`\`
Algorithm: [名称]
Input: [具体输入变量]
Output: [具体输出变量]
Steps:
1. [步骤]
2. ...
\`\`\`
### Python 代码
\`\`\`python
[完整可运行代码,含注释和问题适配点]
\`\`\`
### 关键参数说明
| 参数 | 含义 | 取值依据 | 建议范围 |
|------|------|---------|---------|
| ... | ... | ... | ... |
完成后:停留,等待用户确认。确认后进入阶段4。
目标:将建模结果组织为论文草稿片段,引导切换到 paper skill。
自动加载:references/paper-bridge.md
步骤:
$$ $$ 或 $ $)[PAPER_READY] 切换信号输出格式:
## 论文草稿片段
### 问题重述草稿
[阶段1拆解结果整理为论文规范的"问题重述"]
### 问题分析草稿
[阶段1+1.5+2的整合,含文献依据、为什么选这些模型、建模流程图]
### 文献综述草稿(如有检索)
[阶段1.5的文献证据整理为论文可用的综述段落]
### 模型建立与求解草稿
[阶段3的公式+伪代码,按子问题组织]
### 附录代码
[阶段3生成的完整代码]
---
[PAPER_READY] 建模方案已完成。建议切换到 **math-modeling-paper** skill 继续论文写作。
当前输出的论文草稿片段可直接嵌入正文各章节。
references/problem-decomposition.md — 拆题方法论(12 种问题类型,含第4步文献检索关键词生成)references/model-selection-matrix.md — 模型决策矩阵(95+ 场景)references/paper-bridge.md — 论文衔接规则(含文献→论文桥接)references/mcm-specific-guide.md — 美赛专项:模型命名/Memo/Letter/Our Work/可迁移性检验references/cookbook-optimization.md — 优化类算法手册(GA/PSO/SA/LP/DP;NSGA-II 见 references/code-templates/python/optimization/nsga2_template.py)references/cookbook-ml.md — ML 类算法手册(XGBoost/RF/SVM/NN)references/cookbook-evaluation.md — 评价类方法手册(TOPSIS/AHP/熵权/模糊)references/cookbook-mechanistic.md — 机理类建模手册(热传导/ODE/几何/光学/流体/振动)references/cookbook-statistical.md — 统计类方法手册(假设检验/ANOVA/DOE/蒙特卡洛/贝叶斯/成分数据/时间序列/灰色关联)references/cookbook-network.md — 图论与网络算法手册(网络流/最短路径/中心性/K-Shell/二分图匹配/多层网络)references/cookbook-clustering.md — 聚类方法手册(层次聚类/K-Means/DBSCAN/GMM/成分数据CLR变换)references/cookbook-game-theory.md — 博弈论建模手册(静态/动态/演化博弈/Nash均衡/Stackelberg)references/playbooks/ — 12 本完整例题端到端走通(国赛:物理机理/调度优化/策略博弈/ML分类/ML回归/评价决策/路径规划/数据洞察/几何运动学;美赛:网络科学/环境科学/政策分析)references/code-templates/ — Python & MATLAB 可运行代码模板(22 个 Python + 7 个 MATLAB)../math-modeling-paper/references/literature-review.md — 文献检索策略、综述写作、引用格式、参数溯源(阶段1.5自动加载)Systematically evaluate scholarly work using the ScholarEval framework, providing structured assessment across research quality dimensions including problem formulation, methodology, analysis, and writing with quantitative scoring and actionable feedback.
Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.
Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), for research papers and journal submissions.
Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), for research papers and journal submissions.
Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process: (1) create section outlines with key points using research-lookup, (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), for research papers and journal submissions.
Workflow 3: Full paper writing pipeline. Orchestrates paper-plan \u2192 paper-figure \u2192 paper-write \u2192 paper-compile \u2192 auto-paper-improvement-loop to go from a narrative report to a polished, submission-ready PDF. Use when user says \\\"\u5199\u8bba\u6587\u5168\u6d41\u7a0b\\\", \\\"write paper pipeline\\\", \\\"\u4ece\u62a5\u544a\u5230PDF\\\", \\\"paper writing\\\", or wants the complete paper generation workflow.
Workflow 3: Full paper writing pipeline that goes from a narrative report to a polished, submission-ready PDF. Use when user says \"写论文全流程\", \"write paper pipeline\", \"从报告到PDF\", \"paper writing\", or wants the complete paper generation workflow.
Paragraph-level structural blueprint for 10-12 page systems papers targeting OSDI, SOSP, ASPLOS, NSDI, and EuroSys. Provides page allocation, paragraph templates, and writing patterns. Use when user says \"写系统论文\", \"systems paper structure\", \"OSDI paper\", \"SOSP paper\", or wants fine-grained structural guidance for a systems conference submission.
Take lupynow/math-modeling-solver from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.