cuopt-model-mapper
Skill473 starsChanged 9 months agoApache-2.0View on GitHub
Map interpreted optimization problems into cuOpt-native models for the fast path with minimal clarifying questions.
In this repository8 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
34 rules. About 0 are common, 32 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈32
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Use this skill in the fast path after the request has already been identified as an optimization problem and the data has been interpreted …
- Distinctive: line 27
avoid a heavyweight intermediate model
- Distinctive: line 28
ask only the smallest number of blocking questions
- Distinctive: line 35
Use this skill only when the following are already mostly clear:
- Distinctive: line 39
only a small number of unresolved modeling questions remain
- Distinctive: line 41
If those conditions are not met, first use:
- Distinctive: line 49
Do not introduce a replayable intermediate artifact unless the user asks for replayability, auditability, export, or reuse.
- Very specific: line 51
In NemoClaw sandbox: before building the cuOpt model, confirm cuopt-sandbox gates completed (probe → select gRPC capability → smoke test).
- Distinctive: line 53
Do not build a parallel heuristic assigner "first" — cuOpt is the first and only solver for assignments/schedules.
- Distinctive: line 59
Before building, confirm internally:
- Distinctive: line 66
Use the unresolved blocker list from ingestion as the starting point.
- Distinctive: line 68
If one non-retrievable modeling choice would change the meaning of the solve, ask exactly one concise blocking question.
- Distinctive: line 72
Do not deliver a greedy feasible schedule first.
- Very specific: line 85
use cuopt-numerical-optimization-api-python (or cuopt-numerical-optimization-api-cli for MPS inputs)
- Distinctive: line 106
Do this without building a full replayable artifact.
- Distinctive: line 109
use cuOpt whenever available and appropriate for the identified problem family
- Distinctive: line 111
verify that the result is sensible against the modeled constraints
- Distinctive: line 152
create one decision variable per product
- Distinctive: line 154
add one constraint per capacity/resource
- Distinctive: line 155
if products must be whole units, use integer variables
- Distinctive: line 166
ask only the final blocker question if needed, such as whether time windows are hard constraints
- Distinctive: line 172
no replay, export, or audit requirement is mentioned
- Distinctive: line 176
do not stop to build a replayable structured artifact
- Distinctive: line 177
keep only enough traceability to explain the result clearly in the current interaction
- Distinctive: line 181
Do not default to continuous variables when the decisions represent discrete units, counts, assignments, vehicles, workers, items, or …
- Distinctive: line 183
Ask if unclear, but if the problem statement strongly implies discreteness, model it as MILP rather than LP.
- Distinctive: line 187
Do not build a heavyweight intermediate representation for one-off solves.
- Distinctive: line 188
Do not skip a critical clarifying question if it changes the model meaning.
- Distinctive: line 189
Do not ask a long questionnaire when one focused question will unblock the solve.
- Distinctive: line 190
Do not use cuOpt for tasks that are really descriptive analytics.
- Distinctive: line 191
Do not force routing when the problem is actually allocation without path construction.
- Distinctive: line 192
Do not force QP when the objective is linear.
- Distinctive: line 196
Always report at least:
- Distinctive: line 203
If relevant, also mention which constraint or resource appears to be most limiting.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cuOpt Model Mapper
Use this skill in the fast path after the request has already been identified as an optimization problem and the data has been interpreted enough to support model construction.
This skill takes the working interpretation of the problem and maps it directly into cuOpt-native model objects.
Purpose
The fast path should avoid unnecessary architecture.
This skill exists to:
- build directly in cuOpt
- avoid a heavyweight intermediate model
- ask only the smallest number of blocking questions
- solve and return the result quickly
This skill is not for replayable/auditable artifact design. That belongs to a different path.
Preconditions
Use this skill only when the following are already mostly clear:
- the request is genuinely an optimization problem
- the problem family is identified as LP / MILP / QP / routing
- the uploaded data has been inspected enough to infer likely roles
- only a small number of unresolved modeling questions remain
If those conditions are not met, first use:
optimization-intent-routeroptimization-mode-routerif execution mode may matter for replayability, audit, export, or reusetabular-optimization-ingestion
Core rule
For the fast path, map directly from the interpreted data into cuOpt structures. Do not introduce a replayable intermediate artifact unless the user asks for replayability, auditability, export, or reuse.
In NemoClaw sandbox: before building the cuOpt model, confirm
cuopt-sandbox gates completed (probe → select gRPC capability → smoke test).
Do not build a parallel heuristic assigner "first" — cuOpt is the first
and only solver for assignments/schedules.
Workflow
1. Confirm the minimum viable formulation
Before building, confirm internally:
- what the decisions are
- what the objective is
- what the hard constraints are
- whether integrality is required
- whether the problem is numerical optimization or routing
Use the unresolved blocker list from ingestion as the starting point; do not reopen broad exploratory questioning unless the current interpretation is clearly inconsistent.
If one non-retrievable modeling choice would change the meaning of the solve, ask exactly one concise blocking question.
Scheduling with no stated objective: Feasibility (no double-booking, respect unavailability, assign every item) belongs in hard constraints. Do not deliver a greedy feasible schedule first. Ask one objective question if needed, or state a default secondary objective (e.g. balance slot times, minimize penalty slacks), then solve with cuOpt.
Examples:
- "Do these production quantities need to be whole numbers?"
- "Must all demand be met, or can unmet demand be allowed with a penalty?"
- "Are these time windows mandatory, or just preferred?"
2. Choose the cuOpt path
If LP / MILP
- hand off through
numerical-optimization-formulationfor formulation discipline - use
cuopt-numerical-optimization-api-python(orcuopt-numerical-optimization-api-clifor MPS inputs) - preserve direct mappings from source data into variables, coefficients, RHS values, bounds, and objective terms
If QP
- hand off through
numerical-optimization-formulationfor formulation discipline - use
cuopt-numerical-optimization-api-python - preserve direct mappings from source data into variables, quadratic objective terms, RHS values, and bounds
If routing
- hand off through
routing-formulation - use
cuopt-routing-api-python - map source data directly into locations, demands, vehicles, travel metrics, time windows, and pickup-delivery relationships
3. Preserve source-to-model traceability lightly
Even in fast mode, keep enough working traceability to avoid confusion during the same interaction.
At minimum, be able to state:
- which tables/columns drove the objective
- which tables/columns drove major constraints
- what each decision variable represents
Do this without building a full replayable artifact.
4. Solve with cuOpt
- use cuOpt whenever available and appropriate for the identified problem family
- verify solver status
- verify that the result is sensible against the modeled constraints
5. Explain results in user language
Return:
- recommended decisions
- objective value
- what the objective means in business terms
- any important bottlenecks or binding tradeoffs
- key assumptions that materially affect the answer
Direct mapping guidance
Numerical optimization mapping
Typical direct mappings include:
- per-row profit/cost columns → objective coefficients
- per-row resource consumption columns → constraint coefficients
- capacity table values → RHS limits
- min/max fields → variable bounds or additional constraints
- yes/no/open-close decisions → binary variables
- count decisions → integer variables
Routing mapping
Typical direct mappings include:
- customer/location rows → stops
- coordinate or matrix tables → travel metric inputs
- demand fields → stop demand
- vehicle table → fleet definition
- depot fields → start/end nodes
- time window columns → service time constraints
- pickup/delivery ids → paired stop relationships
Examples
Example 1: direct LP/MILP mapping
Interpreted problem:
- one row per product
profitcolumn is objective coefficientlabor_hoursandsteel_unitsare resource coefficients- a separate capacity table provides RHS limits
Fast-path mapping:
- create one decision variable per product
- maximize total profit
- add one constraint per capacity/resource
- if products must be whole units, use integer variables
Example 2: direct routing mapping
Interpreted problem:
- one row per customer stop
- vehicle table defines fleet
- travel-time matrix defines movement cost
- customer demand and time-window fields are available
Fast-path mapping:
- map stops, fleet, and travel data directly into cuOpt routing inputs
- ask only the final blocker question if needed, such as whether time windows are hard constraints
- solve and explain route recommendations
Example 3: do not overbuild
Interpreted problem:
- user wants a one-off answer from uploaded data
- no replay, export, or audit requirement is mentioned
Correct behavior:
- map directly into cuOpt
- do not stop to build a replayable structured artifact
- keep only enough traceability to explain the result clearly in the current interaction
Integrality rule
Do not default to continuous variables when the decisions represent discrete units, counts, assignments, vehicles, workers, items, or yes/no choices.
Ask if unclear, but if the problem statement strongly implies discreteness, model it as MILP rather than LP.
Fast-path guardrails
- Do not build a heavyweight intermediate representation for one-off solves.
- Do not skip a critical clarifying question if it changes the model meaning.
- Do not ask a long questionnaire when one focused question will unblock the solve.
- Do not use cuOpt for tasks that are really descriptive analytics.
- Do not force routing when the problem is actually allocation without path construction.
- Do not force QP when the objective is linear.
Result reporting requirements
Always report at least:
- solver status
- objective value
- brief explanation of what the objective means
- recommended decisions
- any assumptions or caveats that materially affect the result
If relevant, also mention which constraint or resource appears to be most limiting.
Handoff guidance
- For LP / MILP:
- use
numerical-optimization-formulation - then use
cuopt-numerical-optimization-api-python(orcuopt-numerical-optimization-api-clifor MPS inputs) - follow
cuopt-user-rules - in sandbox contexts, follow
cuopt-sandbox(gates + selected gRPC path) before any LP/MILP solve
- use
- For QP:
- use
numerical-optimization-formulation - then use
cuopt-numerical-optimization-api-python - follow
cuopt-user-rules - in sandbox contexts, follow
cuopt-sandbox(gates + selected gRPC path) before any QP solve
- use
- For routing:
- use
routing-formulation - then use
cuopt-routing-api-python - follow
cuopt-user-rules - in sandbox contexts, follow
cuopt-sandbox(gates + REST) before any routing solve
- use
Success criterion
This skill succeeds when the agent can go from:
- interpreted data
- plus zero or a few blocking clarifications
to:
- direct cuOpt model construction
- a validated solve
- and a clear business-facing answer
without introducing unnecessary replay/audit machinery.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

