network-flow-optimization

network-flow-optimization is a skill for Claude Code from hajibabaie/combinatorial-optimization-skills. It costs 148 tokens per session (11,502 once invoked), scanned A, original, MIT.

A guide and implementation reference for network-flow optimization: finding routes, sending the most flow, or moving goods through connected nodes and links. It covers methods such as Dijkstra and Bellman-Ford as well as linear and mixed-integer models.

In plain words
What is it for?
Use it for shortest paths, maximum flow, minimum-cost flow, transshipment, and multicommodity flow problems, including implementations with NetworkX or Gurobi.
Why use it?
It helps identify when a problem is a standard flow problem that can be solved with a specialized algorithm instead of a more expensive general model.

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 shortest paths, maximum flow, minimum-cost flow, transshipment, and multicommodity flow problems, including implementations with NetworkX or Gurobi.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/network-flow-optimization"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/network-flow-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 148 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 11,502 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.00148 $0.11502
Opus 5.5 $0.00059 $0.04601
Sonnet 5.5 $0.00030 $0.02300
Haiku 4.5 $0.00015 $0.01150

Measured 1mo ago against content hash 3234e550b595, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

network-flow-optimization 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 1mo 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/network-flow-optimization/SKILL.md · 891 lines

How it starts

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

Network Flow Optimization

You are an expert in network flow optimization: shortest paths, maximum flow, minimum-cost flow, and multicommodity flow. This skill covers the LP/MIP view (total unimodularity, when integrality is free, when it is lost), dedicated combinatorial algorithms, and networkx + gurobipy implementations, plus instance generation and independent validation. Use the framework below to classify the problem, pick the cheapest adequate method, and verify the result.

Initial Assessment

Establish these points before formulating or recommending a method:

  • Which flow problem is it, exactly? Shortest path, max flow, min-cost flow, transshipment, or multicommodity? Many word problems hide a pure flow structure; finding it replaces a MIP solve with a polynomial algorithm.
  • Single commodity or several? One commodity keeps total unimodularity and free integrality. Commodities that share arc capacities destroy both; the splittable version is still an LP, the unsplittable version is NP-hard.
  • Side constraints. Fixed charges for opening arcs, logical conditions, budget constraints, or arc-flow lower bounds tied to binaries all break the network structure. Plan for a MIP the moment one appears.
  • Sizes. Nodes n, arcs m, commodities K. networkx handles m up to ~10^5 comfortably; OR-Tools' C++ flow solvers handle 10^6-10^7 arcs; the LP/MIP route in Gurobi handles n_vars = m·K, so estimate that product early.
  • Sign of arc costs. Negative costs rule out plain Dijkstra. Check for negative cycles: with them, min-cost flow needs care and shortest path becomes NP-hard (it turns into longest path).
  • Directed or undirected. Most algorithms and all formulations below assume directed arcs. Undirected edges with nonnegative cost become two opposite arcs; with negative cost they do not, so flag that case.
  • Data type. Integral capacities/demands enable the integrality theorem and networkx's min_cost_flow (which requires integers). Float data must be scaled, or you must use the LP route.
  • Balance check. Do supplies equal demands (sum of b_i = 0)? If not, decide where the slack goes (dummy node, inequality balances).
  • Solve count. One-off solve, or thousands of shortest-path calls inside a pricing loop or heuristic? Embedded use changes tooling (reusable arrays, scipy.csgraph, warm potentials).
  • Solver availability. Gurobi licensed? If not, networkx + OR-Tools + scipy cover everything here; the LP/MIP models run on HiGHS.
  • Deliverable. Flow values only, or also duals/potentials, the min cut, and a sensitivity story? This decides LP route vs pure algorithm.
  • Validation path. Agree up front that every reported flow passes the independent feasibility and objective check provided below.

Read the full file on GitHub · 891 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. 1mo ago First seen · 891 lines · 148 tokens per session scan A 3234e550b595

Subscribe to this mod's changes

network-flow-optimization is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (14 stars, last pushed 4mo ago), licensed MIT. It adds 148 tokens to every session and 11,502 once invoked, about $0.0006 per session on Opus 5.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

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

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

traction-eos

Implement the Entrepreneurial Operating System (EOS) to align vision and execution across a company. Use when the user mentions "EOS", "Entrepreneurial Operating System", "V/TO", "quarterly rocks", "Level 10 meetings", "accountability chart", "IDS process", "my company feels chaotic", "we keep having the same…

wondelai/skills · 147 tokens

analyze

Analyze a legacy app in any language before rewriting it in Elixir: inventory, features as goals, why each mechanism exists, runtime topology, external contracts. Use to start or refresh a rewrite.

oliver-kriska/claude-elixir-phoenix · 42 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

watch-pr

Watch an Elixir/Phoenix PR for new review comments (bot + human) and CI results via a background watcher that wakes Claude only on real events. Use after opening a PR or pushing, while waiting on CI or reviewers.

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