set-covering-packing-partitioning

set-covering-packing-partitioning is a skill for Claude Code from hajibabaie/combinatorial-optimization-skills. It costs 149 tokens per session (9,982 once invoked), scanned A, original, MIT.

A guide to set covering, set packing, and set partitioning, three related problems about choosing groups of items to cover, limit, or exactly match requirements. It includes exact integer models and approximation methods.

In plain words
What is it for?
Use it for crew scheduling, assignment and coverage models, greedy algorithms, linear-program rounding, and Lagrangian heuristics.
Why use it?
It helps express coverage rules correctly and select a solving approach when the problem is too large for an exact method alone.

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 it for crew scheduling, assignment and coverage models, greedy algorithms, linear-program rounding, and Lagrangian heuristics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hajibabaie/combinatorial-optimization-skills/set-covering-packing-partitioning
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 set-covering-packing-partitioning
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 set-covering-packing-partitioning

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/set-covering-packing-partitioning"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/set-covering-packing-partitioning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,982 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.00149 $0.09982
Opus 5 $0.00075 $0.04991
Sonnet 5 $0.00030 $0.01996
Haiku 4.5 $0.00015 $0.00998

Measured 8d ago against content hash 434bb8c3bb6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

set-covering-packing-partitioning 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 8d 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/set-covering-packing-partitioning/SKILL.md · 755 lines

How it starts

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

Set Covering, Packing, and Partitioning

You are an expert in integer programming and combinatorial optimization with deep experience in covering-type models. This skill covers the set covering problem (SCP), set packing, and set partitioning: exact MIP formulations, the greedy ln(n)-approximation, LP rounding, Lagrangian-based heuristics in the Caprara-Fischetti-Toth tradition, GRASP, and the crew-scheduling and column-generation context where these models dominate. Use the framework below to classify the variant first, then pick a solution path that matches instance size and optimality needs.

Initial Assessment

Establish these facts before writing any model or code:

  • Row semantics. Must each row be hit at least once (covering), exactly once (partitioning), or at most once (packing)? This single choice changes feasibility behavior, LP strength, and the right algorithm more than anything else.
  • Direction of the objective. Covering and partitioning minimize cost; packing maximizes profit. Confirm the user is not mixing the two (e.g., "maximize coverage" is a different model: maximal covering location, a budgeted variant).
  • Instance size and density. How many rows m, columns n, and what fraction of entries are nonzero? OR-Library SCP instances run from 200 x 1000 at 2% density to unicost instances at 5,000+ columns. Density drives both memory layout and LP difficulty.
  • Are the columns explicit or implicit? If columns are routes, crew pairings, or patterns that must be generated, this is a column-generation master problem, not a static MIP. Route the conversation accordingly.
  • Cost structure. Unicost (all c_j = 1) instances behave very differently from general-cost ones: LP bounds are weaker and greedy is less informative. Ask.
  • Side constraints. Base capacities in crew scheduling, cardinality limits, mutual-exclusion pairs. These break pure SCP structure and may push toward a plain MIP or branch-and-price.
  • Over-covering tolerance. In practice, can a row be covered twice (a deadheading crew, a doubly visited customer)? If yes, replace fragile partitioning constraints with covering plus a penalty.
  • Solver availability and time budget. Gurobi licensed? Seconds or hours? Proven optimal or "good cover fast"? Gurobi solves most general-cost SCPs of moderate size outright; large unicost and partitioning instances are where heuristics earn their keep.
  • Validation requirements. Agree up front that every reported solution passes an independent feasibility and objective check, separate from the model code.

Read the full file on GitHub · 755 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. 8d ago First seen · 755 lines · 149 tokens per session scan A 434bb8c3bb6a

Subscribe to this mod's changes

set-covering-packing-partitioning is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (7 stars, last pushed 3mo ago), licensed MIT. It adds 149 tokens to every session and 9,982 once invoked, about $0.0007 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-09-03.

Related

Other skills, from other repositories

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.

oliver-kriska/claude-elixir-phoenix · 58 tokens

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.

oliver-kriska/claude-elixir-phoenix · 60 tokens

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.

oliver-kriska/claude-elixir-phoenix · 40 tokens

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.

oliver-kriska/claude-elixir-phoenix · 48 tokens

brainstorm

Brainstorm Elixir/Phoenix features — explore ideas, compare approaches, gather requirements. Use when vague idea, not sure how to approach, or want to discuss before plan.

oliver-kriska/claude-elixir-phoenix · 39 tokens

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.

oliver-kriska/claude-elixir-phoenix · 46 tokens