·
Last changedVersion:
This version passed the hardening gate. Hardening updated the skill content and independently checked the resulting changes. Classified findings before hardening: 5. Classified findings closed: 0. Classified findings remaining: 5. Unclassified scanner findings remaining: 0. Review findings closed: 1. Review findings remaining: 10.
3
2
3
2
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
SKILL.md | Tool & MCP Manipulation | MCP over-permissioning | Medium | Open | |
BENCHMARK.md | Sensitive Data & Secret Exposure | Agent snooping | Medium | Open | |
SKILL.md | Excessive Agency & Rogue Autonomy | — | Medium | Open | |
benchmark/SOURCES.md | Prompt Injection | Third-party content as instructions | Low | Open | |
benchmark/SOURCES.md | Excessive Agency & Rogue Autonomy | — | Low | Open |
5 findings
Model and solve LP, MILP, and QP problems using NVIDIA cuOpt's GPU-accelerated solver. The Python API surface (Problem, SolverSettings, solve) is shared across all three problem classes — only the objective form and a few rules change.
Use a formulation summary (parameters, constraints, decisions, objective) if available; otherwise ask for decision variables, objective, and constraints. Then confirm problem type (LP / MILP / QP — see below) and variable types.
Decide from the objective and variables:
| If the objective is... | And variables are... | Use |
|---|---|---|
Linear (sum of | All continuous | LP |
Linear | Some integer or binary | MILP |
Has squared ( | Continuous (integer QP not supported) | QP (beta) |
Prefer LP when the problem allows it. LP solves faster and has stronger optimality guarantees. Use MILP only when the problem logically requires whole numbers or yes/no decisions. Use QP only when the objective is genuinely quadratic (variance, squared error, kinetic energy).
Problem types that need extra care: Multi-period planning and goal programming are easy to misinterpret. Double-check that rates and constraints apply to the right time period or priority level.
x*x or x*y terms (portfolio optimization, least squares, regularized regression).Choose variable type from what the problem describes.
| Problem wording / concept | Variable type | Examples |
|---|---|---|
Discrete entities (counts) | INTEGER | Workers, cars, trucks, machines, pilots, facilities, units to manufacture (when "units" means whole items), trainees, vehicles |
Yes/no or on/off | INTEGER (binary, lb=0 ub=1) | Open a facility, run a machine, produce a product line, assign a person to a shift |
Amounts that can be fractional | CONTINUOUS | Tonnes, litres, dollars, hours, kWh, proportion of capacity, flow volume, weight |
Rates or fractions | CONTINUOUS | Utilization, percentage, share of budget |
Unclear | Prefer INTEGER if the noun is a countable thing (a worker, a car); prefer CONTINUOUS if it's a measure (amount of steel, hours worked). If the problem says "whole" or "integer" or "number of", use INTEGER. |
Rule of thumb: If the quantity is "how many things" (people, vehicles, items, sites), use INTEGER. If it's "how much" (mass, volume, money, time) or a rate, use CONTINUOUS unless the problem explicitly requires whole numbers.
QP rules:
f(x), minimize -f(x).See references/qp_examples.md for least-squares, maximization-workaround, and matrix-form examples.
Status values use PascalCase, NOT ALL_CAPS:
LP Status Values: Optimal, NoTermination, NumericalError, PrimalInfeasible, DualInfeasible, IterationLimit, TimeLimit, PrimalFeasible
MILP Status Values: Optimal, FeasibleFound, Infeasible, Unbounded, TimeLimit, NoTermination
QP Status Values: Same set as LP. For QP debugging, print f"Actual status: '{problem.Status.name}'" and check that Q is PSD and variables are reasonably scaled.
When the problem says if we do X then we must also do Y, enforce both (i) the binary link and (ii) that Y is actually produced:
Otherwise the solver can set y_Y=1 but production_Y=0, satisfying the binary link but not the intent.
Chained + over many terms can hit recursion limits in the API. Prefer building objectives and constraints with LinearExpression:
See reference models in this skill's assets/ for examples.
| Problem | Likely Cause | Fix |
|---|---|---|
Status never "OPTIMAL" | Using wrong case | Use |
Integer var has fractional value | Defined as CONTINUOUS | Use |
Infeasible | Conflicting constraints | Check constraint logic |
Unbounded | Missing bounds | Add variable bounds |
Slow solve | Large problem | Set time limit, increase gap tolerance |
Maximum recursion depth | Building big expr with chained | Use |
QP rejected with MAXIMIZE | QP only supports MINIMIZE | Negate the objective: minimize |
QP returns non-optimal | Q not PSD or variables badly scaled | Check Q is PSD; rescale variables to similar magnitudes |
Duals and reduced costs are returned for LP and QP. They are not returned for a problem with quadratic constraints (every value comes back as NaN), so read them only when all constraints are linear. MILP returns no duals.
All reference models live in this skill's assets/ directory. Use them as reference when building new applications; do not edit them in place.
| Model | Type | Description |
|---|---|---|
LP | Minimal LP: variables, constraints, objective, solve | |
LP | Dual values and reduced costs | |
LP | PDLP warmstart for similar problems | |
MILP | Minimal MIP; includes incumbent callback example | |
MILP | Production planning with resource constraints | |
QP | Minimize portfolio variance; budget and min-return constraints | |
QP | Minimize (x-3)² + (y-4)² (closest point) | |
QP | Maximize quadratic via minimize -f(x) |
| Model | Type | Description |
|---|---|---|
LP/MILP | Solve any problem from standard MPS file format |
Quick command to list models: ls assets/ (from this skill's directory).
Use troubleshooting and diagnostic guidance if:
Get started with chainctlchainctl skill install public/nvidia/cuopt-numerical-optimization-api-python:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/nvidia/skills/cuopt-numerical-optimization-api-python:latest
Apache-2.0
BENCHMARK.md
HARDENING.md
LICENSE
SKILL.md
assets/README.md
assets/least_squares/README.md
assets/least_squares/model.py
assets/lp_basic/README.md
assets/lp_basic/model.py
assets/lp_duals/README.md
assets/lp_duals/model.py
assets/lp_warmstart/README.md
assets/lp_warmstart/model.py
assets/maximization_workaround/README.md
assets/maximization_workaround/model.py
assets/milp_basic/README.md
assets/milp_basic/incumbent_callback.py
assets/milp_basic/model.py
assets/milp_production_planning/README.md
assets/milp_production_planning/model.py
assets/mps_solver/README.md
assets/mps_solver/data/README.md
assets/mps_solver/data/sample.mps
assets/mps_solver/model.py
assets/mps_solver/results.md
assets/portfolio/README.md
assets/portfolio/model.py
benchmark/SOURCES.md
benchmark/evals.json
evals/evals.json
references/qp_examples.md
skill-card.md
skill.oms.sig