zhnnky329/MathModeling-skills

▲ 44 stars today★ 1,023⑂ 42

面向数学建模竞赛的 Claude Code / Codex Skills ,支持分阶段建模流程与 Python、MATLAB/北太天元代码分支。

About zhnnky329/MathModeling-skills

zhnnky329/MathModeling-skills is an open-source project on GitHub, mainly written in Shell. 面向数学建模竞赛的 Claude Code / Codex Skills ,支持分阶段建模流程与 Python、MATLAB/北太天元代码分支。 It currently holds 1,023 stars and 42 forks with 5 open issues, and was last pushed on 2026-08-24 (repository created 2026-04-26).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #69 with 44 new stars today.

GitHub Repository Details

Repository zhnnky329/MathModeling-skills · default branch main · size 657 KB · watchers 0 · source: GitHub REST API and repository README

README

https://github.com/zhnnky329/MathModeling-skills/blob/HEAD/MathModeling-skills

English · 简体中文 · Project Rules · Initial Prompt · 📧 Contact

https://github.com/zhnnky329/MathModeling-skills/blob/HEAD/License https://github.com/zhnnky329/MathModeling-skills/blob/HEAD/Skills https://github.com/zhnnky329/MathModeling-skills/blob/HEAD/Claude Code https://github.com/zhnnky329/MathModeling-skills/blob/HEAD/Codex

---

[!NOTE]
Update — this is now an assistant, not an autopilot. The earlier version ran the whole contest end to end and left the user only clicking "confirm", which is closer to ghost-writing: it does not fit most contests' rules, and it does little for your own skills. This version hands the key judgments back to the user — the AI returns to a supporting role, and you stay in charge. The skill count went from 24 to 28. The previous full-auto version is kept intact on the legacy-full-auto branch; switch to it if you prefer the old behavior.
A set of skills for math-modeling contests, built around the mistakes that tend to cost the most time. They sit behind a set of hard gates — two of which the user decides, not the AI — and a three-auditor layer that has the final say on whether the paper is ready to submit. The aim is not to automate more, but to make sure no step can quietly skip a check: every number in the paper traces back to a frozen snapshot, every reviewer leaves a file on disk, and no skill marks itself as "done".
> The principle it is built on: the AI owns mechanical correctness; the user owns modeling judgment. It profiles data, runs method-specific risk probes, freezes numbers, render-checks figures, and audits consistency. It does not choose the method, decide what a number means, or invent the reasoning behind a choice.
> Found a bug, or want to share how it went in a real contest? Email [email protected], or open an issue.

Why this exists

When a team loses a modeling contest, it is rarely because they did not know enough models. It is usually one of these:

These are workflow problems, not modeling problems. The skills here are arranged to make these failures hard to hide.

What's different

| | A typical pipeline | This one | |---|---|---| | How you move on | "this stage is done, next" | Each gate has an explicit pass condition. Fail it and everything downstream gets marked stale. | | Which method, and why | The AI picks and writes the justification | You choose the trade-off; the AI screens a main candidate, a usable baseline, and at most one conditional fallback; you commit the route and reason (Gate G2.5). | | From idea to code | A method is accepted if the math looks right | A time-bounded risk probe checks data coverage, assumptions, output degeneracy, perturbation sensitivity, and scale (Gate G2). | | Code review | Someone says "looks fine" | A compact JSON review must pass named syntax, input, method-alignment, reproducibility, and output checks (Gate G3). | | Numbers in the paper | Re-read from the latest results each time | Frozen into frozen_numbers.json. Changing one means logging the change and re-freezing (Gate G4) | | Exploration cost | Full reports and audits at every step | lean keeps manifests, decisions, probes, and run summaries; submission adds freeze, paper, and final audits. | | "Done" | One QA pass | Three separate final auditors. Any one fails, the paper doesn't ship (Gate G6). | | Methods you dropped | Hang around the main folder | Get moved to workspace/archived/ so they don't accidentally end up in the paper |

The pipeline

