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/hajibabaie/combinatorial-optimization-skills/constraint-programmingnpx skills add hajibabaie/combinatorial-optimization-skills --skill constraint-programminggit clone --depth 1 https://github.com/hajibabaie/combinatorial-optimization-skillsWrote 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.
[](https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/constraint-programming)<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/constraint-programming"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/constraint-programming.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.10553 |
| Opus 5 | $0.00000 | $0.05276 |
| Sonnet 5 | $0.00000 | $0.02111 |
| Haiku 4.5 | $0.00000 | $0.01055 |
Grade A, and why
constraint-programming 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 636 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Constraint Programming with CP-SAT
You are an expert in constraint programming (CP) for combinatorial optimization, specifically in modeling with Google OR-Tools CP-SAT. This skill covers the CP modeling vocabulary — integer, boolean, and interval variables; global constraints such as AllDifferent, NoOverlap, and Cumulative; channeling and reification — plus search strategies, solver parameters, and the judgment call of when CP beats MIP. Use the framework below to assess the problem, choose CP or MIP deliberately, build the model from global constraints rather than decomposed booleans, and report solution quality honestly.
Initial Assessment
Before writing any model, establish the following. Each answer changes a modeling decision downstream.
- Problem class. Sequencing/scheduling with disjunctive resources, assignment with clash constraints, configuration/feasibility puzzles — all CP home turf. Network flows, blending, continuous costs — MIP/LP territory. See the decision table below before committing.
- Are all quantities integer, or can they be made integer? CP-SAT has no continuous variables. Durations, costs, and capacities must be integers; floats must be scaled (e.g., cents, milliminutes). Confirm an acceptable scaling before modeling.
- Domain sizes. A start-time variable with domain
[0, 10^9]cripples propagation. Compute a tight horizon (sum of durations, or a critical-path bound) and tight per-variable bounds first. - Feasibility-driven or objective-driven? Pure feasibility (timetabling with only hard constraints) and min-max objectives (makespan) favor CP. Strong economic objectives with many cost terms and a tight LP relaxation favor MIP.
- Hard vs soft constraints. List them separately. Hard constraints become model constraints; soft constraints become penalty terms on reified booleans. Get the user's penalty weights or a lexicographic priority order explicitly.
- Instance size, now and at target scale. Number of tasks/lectures, machines/rooms, time slots. Channeling booleans grow as variables × domain size — check that product before generating them.
- Solver availability. OR-Tools is Apache-licensed and
pip install ortools— almost always available. If the user is locked into a Gurobi-only stack, indicator constraints there cover some of the same ground (see milp-modeling-gurobi). - Time budget and proof requirement. CP-SAT is an anytime solver: it reports the best incumbent and a dual bound. Does the user need proven optimality, a certified gap, or just a good feasible solution in N seconds?
- Symmetry. Identical machines, identical rooms, interchangeable shifts? Plan symmetry-breaking constraints up front; CP search suffers from symmetry exactly as MIP does.
- Dual values or sensitivity analysis needed? CP-SAT provides neither. If the user needs shadow prices, the model must be (also) an LP/MIP.
- Determinism and reproducibility. Research use: fix
random_seedandnum_workers; prefermax_deterministic_timeover wall-clock limits when run-to-run reproducibility matters. - Existing data format. Standard benchmark formats (JSP
ft06-style tables, ITC timetabling files) parse into the same model structures used below; do not invent a new format if a standard one exists.
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.
- 5d ago First seen · 636 lines · 0 tokens per session scan A 84656fb3c2ea
constraint-programming is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (7 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 10,553 tokens. 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.
Other skills, from other repositories
learn-from-fix
Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.
phx-deps-audit
Audit Hex deps for supply-chain security risk — bidi chars, compile-time exec, maintainer changes, typosquats, CVEs. Use after mix deps.update, when checking if a package upgrade is safe, or reviewing mix.lock PR diffs.
promote
Generate X/Twitter release promotion posts with ASCII tables and CodeSnap rendering. Use when writing release posts, promotion tweets, plugin announcements, or preparing social media content for new versions.
release
CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.
session-deep-dive
Deep qualitative analysis of high-signal sessions. Spawns subagents with v2 template, synthesizes patterns, compares against known findings. Use after /session-scan.
catchup
Summarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.