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.
npx skills add Morningstar202604/awesome-skillkit --skill model-solvergit clone --depth 1 https://github.com/Morningstar202604/awesome-skillkitWrote 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.
[](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/model-solver)<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/model-solver"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/model-solver/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/model-solver"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/model-solver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00167 | $0.03576 |
| Opus 5.5 | $0.00067 | $0.01430 |
| Sonnet 5.5 | $0.00033 | $0.00715 |
| Haiku 4.5 | $0.00017 | $0.00358 |
Grade A, and why
model-solver 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 2mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Model Solver(数学模型数值求解)
对数学模型做数值求解,返回解、目标值与求解器元数据。
本 skill 供「统计方法师」(academic-statistical-methodologist)使用。承接 model-formulator 输出的形式化模型,把"纸面模型"跑成"可信数值结果"。审稿人质疑最多的不是答案错,而是:解没收敛你就报数、方法选择没理由、没做稳健性、结果全靠一个随机种子。
这是什么
求解四段:
- 选方法:根据模型类型(线性/非线性优化、微分方程、概率估计、机器学习)选成熟算法,不自己造轮子。
- 跑通并诊断:收敛性、稳定性、数值误差、初值依赖逐项排查。
- 做检验:假设检验、多重比较校正、效应量、灵敏度/稳健性分析。
- 出可复现结果:固定随机种子、记录环境、代码与数据可追溯。
何时使用
- model-formulator 已交付变量表、假设集、目标与约束。
- 用户给了模型问"这个怎么解 / 用什么方法 / 结果对不对"。
- 论文 Results 部分需要数值表、收敛报告、稳健性检验。
- 团队 W1 的 Phase 3 方法分支、Phase 4 结果产出。
- 模型规格已就绪,需要最优解、积分或抽样结果时。
- 不用于文字问题形式化(→ model-formulator)与结果解释/作图(→ result-visualizer)。
适用决策表
| 情况 | 用不用本技能 | 原因 |
|---|---|---|
| 连续 LP(目标+线性约束,变量连续) | ✅ 脚本直解 | linprog/HiGHS 主路径 |
| ODE 初值问题 | ✅ 脚本直解 | solve_ivp,ode_method 可选 RK45/Radau/BDF/DOP853 |
| 蒙特卡洛估计(正态假设) | ✅ 脚本直解 | 高斯抽样 + p_exceed |
| MIP / MILP / ILP(含整数约束) | ⚠️ 脚本诚实拒绝(rc=2) | linprog 会静默忽略整数约束给出"假解";装 pulp 由 agent 写整数求解路径 |
| 非线性规划 / 二次规划 | ❌ 超出范围 | scipy.optimize 需要梯度与初值,交给 agent 现场写 |
| 文字题还没形式化 | ❌ 先走 model-formulator | 本技能只吃规格 JSON |
诚实声明(先读)
- 脚本真实覆盖 LP / ODE / Monte Carlo 三类。
compatibility里的 cvxpy/pulp/ortools 是"可能用到的生态"而非脚本内置:脚本从不调用它们,整数规划需要 agent 自行安装 pulp 并写求解代码。 --method参数只影响"分派哪个 solver 族"的预留位,不改变 LP 内部算法(恒 HiGHS);ODE 的积分方法用 spec 的ode_method字段。elapsed_ms为perf_counter实测(v1.1 起),可用于粗略对比,但对比求解器性能时应固定样本量/种子并多跑取中位数。- MIP 求解需求会得到
status:"unsupported"+ 退出码 2——这是设计行为:宁可诚实失败,不给连续假解。
输入清单
| 输入 | 必需 | 说明 |
|---|---|---|
| spec | 是 | model-formulator 产出的模型规格 JSON 文件路径 |
| method | 否 | 强制指定求解方法(覆盖自动分派) |
| output | 否 | 解结果写入文件 |
缺失时一次性问齐:「请提供:① spec(模型规格 JSON 路径,通常由 model-formulator 产出)。method/output 我按默认处理。」
前置自检
python3 --version
python3 -c "import scipy, numpy; print('deps OK', scipy.__version__)"
test -f scripts/model_solver.py && echo "OK script present"
- 预期:版本号输出;
deps OK打印;脚本存在。 - 若失败:缺 scipy/numpy →
pip install scipy numpy;脚本缺失 → STOP 回报。
工作流
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.
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.
- 2mo ago Changed · +61 lines · +34 tokens per session 14bde48555aa
- 2mo ago Changed · +133 tokens per session af97a63c023e
- 2mo ago Changed · +28 lines 41d524dfdaf5
- 2mo ago First seen · 111 lines · 0 tokens per session scan A b24344ea5f3d
model-solver is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 167 tokens to every session and 3,576 once invoked, about $0.0007 per session on Opus 5.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-09-19.
model-solver compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| model-solverMorningstar202604/awesome-skillkit | Skill | 0 | 2mo ago | Apache-2.0 | A | 167 | Claude Code, Codex |
| drug-discoveryNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 19 | Claude Code, Codex |
| sglang-diffusion-cache-ditsgl-project/sglang | Skill | 39k | today | Apache-2.0 | A | 161 | Claude Code |
| detecting-pv-signalsmaziyarpanahi/openmed | Skill | 5.9k | yesterday | Apache-2.0 | A | 218 | Claude Code |
| coding-icd10maziyarpanahi/openmed | Skill | 5.9k | yesterday | Apache-2.0 | A | 209 | Claude Code |
| deidentifying-clinical-textmaziyarpanahi/openmed | Skill | 5.9k | yesterday | Apache-2.0 | A | 144 | Claude Code |
| extracting-sdohmaziyarpanahi/openmed | Skill | 5.9k | yesterday | Apache-2.0 | A | 163 | Claude Code |