model-programmer

A programming workflow for implementing mathematical models, running them, recording results, and creating evidence-based charts.

In plain words
What is it for?
Use it to check Python or MATLAB environments, write and run model code, export result tables, create diagnostic and final-result figures, and track repeated values for a paper.
Why use it?
It reduces the risk of conclusions being based on unrun code, unreproducible numbers, unsuitable data splits, or charts that do not reflect the model's results.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mrsgsa/math-modeling-skill-dify/model-programmer
Any agent
npx skills add MrSGSA/math-modeling-skill-dify --skill model-programmer
Clone the repo
git clone --depth 1 https://github.com/MrSGSA/math-modeling-skill-dify

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.01269
Opus 5 $0.00022 $0.00634
Sonnet 5 $0.00009 $0.00254
Haiku 4.5 $0.00004 $0.00127

Measured 3d ago against content hash ebc69467a1bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

model-programmer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check_env.py, scripts/repro_manifest.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/math-modeling/references/roles/model-programmer/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

编程手

路径

  • ROLE_ROOT:本文件所在目录。
  • SKILL_ROOTROLE_ROOT/../../..,只读。
  • PROJECT_ROOT:用户项目目录,所有代码、结果和图只写这里。

输入

优先读取 PROJECT_ROOT/题目分析报告.mdPROJECT_ROOT/术语表格.md 和题目附件。若用户只执行本阶段,可从用户提供的模型说明开始;若说明不足以实现,先反馈缺项。

固定产物

  • 用户或竞赛指定环境中的可运行代码;本 Skill 内置 Python .py 与 MATLAB .m 的环境检查和复现支持。
  • results/ 中的运行结果表格和必要文本结果。
  • figures/ 中支撑结论所需的原始数据图、模型运行过程/诊断图和模型最终结果图;图的数量与格式由证据、复现和交付要求决定。
  • results/复现清单.json
  • results/result_registry.json:所有将进入摘要、正文、表格和图片标注的重复数值,以稳定唯一键记录来源、单位、精度和生成命令。

执行顺序

  1. 编码前比较目标竞赛允许的语言与当前可用环境,并在交付说明或复现清单中用一句话记录选择依据:
    • 用户指定语言或已有项目明确使用某语言时,优先保持一致。
    • 矩阵密集型数值计算、非线性方程/优化、常微分方程、符号推导、控制与仿真问题,在所需工具箱可用时优先考虑 MATLAB。
    • 大规模数据清洗、机器学习生态、地理空间/网络数据、自动化管线或需要开源环境复现时优先考虑 Python。
    • 多种语言都能满足要求且用户未指定时,比较算法生态、现有代码、许可证/工具箱、运行环境、协作与可复现性后选择总风险更低的一种;竞赛名称本身不构成优先某种语言的理由。
    • 只有交叉验证确有价值或用户明确要求时才同时实现两套代码,避免无效重复。
  2. 按选中的模型功能动态检查依赖,禁止一次性要求全部包。Python 与 MATLAB 使用本 Skill 的检查脚本;其他运行时记录版本、包/工具箱、许可证状态和实际探测命令:
    • Python:python scripts/check_env.py --features data visualization optimization
    • MATLAB:check_matlab_env(["data","visualization","optimization"])
  3. 写代码、运行、验证数值与边界条件;数据拆分须尊重时间、空间、个体和重复组结构,预处理与调参只在允许的数据内拟合,最终验证集不得反复参与选择。任何结论必须来自真实输出。
  4. 按证据需要生成原始数据、过程/诊断和最终结果图中的适用类型;网格线、参考线和输出格式由读图任务、官方要求及目标媒介决定。统计标注必须由代码从当前数据计算。
  5. 生成复现清单:python scripts/repro_manifest.py --project-root <PROJECT_ROOT> ...
  6. 读取 ../../参数语义与约束审计.md,把建模手的参数语义合同实现为代码边界、单位断言和全研究域行为检查。输出所有核心参数及其派生函数/状态,而不是只输出目标值或拟合优度。
  7. 参数越界、贴边、符号/单调性反常、跨数据漂移、强耦合或依赖外部锚点时,必须用同数据同预算运行无约束与合理约束对照,并记录参数、核心输出、拟合指标和结论变化。优化器收敛或残差更小不得替代物理/统计合法性。
  8. 对适用问题生成反例、极端边界、网格收敛、多随机种子、资源删除和候选指派结果;无法执行的检查记录理由,不得默认为通过。
  9. 生成 results/result_registry.json。每个重复使用的结果以稳定唯一键记录 valueunitprecisionsourcegenerated_bysource 指向项目内实际存在的机器可读结果或配置文件,并可附字段定位。禁止论文构建脚本再次手写已有结果数值。
  10. references/质检清单.md 验收,再交给评审手。

何时加载

情形 读取
开始实现 references/工作流程.md
使用 MATLAB references/MATLAB规范.md
画图 references/可视化规范.md
需要图表函数 references/常见模式.md
需要具体算法 ../../../references/算法索引.md,再按索引分段读取匹配的 ../../../references/algorithms/*.md
处理 Excel ../../../tools/xlsx/SKILL.md
交付前 references/质检清单.md

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 59 lines · 44 tokens per session scan A ebc69467a1bd

Subscribe to this mod's changes

model-programmer is a skill published in the GitHub repository MrSGSA/math-modeling-skill-dify (4 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 1,269 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

jupyter-notebook

Use when the user asks to create, scaffold, or edit Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script newnotebook.py to generate a clean starting notebook.

microsoft/ai-agents-for-beginners · 57 tokens

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…

K-Dense-AI/scientific-agent-skills · 76 tokens

esm

Use when working directly with the esm Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.

K-Dense-AI/scientific-agent-skills · 39 tokens

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

K-Dense-AI/scientific-agent-skills · 50 tokens

marimo-pair

Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.

marimo-team/marimo · 57 tokens

quantum-qiskit

Reference qiskit 2.x patterns for variational quantum machine learning. Covers data-encoding feature maps, variational quantum classifier (VQC) training, variational quantum eigensolver (VQE) for chemistry, matrix-product-state circuits, and noise model integration. Use when writing Python code that imports qiskit…

aiming-lab/AutoResearchClaw · 102 tokens