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 skills add hajibabaie/combinatorial-optimization-skills --skill traveling-salesman-problemgit 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/traveling-salesman-problem)<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/traveling-salesman-problem"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/traveling-salesman-problem/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.
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/traveling-salesman-problem"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/traveling-salesman-problem.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00152 | $0.11148 |
| Opus 5 | $0.00076 | $0.05574 |
| Sonnet 5 | $0.00030 | $0.02230 |
| Haiku 4.5 | $0.00015 | $0.01115 |
Grade A, and why
traveling-salesman-problem 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.
How it starts
The opening of the file, as written. The whole thing — 900 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Traveling Salesman Problem
You are an expert in the traveling salesman problem. This skill covers exact MIP formulations (MTZ vs DFJ with lazy subtour cuts in Gurobi), construction heuristics (nearest neighbor, greedy edge, Christofides), 2-opt/3-opt/Or-opt local search, the Lin-Kernighan idea, TSPLIB conventions, instance generation, and independent solution validation. Use the framework below to pick the method that fits the instance size and quality target, and to deliver tours verified by code independent of their producer.
Initial Assessment
Establish these facts before formulating or writing any code:
- Instance size. n ≤ 20: Held-Karp DP is exact and trivial (see dynamic-programming). n ≤ ~100: MTZ is acceptable, DFJ is better. n ≤ ~5,000: DFJ with lazy cuts (or Concorde) solves most Euclidean instances to optimality. Beyond that: heuristics with Held-Karp bound for the gap report, or LKH.
- Symmetric or asymmetric? c_ij = c_ji or not? This changes the formulation (edge vs arc variables), the valid local-search moves (2-opt deltas are wrong under asymmetry because segment reversal changes arc directions), and the available codes.
- Metric or not? Christofides' 3/2 guarantee needs the triangle inequality. Distances from road networks usually satisfy it; penalized or forbidden arcs may not.
- Distance convention. TSPLIB EUC_2D rounds each distance to the nearest integer. Comparing a float-distance tour length against published optima is the single most common TSP reporting error. Fix the convention before benchmarking.
- Data format. Coordinates (compute distances on the fly or once) vs explicit matrix. A float64 matrix needs 8n² bytes: 800 MB at n = 10,000. Above a few thousand cities, plan k-nearest-neighbor candidate lists instead of full matrices.
- Exact or heuristic? What gap is acceptable, and must it be proven? A proven 0% gap requires the MIP/Concorde route; "within ~1-2% almost surely" is cheap with 2-opt + Or-opt inside a metaheuristic.
- Time budget. Seconds, minutes, hours? DFJ with lazy cuts may need minutes at n = 1,000; a 2-opt descent takes milliseconds.
- Solver availability. Gurobi license present? If not, plan OR-Tools or HiGHS-based fallbacks (the formulations below transfer directly).
- Is it really a TSP? Multiple vehicles, capacities, time windows, or depots make it a VRP (see vehicle-routing-problem). An open path (no return), fixed endpoints, or precedence constraints change the model; see the transformations under Advanced Techniques.
- Reproducibility. Seed every random construction and perturbation
(
np.random.default_rng(seed)) and record solver parameter settings with results.
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.
- 8d ago First seen · 900 lines · 152 tokens per session scan A de9a7655674e
traveling-salesman-problem is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (7 stars, last pushed 3mo ago), licensed MIT. It adds 152 tokens to every session and 11,148 once invoked, about $0.0008 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.
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.
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.
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.
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.