Model, Code, Write: An Agent Skill for Math Contests
It structures AI agents into a three-role math modeling team—modeler, coder, and writer—enforcing stage-gate quality checks before generating competition-ready Word or LaTeX papers.

What it does This repository is an Agent Skill for tools like Claude Code, Codex, and DeepSeek Harness that automates end-to-end math modeling competition entries. It splits work across three roles—modeler, programmer, and paper writer—each with defined deliverables and read-only Subagent quality gates. The system covers algorithm selection, Python or MATLAB implementation, scientific visualization, and final paper generation, with reproducibility tracking and dual-engine academic search baked in.
The interesting bit Rather than letting a single AI agent wing the entire problem, the project enforces a rigid human-team simulation: the programmer can bounce infeasible constraints back to the modeler, and the writer can block paper drafting until missing results are supplied. Quality gates fire mid-process, not at the finish line, and the main agent is explicitly forbidden from overriding a failed gate.
Key highlights
- Three-stage pipeline with dedicated role specs for modeling analysis, dual-language coding, and structured paper writing
- Five read-only Subagent quality gates (
M1,P1,P2,W1,W2) that halt progress until the current stage passes inspection - Reproducibility manifest (
复现清单.json) tracking input file SHA-256 hashes, random seeds, runtime versions, and exact reproduction commands - Scientific visualization tool with color-vision-friendly palettes, SVG and 300 DPI PNG export, and automated gray-scale QA previews
- Dual-engine literature search using OpenAlex and AnySearch with cross-verification by DOI or title
- Self-contained DeepSeek Harness plugin with
mm_*task and gate management tools - Reference library covering optimization, prediction, evaluation, graph theory, statistics, and machine learning algorithms
Caveats
- Generated papers are explicitly labeled as reference-only; final submission must follow current official rules and templates
- LaTeX and PDF output require explicit user requests; the default deliverable is a Word document
Verdict Math modeling competitors using AI assistants who want structured role separation and built-in quality checks will find this useful. It is primarily workflow orchestration and reference material, not a standalone numerical computing library, so pure coders may find less value here.
Frequently asked
- What is XiaoMaColtAI/math-modeling-skill?
- It structures AI agents into a three-role math modeling team—modeler, coder, and writer—enforcing stage-gate quality checks before generating competition-ready Word or LaTeX papers.
- Is math-modeling-skill open source?
- Yes — XiaoMaColtAI/math-modeling-skill is an open-source project tracked on heatdrop.
- What language is math-modeling-skill written in?
- XiaoMaColtAI/math-modeling-skill is primarily written in Python.
- How popular is math-modeling-skill?
- XiaoMaColtAI/math-modeling-skill has 1.4k stars on GitHub.
- Where can I find math-modeling-skill?
- XiaoMaColtAI/math-modeling-skill is on GitHub at https://github.com/XiaoMaColtAI/math-modeling-skill.