workflow-orchestrator (reads interaction_mode + rigor_profile)
 ▼  problem-parser → problem-classifier → related-paper-analyzer       [ G1: PROBLEM_FRAMED ]
 ▼  symbol-table-builder + model-assumptions-builder + data-auditor-cleaner
 ▼  YOU choose priorities/risks/budget → method-selector
       main + usable baseline + optional triggered fallback
       method-specific risk probe (including output concentration)     [ G2: METHOD_SCREENED  ★ ]
 ▼  ── YOU commit the method choice + write why ──────────────────────  [ G2.5: CHOSEN_BY_HUMAN 👤 ]
 ▼  model-code-analyzer → {python,matlab}-model-code-generator
 ▼  code-reviewer (router) → named-check JSON review                   [ G3: CODE_AND_EXPERIMENT_REVIEWED ]
 ▼  result-report-generator (report only at a decision point/final)
 ▼  robustness-checker → final-method-explainer
 ▼  ── YOU choose proceed / adjust / activate fallback ───────────────  [ G4: JUDGED_BY_HUMAN 👤 ]
 ▼  figure-table-planner → math-figure-generator (render_check)
 ▼  switch rigor_profile to submission
 ▼  solution-package-builder ── emits frozen_numbers.json              [ G4: RESULTS_FROZEN   ★ ]
 ▼  paper-section-writer                                               [ G5: PAPER_SECTION_READY ]
 ▼  paper-polisher → reference-manager
 ▼  Independent audit layer (all three must PASS):
       consistency-auditor · completeness-auditor · quality-assurance-auditor
                                                                       [ G6: AUDIT_LAYER_PASSED ]
 ▼  final assembly

★ marks the two load-bearing boundaries: G2 catches assumption, concentration, feasibility, and scale failures before full implementation; G4 prevents stale numbers from entering the paper. 👤 marks judgments owned by the user.

The skills, by stage

Stage 1 · Groundwork

Before any modeling begins, get the basics in order: what the problem is asking, what type each subquestion is, what data is available, and a single symbol table the whole team shares.

Stage 2 · Method validation (Gate G2 ★)

Teams often discover only near the deadline that a method they had counted on does not run on the real data, when it is too late to switch. This stage is meant to surface that early.

Stage 3 · Code and review (Gate G3)

Write the code, then review it; the review is recorded as a file on disk, not a remark in chat.

Stage 4 · Results, robustness, figures, freeze (Gate G4 ★)

Turn the raw experiment outputs into two things: a package the writer can use directly, and a frozen JSON of every number that will appear in the paper. After the freeze, any change to a number must be logged and re-frozen rather than edited directly.

Stage 5 · Paper writing and audits (Gates G5 + G6)

The writer drafts the paper from the package and the frozen snapshot. Three independent auditors then check it: cross-file consistency, whether every reviewer file is present, and overall QA. If any one fails, the paper cannot be submitted.

Installing

This repository is packaged as a native plugin for both Claude Code and Codex/ChatGPT. One installer registers the repository's marketplace and installs the plugin for either or both hosts.

One-command native plugin install (recommended)

git clone https://github.com/zhnnky329/MathModeling-skills.git
cd MathModeling-skills
./install.sh

The default installs mathmodeling-skills for both hosts at user scope. Keep the clone: it is the local marketplace source used for updates. Start a new Claude Code or Codex session after installation.

Install only one host, preview the operations, or choose a Claude scope:

./install.sh --target claude
./install.sh --target codex
./install.sh --dry-run
./install.sh --target claude --scope project --project-dir /path/to/contest

Supported Claude scopes are user, project, and local. Codex currently manages plugin installation through its configured marketplace and does not use this scope flag.

Deploy the full project guardrails

Native plugin mode provides all 28 skills and their packaged workflow policy. To also place CLAUDE.md, AGENTS.md, Claude permissions/hooks, and standalone skill trees directly in a contest project, use project mode:

./install.sh --mode project --target both --project-dir /path/to/contest

The installer never silently overwrites a different file. On a conflict it stops; rerun with --force to move every replaced file or directory to a timestamped backup first:

