Math Modeling Skill
A three-stage workflow for math modeling tasks: analysis and model choice, Python or MATLAB computation, and paper assembly in Word or LaTeX
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Runs Python and MATLAB code and writes result files into the project directory
- Literature search reaches out to external services over the network
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/math-modeling-skillDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Assembled automatically, review before installing.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a claude-code -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .claude/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .claude/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a cursor -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .agents/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .agents/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a github-copilot -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .github/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .github/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a codex -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .agents/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .agents/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a gemini-cli -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .agents/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .agents/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .devin/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .devin/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Formerly Windsurf.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a cline -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .cline/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .cline/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a roo -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .roo/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .roo/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
A fork of Roo Code, same .roo folders.
Run in a terminal in the project folder
npx skills add xiaomacoltai/math-modeling-skill --skill math-modeling -a opencode -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 673ee57
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .agents/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .agents/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .agents/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .agents/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/xiaomacoltai/math-modeling-skill.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /dsh-plugin/math-modeling-agent/skills/math-modeling/
git -C "$tmp" checkout 673ee5767ac5f03bb541e3fc26ed43f2d1c9fdbd
mkdir -p .agents/skills
cp -R "$tmp/dsh-plugin/math-modeling-agent/skills/math-modeling" .agents/skills/math-modelingCommands for macOS and Linux, on Windows run them in Git Bash.
Clone the repository: git clone https://github.com/XiaoMaColtAI/math-modeling-skill.git and put it into the agent's skills directory. Or install with npx skills add https://github.com/xiaomacoltai/math-modeling-skill --skill math-modeling. The entry point is SKILL.md.
Other ways from the author
git clone https://github.com/XiaoMaColtAI/math-modeling-skill.gitPut the repository into your agent's skills directory or load it per its rules.
This is third-party code. Review the repository files before installing.
What it does
The skill splits the task into three roles: analysis and model design, code implementation and execution, and paper writing. In the first stage the agent reads the problem and attachments, breaks down subproblems, picks a model and a validation plan. In the second it writes and runs Python or MATLAB code, produces result tables and figures, and keeps a reproducibility record with seeds, input hashes and dependency versions. In the third it builds the paper from real results, in Word by default and additionally in LaTeX with real PDF compilation on explicit request. Read-only subagents run quality gates at key points, and the algorithm references cover optimization, forecasting, evaluation, graph theory, statistics and machine learning.
Who it is for. For participants of math modeling contests (CUMCM, MCM/ICM and similar) and for general modeling projects.
Good fit when
- You need to run a modeling task end to end, from reading the problem to a finished paper
- You need only one stage: analysis and model choice, or code and figures, or paper assembly
- You need reproducible computations and publication-quality figures under one standard
Not a fit when
- You want to submit the paper without review: the authors explicitly warn the output is only a reference
- You have no Python or MATLAB and dependencies for computation and figures
Example request
Run this problem through the math modeling skill and assemble the paper in WordLimitations
References and instructions are mostly in Chinese. The finished paper is only a reference; structure and format must be aligned with the official rules and template of the specific contest year. Computation and figures need Python or MATLAB with the required libraries, and LaTeX needs an installed TeX toolchain. Literature search calls OpenAlex and AnySearch, AnySearch may need the ANYSEARCH_API_KEY key, and that step needs network access.
How to disable. Remove the math-modeling folder from your agent's skills directory. If installed as a dsh preset, delete the preset folder.
Security check
- Runs Python and MATLAB code and writes result files into the project directory
- Literature search reaches out to external services over the network
README in short
The README describes a three-stage workflow: analysis and model choice, code implementation, and paper writing, with the option to run the whole task or a single stage. It lists bilingual Python and MATLAB implementation, publication-quality figures with self-checks, reproducible runs, dual-engine literature search, and Word or LaTeX paper generation with full quality gates. Separate subagents act as reviewers at key points, with only the quality check enabled by default. The repository also ships a preset for DeepSeek Harness. Installation is via git clone or npx skills add.
SKILL.md
--- name: math-modeling description: 当用户要求数学建模、建模竞赛、建模分析、代码求解、结果可视化或生成数学建模论文时使用。支持完整三阶段流程、单独执行任一角色,以及在关键节点使用独立 Subagent 进行阶段内质检;默认只启用质检 Subagent,用户可明确选择额外协作。 --- # 数学建模 本 Skill 用三个独立角色完成数学建模。生成的论文仅供用户参考,不作为可直接提交的作品。论文结构与格式必须以目标竞赛当届官方规则和官方模板为准,不能用往届经验替代官方要求。 ## 强制执行协议 用户明确点名本 Skill 或任务命中本 Skill 时,严格执行以下协议;不要把它降级为建议: 1. 在首次进度更新中回显:已激活本 Skill、SKILL_ROOT、PROJECT_ROOT、当前阶段、目标竞赛与届次、计划读取的角色和工具入口。 2. 开始每个阶段前,实际读取该角色的 SKILL.md;使用工具时再实际读取对应工具的 SKILL.md。 3. 严格调用 Skill 提供的脚本和模板,禁止为省时手写替代实现。 4. 把任何校验预警视为未完成,除非当届官方规则或用户明确允许偏离。 5. 环境缺少引擎、搜索源或依赖时,报告阻塞并继续完成仍可验证的部分。
FAQ
Can I run a single stage?
Yes. You can request only the analysis, only code with figures, or only paper assembly from existing results; the full cycle is optional.
Is MATLAB supported, not only Python?
Yes, code can be produced in Python or MATLAB, and dependencies are checked for the selected features.
Related
166 skills for scientific work: bioinformatics, cheminformatics, clinical data, geospatial analysis and 100+ databases
Google's open-source MCP server for databases: ready tools for Postgres, MySQL, BigQuery, Spanner and more, plus custom tools in tools.yaml
Official Hugging Face skills: Hub operations via the hf CLI, datasets, model training, Spaces, evals and deployment
A visualization language for agents and an MCP server: neat charts from a simple semantic spec