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 agentmods add skills/nvidia/cuopt/cuopt-numerical-optimization-formulationnpx skills add NVIDIA/cuopt --skill cuopt-numerical-optimization-formulationgit clone --depth 1 https://github.com/NVIDIA/cuoptWhat 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 | $0.00042 | $0.04382 |
| Opus 5 | $0.00021 | $0.02191 |
| Sonnet 5 | $0.00008 | $0.00876 |
| Haiku 4.5 | $0.00004 | $0.00438 |
Grade A, and why
cuopt-numerical-optimization-formulation 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 2d 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.
This is a copy
100% identical to cuopt-numerical-optimization-formulation — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 278 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Numerical Optimization Formulation
Concepts and workflow for going from a problem description to a clear formulation across LP, MILP, and QP. No API code here.
What is LP / MILP / QP
- LP: Linear objective, linear constraints, continuous variables.
- MILP: Same as LP plus some integer or binary variables (e.g., scheduling, facility location, selection).
- QP: Quadratic objective (e.g., x², x·y terms — portfolio variance, least squares), linear constraints. QP support in cuOpt is currently in beta.
Identifying problem type
| Property | LP | MILP | QP |
|---|---|---|---|
| Objective | Linear | Linear | Quadratic (xᵀQx + cᵀx) |
| Constraints | Linear | Linear | Linear + convex quadratic (inequality only) via second-order cones |
| Variables | Continuous | Mixed: continuous + integer/binary | Continuous |
| Sense | min or max | min or max | minimize only (negate to max) |
| Duals / sensitivity | Dual values + reduced costs | None (integer optima) | Dual values + reduced costs |
If the objective is purely linear, prefer LP/MILP — do not artificially introduce quadratic terms. If any variable is integer or binary, the problem is MILP regardless of the rest.
Post-solve sensitivity (LP / QP only). Continuous LP and QP solutions expose dual values (the marginal objective change per unit a binding constraint is relaxed: where to invest to improve the outcome) and reduced costs (for a variable the optimizer left at zero, how far it must improve to enter the solution: a near-miss). MILP solutions have no duals — integer optima are not continuous, so there are none to return. Duals are also unavailable when the model includes quadratic constraints — the second-order cone path returns primal values only. See the language-specific API skills for how to retrieve them after a solve.
Required formulation questions
Ask these if not already clear:
- Decision variables — What are they? Bounds?
- Objective — Minimize or maximize? Linear or quadratic? For QP: any squared or cross terms (x², x·y)? If maximize a quadratic, the user must negate and minimize.
- Constraints — Linear inequalities/equalities? Convex quadratic constraints (inequality only) are also supported, handled as second-order cones; non-convex or equality quadratic constraints are not.
- Variable types — All continuous (LP / QP) or some integer/binary (MILP)?
- Convexity (QP only) — For minimization, the quadratic form (matrix Q) should be positive semi-definite for well-posed problems.
What ships with it
4 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.
- 2d ago First seen · 278 lines · 42 tokens per session scan A 349af0dc4e57
cuopt-numerical-optimization-formulation is a skill published in the GitHub repository NVIDIA/cuopt (1,032 stars, last pushed 4d ago), licensed Apache-2.0. It adds 42 tokens to every session and 4,382 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cuopt-numerical-optimization-formulation, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
add-cuda-kernel
Step-by-step tutorial for adding new CUDA kernels to FlashInfer.
debug-cuda-crash
Tutorial for debugging CUDA crashes using API logging.
benchmark-kernel
Guide for benchmarking FlashInfer kernels with CUPTI timing.
cutedsl_megamoe
Skill "cutedsl_megamoe" from flashinfer-ai/flashinfer, covering updating the cutedsl megamoe kernel src, layout, when the kernel team drops a new version of src/ and what not to update here.
perf-torch-cuda-graphs
Apply CUDA Graphs to PyTorch workloads — API selection (torch.compile, PyTorch makegraphedcallables, TE makegraphedcallables, MCore CudaGraphManager, FullCudaGraphWrapper, manual torch.cuda.graph), code compatibility, capture workflows, dynamic pattern handling, and troubleshooting. Triggers: CUDA graph…
perf-optimization-casebook
Casebook of past successful and classic TensorRT-LLM optimizations (runtime/execution and kernel level) recorded as reusable decision precedents. Consult when deciding which optimization to apply for a classified bottleneck or a given config/model/hardware, to find prior art and adapt a proven approach instead of…