Sep 27, 2026
A Three-Phase Pipeline for Math Modeling Competitions With math-modeling-skill
A skill that splits a competition problem into model design, Python/MATLAB implementation, and paper writing — with five named quality gates across the three stages.
A math modeling competition compresses three jobs into a few days: design a defensible model, implement it under time pressure, and write a paper that cites real results. math-modeling-skill (v1.3.0) turns that crunch into a pipeline of three roles — modeler, programmer, paper writer — and inserts five quality gates so each phase is checked before the next one starts.
Why This Skill Matters
Each phase has a fixed deliverable set. The modeling phase produces a problem-analysis report and a terminology table before gate M1. The programming phase must clear P1 (a minimal runnable result) before any full computation and formal figures, then P2, delivering code, result tables, and a machine-readable reproduction checklist. The paper phase outlines its evidence at gate W1, then passes W2 before delivering the default 完整论文.docx — a Word paper, with LaTeX and a compiled PDF available on explicit request.
The implementation layer covers both Python and MATLAB, with dependencies checked dynamically per chosen model. Reproducibility is part of the contract: random seeds, input file SHA-256 hashes, runtime and dependency versions, key parameters, and a single reproduction command all get recorded.
Installation
git clone https://github.com/XiaoMaColtAI/math-modeling-skill.git
Place the repo into your agent's skills directory, or install it with one command:
npx skills add https://github.com/xiaomacoltai/math-modeling-skill --skill math-modeling
The README lists Claude Code, Codex, Cursor, Trae, and Qoder as tools it can run in, and the repo also ships a preset for the DeepSeek Harness desktop app.
Real Workflow: Take a Problem From Prompt to Word Paper
- Load the skill, then hand it the problem statement and any attachments.
- Run the full pipeline in one instruction:
使用数学建模 Skill 完成这道题,默认生成 Word 论文。
- The modeling phase returns the analysis report and terminology table; gate M1 verifies them before code gets written.
- The programming phase runs P1 first — a minimal runnable result before full computation and figures — then delivers code, result tables, and the reproduction checklist under
results/. - Short on time? Run a single phase instead:
只做建模分析,输出题目分析报告和术语表格。
- The paper phase builds its evidence outline at W1 — every claim tied to a real result, figure, or reference — and only then generates the Word document, which must include at least 8 formal figures covering every sub-problem.
Tips
- The quality gates are read-only subagents, and the protocol is strict: when a gate returns FAIL, the original phase fixes the issue based on the evidence and gets re-checked — the main agent is not allowed to override a failed verdict.
- The algorithm reference material spans seven categories: optimization, prediction, evaluation, graph theory, statistics, comprehensive methods, and machine learning. The paper-search tool queries OpenAlex and AnySearch in parallel and cross-checks by DOI or title; set
ANYSEARCH_API_KEYwhen that engine needs one. - The repo's example gallery shows outputs for the 2025 CUMCM A and B problems, so you can see the figure style before your own run.
- Your problem files stay read-only; the skill writes only into your project directory and copies templates there before modifying them.
When Not to Use This
The README is explicit: generated papers are for reference, and structure plus format must follow the target competition's official rules and templates for the current year. That also means this is a competition-and-modeling tool, not a general document generator — if your deliverable is a blog post or a slide deck, a writing skill fits better. Different competitions also configure page counts, abstracts, and numbering differently, so budget time to align the output with the current year's requirements.
See the leaderboard for more skills.