milp-solver-workflow

milp-solver-workflow is a skill for Claude Code, Codex from benchflow-ai/skillsbench. It costs 60 tokens per session (1,448 once invoked), scanned A, original, Apache-2.0.

A workflow for building and solving mixed-integer linear programs, which use yes-or-no or whole-number choices together with linear equations. It covers the full path from structured input to a checked final result.

In plain words
What is it for?
Use it for scheduling and other optimization models with integer decisions, solver limits, feasibility checks, and recomputed objectives.
Why use it?
It helps avoid incorrect variable links, indexing errors, numerical issues, and reports that do not match the solution actually found.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for scheduling and other optimization models with integer decisions, solver limits, feasibility checks, and recomputed objectives.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/benchflow-ai/skillsbench/milp-solver-workflow
About the project

SkillsBench is a benchmark for measuring how effectively AI agents use modular skills—folders containing instructions, scripts, and resources—to complete specialized tasks. It helps researchers and developers evaluate both skill quality and agent behavior, including tasks that require combining multiple skills. The catalogue’s skills and instructions are evaluated as part of this workflow.

benchflow-ai/skillsbench · 1,754 stars · on GitHub · skillsbench.ai

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.

Any agent
npx skills add benchflow-ai/skillsbench --skill milp-solver-workflow
Clone the repo
git clone --depth 1 https://github.com/benchflow-ai/skillsbench

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 milp-solver-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/milp-solver-workflow/github.svg)](https://agentmods.dev/skills/benchflow-ai/skillsbench/milp-solver-workflow)
Your own site
<a href="https://agentmods.dev/skills/benchflow-ai/skillsbench/milp-solver-workflow"><img src="https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/milp-solver-workflow/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.

agentmods 80×15 button for milp-solver-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/benchflow-ai/skillsbench/milp-solver-workflow"><img src="https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/milp-solver-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,448 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00060 $0.01448
Opus 5 $0.00030 $0.00724
Sonnet 5 $0.00012 $0.00290
Haiku 4.5 $0.00006 $0.00145

Measured 6d ago against content hash a7952b16cfda, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

milp-solver-workflow 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 6d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

tasks/energy-unit-commitment/environment/skills/milp-solver-workflow/SKILL.md · 175 lines

How it starts

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

MILP Solver Workflow

Use this skill for binary/integer decisions, linear constraints, and linear or piecewise-linear objectives. It is useful for time-expanded scheduling models with many repeated resource-period constraints.

This is a workflow and implementation guide, not a complete formulation for any one task.

Workflow

  1. Parse and normalize data into ordered arrays.
  2. Define decision states before coding: status, transitions, continuous quantities, slacks, segments, tiers.
  3. Build a deterministic variable map.
  4. Add constraints family by family: bounds, linking, balance, time coupling, capacity/ramp limits, cost logic.
  5. Solve with an available open-source MILP solver.
  6. Extract a candidate solution, rounding binaries only if near integral.
  7. Convert internal variables into the report convention.
  8. Independently validate extracted arrays.
  9. Recompute objective and summaries from extracted arrays.
  10. Write final output only after validation passes.

Variable Map Pattern

Use helper functions or dictionaries, not scattered index arithmetic.

offset = {}
n = 0

def alloc(name, shape, lb=0.0, ub=float("inf"), integer=False):
    global n
    size = int(np.prod(shape))
    idx = np.arange(n, n + size).reshape(shape)
    offset[name] = idx
    n += size
    return idx

u = alloc("commitment", (G, T), lb=0, ub=1, integer=True)
start = alloc("startup", (G, T), lb=0, ub=1, integer=True)
dispatch = alloc("dispatch", (G, T), lb=0)
reserve = alloc("reserve", (G, T), lb=0)

Keep variable ownership obvious: type, resource, period, and optional segment/tier.

Sparse Constraint Pattern

Use sparse rows for large time-expanded models:

rows, cols, vals = [], [], []
lb, ub = [], []
row = 0

def add_row(terms, lo, hi):
    global row
    for j, a in terms:
        if abs(a) > 0:
            rows.append(row)
            cols.append(j)
            vals.append(float(a))
    lb.append(float(lo))
    ub.append(float(hi))
    row += 1

Read the full file on GitHub · 175 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. 6d ago First seen · 175 lines · 60 tokens per session scan A a7952b16cfda

Subscribe to this mod's changes

milp-solver-workflow is a skill published in the GitHub repository benchflow-ai/skillsbench (1,754 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,448 once invoked, about $0.0003 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-09-03.