MathModel Run skill
A workflow for mathematical modeling contests: ten stages, ten gates and frozen results before the paper is written.
- 114 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The skill runs Python scripts, experiments and document rendering and creates many files in the project working folder.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/mathmodel-runDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The skill runs Python scripts, experiments and document rendering and creates many files in the project working folder.
This is third-party code. Review the repository files before installing.
What it does
MathModel Run leads a team from the problem statement to an audited paper for CUMCM, MCM/ICM, HiMCM and similar contests. The process runs as a chain: clarify, decompose, choose, validate, run, freeze results, write, render and audit. The project has ten stages and ten gates, and every gate fails by default. A declared stage cannot run ahead of the first failing gate, and this is enforced mechanically. Each sub-question has a baseline, a primary and a fallback model. Numbers in the paper come only from `frozen_numbers.json`, and decisions go into an append-only log. The repository holds a skill for Codex and Claude Code, the scripts `init_project.py`, `status.py` and `doctor.py`, and a separate Paper Iteration Pack skill for paper, figure and layout fixes. The `index.html` page serves as a local workbench.
Who it is for. Student teams and coaches in mathematical modeling contests who need reproducible results and an audit before submission.
Good fit when
- The team received CUMCM statements and wants to split the task into sub-questions with a check on each.
- The code works but paper numbers came from old chats, so results must be frozen.
- Before submission you need an independent audit and page-by-page PDF review.
- You need a decision log for handing work between members.
Not a fit when
- You need a quick one-off model without an evidence base.
- The task is not competitive modeling and needs no audit.
- Python 3.9 or newer and Git are unavailable.
Example request
Create the project 2026-cumcm-a, show the status and the first failing gate, then break problem A into sub-questions with baseline and fallback models.Limitations
Git and Python 3.9 or newer are required. The process is strict: until a gate passes you cannot move on to the paper, which is overkill for a short draft. Gates mechanically check structure, hashes and evidence links but do not confirm the scientific correctness of a model. Most documentation is in Chinese with some English. Evidence comes in six kinds: command, test, data, figure, log and manual note. The skill targets contests and does not replace scientific peer review.
How to disable. Delete the `my-mathmodel-agent` folder from the agent skills directory. Projects created with `init_project.py` stay in your working folder.
FAQ
How do I create a project?
Run `python3 my-mathmodel-agent/scripts/init_project.py 2026-cumcm-a` from the repository root. The script creates a skeleton with task cards, a decision log, `state.json` and folders for code, figures and the paper.
How do I find the next step?
Run `python3 my-mathmodel-agent/scripts/status.py 2026-cumcm-a`. It lists ten gates, the first failing one and the step derived from it, and warns when the hand-written note is stale.
Can I install only the paper skill?
Yes: `npx -y skills@latest add chengyike20110519-create/MathModelRun --skill paper-iteration-pack --agent codex claude-code` installs only Paper Iteration Pack.
Where does the paper get its numbers?
Only from `frozen_numbers.json`. Every value must reference an entry in the run manifest, so numbers from old chats never reach the paper.
Which contests does it fit?
CUMCM, MCM/ICM, HiMCM and similar mathematical modeling contests that need reproducible experiments and an independent audit.
Discussion
No questions or reviews yet.
Related
SkillsA skill for math modeling contests CUMCM, MCM/ICM and the Electrical Cup: 10 stages, three roles, five gates and a LaTeX paper
Eight skills for math modeling contests that carry a task from the problem to a paper with figures and checked references
Two skills for the CUMCM and MCM/ICM math modeling contests: problem breakdown, model choice, code and the paper
A skill set for math modeling contests: problem parsing, method selection, Python and MATLAB code, and paper writing
A three-stage workflow for math modeling tasks: analysis and model choice, Python or MATLAB computation, and paper assembly in Word or LaTeX
A skill that takes problem C of China's CUMCM mathematical modelling contest from data to a checked LaTeX paper.
README in short
The system is built around evidence: every gate has evidence objects of six kinds, and decisions live in a log tagged KEEP, CUT, DEFER, PIVOT and ACCEPT_RISK. Files update in place with no hidden old versions.
README badge
Original SKILL.md
--- name: my-mathmodel-agent description: "Evidence-driven mathematical modeling contest workflow for CUMCM, MCM/ICM, HiMCM, Huawei Cup, and similar events. Use it to decompose a problem, choose and validate model routes, run reproducible Python/AMPL experiments, freeze results, write LaTeX or Typst papers, render them, and audit every claim. Not for casual homework, simple calculations, or one-off coding questions." metadata: short-description: "Run a math-modeling contest from problem files to audited paper" --- # MathModel Run Math modeling is not only a modeling problem. Under contest time pressure, it is a **decision, evidence, and delivery problem**: - A model looks sophisticated but has no validation path. - The code runs, but the paper quotes a number from an old run. - Every subproblem "passes" locally, yet the final PDF has broken figures. - A reviewer asks why the primary model beats the baseline, and there is no reproducible answer. This skill turns the contest into a stateful, evidence-backed decision workflow. It borrows the useful harness ideas from `MAGA2010/hackathon-run`: one feature at a time, default-FAIL contracts, machine-checkable evidence, fresh-context review, bounded fallback, and an append-only decision log. Evidence is also classified by strength: a structural check can prove that an artifact exists, but only a real rerun or inspection can prove that it works. ## Use this skill when Use it for a contest workspace that contains problem files and needs a reproducible path to a defensible paper. Invoke it with `$my-mathmodel-agent`. Do not use it for: - a single formula or short homework answer; - a coding request that is unrelated to a contest project; - changing a paper's wording when no evidence or project state is involved. ## Default user experience The primary product is not one-click paper generation. The primary product is help with the next modeling decision: identify the first blocker, compare routes, run the smallest useful validation, expose weaknesses, and only then write the affected section. Unless the user explicitly asks for a complete paper, do not generate one. Return a bounded work package with: