cutting-planes-valid-inequalities

cutting-planes-valid-inequalities is a skill for Claude Code from hajibabaie/combinatorial-optimization-skills. It costs 127 tokens per session (13,540 once invoked), scanned A, original, MIT.

Optimization techniques that add mathematically valid extra constraints, called cuts, to strengthen a mixed-integer model. A mixed-integer model contains both whole-number and continuous decision variables.

In plain words
What is it for?
Use them to derive cover, clique, MIR, Gomory, flow-cover, or subtour cuts; write routines that find violated cuts; and add them through Gurobi callbacks as user cuts or lazy constraints.
Why use it?
They can narrow the gap between the relaxed model and the best integer solution, helping a solver prove results faster. The guidance also checks whether the real issue is instead symmetry or loose big-M values.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the combinatorial-optimization plugin — 76 skills shipped together

Good fit Use them to derive cover, clique, MIR, Gomory, flow-cover, or subtour cuts; write routines that find violated cuts; and add them through Gurobi callbacks as user cuts or lazy constraints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hajibabaie/combinatorial-optimization-skills/cutting-planes-valid-inequalities
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 hajibabaie/combinatorial-optimization-skills --skill cutting-planes-valid-inequalities
Clone the repo
git clone --depth 1 https://github.com/hajibabaie/combinatorial-optimization-skills

Made for: Claude Code.

Or install combinatorial-optimization, the plugin that ships this one along with the rest of its 76 skills.

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 cutting-planes-valid-inequalities

README.md
[![agentmods](https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/cutting-planes-valid-inequalities/github.svg)](https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/cutting-planes-valid-inequalities)
Your own site
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/cutting-planes-valid-inequalities"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/cutting-planes-valid-inequalities/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 cutting-planes-valid-inequalities

Your own site · 80×15
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/cutting-planes-valid-inequalities"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/cutting-planes-valid-inequalities.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 13,540 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.
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.00127 $0.13540
Opus 5 $0.00063 $0.06770
Sonnet 5 $0.00025 $0.02708
Haiku 4.5 $0.00013 $0.01354

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

Security

Grade A, and why

cutting-planes-valid-inequalities 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 12d 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.

skills/cutting-planes-valid-inequalities/SKILL.md · 916 lines

How it starts

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

Cutting Planes and Valid Inequalities

You are an expert in polyhedral methods for integer programming: deriving valid inequalities, implementing separation routines, and wiring them into a branch-and-cut solver as user cuts or lazy constraints. This skill covers the general-purpose families (Chvátal-Gomory, Gomory fractional/mixed-integer, MIR) and the structure-specific families (cover, clique, subtour elimination, flow cover, (l,S)), plus the engineering of a separation loop in gurobipy. Use the framework below to decide whether cuts are the right lever, pick the family that matches the substructure, implement exact or heuristic separation, and validate that every generated cut is actually valid.

Initial Assessment

Before deriving or coding any cut, establish the following. Each answer changes the plan.

  • Why is the formulation weak? Measure the root gap: solve the LP relaxation, compare to the best known integer solution. Cuts attack a weak relaxation. If the gap comes from symmetry or loose big-M constants, fix the formulation first (see integer-programming-techniques) — no cut family repairs a bad model efficiently.
  • Is the constraint family required for correctness or only for strength? Subtour elimination in the DFJ TSP model is part of the model definition: without it, "optimal" solutions are wrong. That is a lazy constraint. A cover cut on a knapsack row only tightens the relaxation: the model is correct without it. That is a user cut. This single distinction drives the callback type, the parameters, and the failure modes.
  • What substructure does the model contain? Knapsack rows (sums of bounded variables against a capacity) suggest cover and lifted cover cuts. Pairwise conflicts between binaries suggest clique cuts. Single mixed rows suggest MIR. Connectivity requirements suggest cut-set inequalities. No recognizable structure suggests letting Gomory/MIR machinery inside the solver do the work.
  • Has the solver's own cut engine been given a chance? Gurobi separates Gomory, MIR, cover, clique, flow-cover, zero-half, and more by default. Try Params.Cuts = 2 (aggressive) and read the cut summary in the log before writing custom separation. Custom cuts pay off when you know structure the solver cannot see.
  • Exact or heuristic separation? Exact separation for covers and cliques is itself NP-hard (a knapsack and a max-weight clique, respectively), but pseudo-polynomial DP or greedy heuristics are standard. Subtour separation is polynomial (min cut). Decide what the time budget per node allows.
  • Problem size and cut volume. Estimate how many cuts a round can produce. Thousands of dense cuts can slow each LP reoptimization more than the bound improvement is worth.
  • Solver and license. The callback recipes here use gurobipy (cbCut, cbLazy). PySCIPOpt and python-mip/CBC offer equivalents; CP-SAT does not expose user cuts.
  • Data integrality. Cover-cut DP separation and pure Gomory arguments assume integer row data. Scale or round the data, or switch to MIR, when coefficients are fractional.
  • Validation plan. Every separation bug produces a cut that slices off the optimum, and the solver will not warn you. Keep at least one known feasible (ideally optimal) solution of a small instance and assert that every generated cut is satisfied by it.
  • Reporting needs. For research output, record bound-versus-round traces and percentage of root gap closed per cut family, not just final runtimes.

Read the full file on GitHub · 916 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. 12d ago First seen · 916 lines · 127 tokens per session scan A 1a4e0d28d3c7

Subscribe to this mod's changes

cutting-planes-valid-inequalities is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (7 stars, last pushed 3mo ago), licensed MIT. It adds 127 tokens to every session and 13,540 once invoked, about $0.0006 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-08-31.

Related

Other skills, from other repositories

top-design

Create award-winning, immersive web experiences at the level of Awwwards-featured agencies. Use when the user mentions "Awwwards quality", "make my site stunning", "scroll animations", "parallax storytelling", "cinematic web design", "portfolio site", or "brand experience". Also trigger when elevating a standard…

wondelai/skills · 113 tokens

design-everyday-things

Apply foundational design principles: affordances, signifiers, constraints, feedback, and conceptual models. Use when the user mentions "why is this confusing", "affordance", "error prevention", "discoverability", "human-centered design", "mental model", "mapping", "seven stages of action", "users keep making…

wondelai/skills · 132 tokens

web-typography

Select, pair, and implement typefaces for web projects. Use when the user mentions "font pairing", "which typeface", "line height", "responsive typography", "web font loading", "type hierarchy", "variable fonts", "FOUT/FOIT", "typographic scale", or "the text is hard to read". Also trigger when choosing between system…

wondelai/skills · 128 tokens

crossing-the-chasm

Navigate the technology adoption lifecycle from early adopters to mainstream market. Use when the user mentions "crossing the chasm", "beachhead segment", "whole product", "early adopters vs mainstream", "tech go-to-market", "bowling pin strategy", "technology adoption lifecycle", "pragmatist buyers", "growth stalled…

wondelai/skills · 139 tokens

architecture-optimization

Guided journey from a working codebase grown slow and tangled to one measurably fast, cleanly bounded, and readable. Orchestrates eight skills phase by phase - working-with-legacy-code, clean-architecture, software-design-philosophy, refactoring-patterns, system-design, ddia-systems, release-it, pragmatic-programmer …

wondelai/skills · 226 tokens

create-app

Guided journey from a raw app idea to a validated, cleanly architected first version that ships on a sustainable cadence. Orchestrates ten skills phase by phase - lean-startup, design-sprint, clean-architecture, domain-driven-design, clean-code, pragmatic-programmer, system-design, ios-hig-design, 37signals-way…

wondelai/skills · 217 tokens