./install.sh --mode project --target both --project-dir /path/to/contest --force

Use --dry-run with any command to inspect mutations first. Run ./install.sh --help for the complete option list.

Updating later

cd MathModeling-skills
git pull
./install.sh

Claude refreshes the registered marketplace and updates the installed plugin. Codex reinstalls from the current marketplace package. Start a new session after updating.

Native plugin layout

The .claude/skills/ and .codex/skills/ trees remain complete standalone development copies. Maintainers update both, then run ./scripts/sync-plugin.sh; ./scripts/sync-plugin.sh --check fails if the distributable package is stale.

Opening prompt

Send the initial prompt at the start of a new conversation:

Common follow-up prompts

Workspace layout

Click to expand
project/
├── planning/
│   ├── parse/  classification/  manifests/Qx.json
│   ├── symbol_table.md  model_assumptions.md
│   └── session_config.json     # interaction_mode + rigor_profile
├── methods/Qx/
│   ├── qx_method_card.md  qx_decisions.jsonl
│   └── probes/risk_probe_summary.json
├── code/
│   ├── Qx/                     # Python; reviews/qx_python_review.json
│   └── matlab/Qx/              # MATLAB (parallel structure)
├── results/Qx/
│   ├── experiments/roundN/     # figures / tables / metrics / run_summary.json
│   └── reports/                # final analysis + solution package + frozen_numbers.json
├── robustness/Qx/
├── paper/
│   ├── sections/
│   ├── figures/                # Type 3 + Type 4 (render_check passed)
│   ├── audits/                 # cross_media / completeness / reference / polish (Gate G6)
│   ├── refs.bib  main.tex  qa_report.md
├── workspace/
│   ├── data_raw/               # read-only (settings.json deny)
│   ├── data_clean/
│   └── archived//_REJECTED_roundN/
└── scratch/                    # temporary; nothing here has to be reproducible

A few hard rules: data_raw/ is read-only. Every paper number lives in frozen_numbers.json. [REJECTED] methods get archived automatically. frozen_numbers.json is never edited by hand.

What this isn't

⚠️ Your contest's rules are yours to check. AI-use policies differ sharply between contests and change every year — COMAP (MCM/ICM) currently allows disclosed AI assistance; CUMCM and several Chinese contests are originality-first and may not permit it at all. This repo encodes no contest's authoritative policy; its defaults aim at the strictest plausible reading. Every run can emit an ai_use_disclosure.md recording what was AI-drafted vs human-authored, so you can disclose honestly where required. Read your contest's current official rules before you rely on this — the final compliance call is yours.

Documentation

Contact

For a bug, an idea, or feedback from a real contest, email [email protected]. Issues and PRs are welcome too.

Acknowledgments

License

MIT.

GitHub Stars & Activity

1,023Stars
42Forks
5Open issues
ShellLanguage

GitHub Popularity

GitHub stars1,023
Forks42
Open issues5
Primary languageShell
LicenseMIT
Stars gained today44
Created2026-04-26
Last pushed2026-08-24

Trending History

Daily boardrank #69 · ▲ 44 stars

Related GitHub Projects

1

obra / superpowers

Shell★ 290,158⑂ 25,961▲ 526 stars
2

mattpocock / skills

Shell★ 267,759⑂ 22,588▲ 706 stars
3

0xNyk / council-of-high-intelligence

Shell★ 4,458⑂ 422▲ 69 stars
4

PrismML-Eng / Bonsai-demo

Shell★ 3,007⑂ 322▲ 78 stars
5

affaan-m / ECC

JavaScript★ 265,309⑂ 39,634▲ 805 stars
6

ossu / computer-science

HTML★ 209,372⑂ 25,901▲ 63 stars
7

jackfrued / Python-100-Days

Jupyter Notebook★ 186,784⑂ 55,759▲ 52 stars
8

anthropics / claude-code

TypeScript★ 147,640⑂ 24,130▲ 193 stars

More Trending Repositories