model-code-and-result-generator

model-code-and-result-generator is a skill for Claude Code, Codex from yushui2022/MathModel-Skill. It costs 99 tokens per session (2,269 once invoked), scanned A, original, MIT.

A coding workflow for mathematical-modelling papers. It turns a model plan and cleaned data into result definitions, modelling-code templates, and files that other paper-writing checks can use.

In plain words
What is it for?
Use it when analysing a mathematical-modelling competition problem and preparing reproducible results for a paper, including code, tables, and structured conclusions.
Why use it?
It keeps model outputs, evaluation measures, conclusions, tables, and code organised in one agreed structure. This reduces the risk of the paper and its code using different 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/yushui2022/mathmodel-skill/model-code-and-result-generator
Any agent
npx skills add yushui2022/MathModel-Skill --skill model-code-and-result-generator
Clone the repo
git clone --depth 1 https://github.com/yushui2022/MathModel-Skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for model-code-and-result-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/yushui2022/mathmodel-skill/model-code-and-result-generator.svg)](https://agentmods.dev/skills/yushui2022/mathmodel-skill/model-code-and-result-generator)
Your own site
<a href="https://agentmods.dev/skills/yushui2022/mathmodel-skill/model-code-and-result-generator"><img src="https://agentmods.dev/badge/skills/yushui2022/mathmodel-skill/model-code-and-result-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,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.00099 $0.02269
Opus 5 $0.00049 $0.01135
Sonnet 5 $0.00020 $0.00454
Haiku 4.5 $0.00010 $0.00227

Measured yesterday against content hash 42860026c14b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

model-code-and-result-generator 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 yesterday.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/build_result_contracts.py, scripts/result_contract_templates.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.

packages/claude/.claude/skills/model-code-and-result-generator/SKILL.md · 122 lines

How it starts

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

建模代码与结果证据生成器

全局流程协作约束(长对话防漂移)

  • 本 skill 不得作为孤立入口。用户要求完整论文、生成 Word、继续流程或不确定阶段时,先回到 paper-workflow-orchestrator 判断当前 S0-S8 阶段。
  • 启动或继续本 skill 的正式任务前,必须运行:
    python .claude/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --skill model-code-and-result-generator
    
  • 如果输出 [WORKFLOW FAIL] 或报告 status != "PASS",停止本 skill,按 paper_output/qa/workflow_guard_report.json 的失败项回补前置阶段,不得凭记忆继续。
  • 本 skill 只写入自己契约范围内的 paper_output/ 产物;完成后必须回到 paper-workflow-orchestrator 判断下一步,并用 context-memory-keeper 记录已完成产物、阻塞项和下一步。
  • 长对话中如果上下文变长、阶段不确定或用户分开调用 skill,先运行:
    python .claude/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --status
    
    再读取 paper_output/qa/workflow_guard_report.jsonpaper_output/preflight_report.jsonpaper_output/input_manifest.jsonpaper_output/results/run_manifest.json 和本 skill 的上游 JSON 契约,按报告里的 recommended_skillnext_action 继续。
  • 继续流程前,必须把 paper_output/context/workflow_memory.json 视为长期断点记录;若其中的 current_stepnext_steprecommended_skillworkflow_guard.py --status 不一致,以 guard 报告为准。
  • 每次完成本 skill 的产物后,先回到 paper-workflow-orchestrator 或运行 workflow_guard.py --status,再更新 workflow memory:
    python .claude/skills/context-memory-keeper/scripts/update_workflow_memory.py
    
    更新后读取 paper_output/context/workflow_memory.json / .md,确认下一步和推荐 skill 已记录。

目标

本 skill 不是万能自动建模系统。它的作用是给 Agent 一个稳定的“结果证据层”和可运行的赛题专用建模代码起点,避免正文只根据模型路线空写,也避免 Agent 面对数据时无头乱转。

真实赛题中,Agent 必须根据 model_route.json、数据字段、题目约束和评分要求二次修改生成的 q*_model.py。生成代码固定放在 paper_output/code/modeling/,不要写回 skill 包的 scripts/

执行契约

  • 上游输入:优先读取 paper_output/plan/model_route.jsondata_plan.jsonvisualization_plan.json,并扫描 paper_output/data_cleaned/
  • 必须输出:paper_output/results/model_results.jsonmetrics.jsonconclusions.jsonrun_manifest.jsonpaper_output/tables/table_index.jsonpaper_output/tables/*.csv
  • 建模代码输出:paper_output/code/modeling/result_contract_io.pyrun_modeling.pyq1_model.pyq2_model.pyq3_model.py 或与 question_id 对应的 q*_model.py
  • 下游交接:quality-assurance-auditor 直接审计结果、指标、表格、图表和结论;证据门禁 PASS 后由 paper-formal-writer 构建正式写作计划。
  • 失败回退:如果没有清洗数据或真实建模代码,仍生成契约骨架,并用 needs_real_modeling 标记,不伪装成最终比赛结果。

Read the full file on GitHub · 122 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday Changed 42860026c14b
  2. 5d ago First seen · 122 lines · 99 tokens per session scan A 254f450daa2f

Subscribe to this mod's changes

model-code-and-result-generator is a skill published in the GitHub repository yushui2022/MathModel-Skill (350 stars, last pushed today), licensed MIT. It adds 99 tokens to every session and 2,269 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

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

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

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

phylogenetics

Build and analyze phylogenetic trees using MAFFT (multiple alignment), IQ-TREE 2 (maximum likelihood), and FastTree (fast NJ/ML). Visualize with ETE3 or FigTree. For evolutionary analysis, microbial genomics, viral phylodynamics, protein family analysis, and molecular clock studies.

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

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

mapping-to-snomed

Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…

maziyarpanahi/openmed · 205 tokens