traveling-salesman-problem

traveling-salesman-problem is a skill for Claude Code from kishorkukreja/awesome-supply-chain. It costs 91 tokens per session (10,216 once invoked), scanned A, original, MIT.

A route-optimization problem in which one vehicle visits every listed location once and returns to its starting point. It is known as the Traveling Salesman Problem, or TSP.

In plain words
What is it for?
Use it to order a single tour through cities, customers, sites, or other locations when one vehicle must visit them all.
Why use it?
It helps find a shorter or faster visit order than planning stops by guesswork. The route can be evaluated by distance, travel time, or cost.

Skill for Claude Code

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

Part of the supply-chain-skills plugin — 133 skills shipped together , and of supply-chain-skills

Good fit Use it to order a single tour through cities, customers, sites, or other locations when one vehicle must visit them all.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kishorkukreja/awesome-supply-chain/traveling-salesman-problem
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 kishorkukreja/awesome-supply-chain --skill traveling-salesman-problem
Clone the repo
git clone --depth 1 https://github.com/kishorkukreja/awesome-supply-chain

Made for: Claude Code.

Or install supply-chain-skills, the plugin that ships this one along with the rest of its 133 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 traveling-salesman-problem

README.md
[![agentmods](https://agentmods.dev/badge/skills/kishorkukreja/awesome-supply-chain/traveling-salesman-problem/github.svg)](https://agentmods.dev/skills/kishorkukreja/awesome-supply-chain/traveling-salesman-problem)
Your own site
<a href="https://agentmods.dev/skills/kishorkukreja/awesome-supply-chain/traveling-salesman-problem"><img src="https://agentmods.dev/badge/skills/kishorkukreja/awesome-supply-chain/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.

agentmods 80×15 button for traveling-salesman-problem

Your own site · 80×15
<a href="https://agentmods.dev/skills/kishorkukreja/awesome-supply-chain/traveling-salesman-problem"><img src="https://agentmods.dev/badge/skills/kishorkukreja/awesome-supply-chain/traveling-salesman-problem.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,216 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00091 $0.10216
Opus 5 $0.00046 $0.05108
Sonnet 5 $0.00018 $0.02043
Haiku 4.5 $0.00009 $0.01022

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

Security

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 9d 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/traveling-salesman-problem/SKILL.md · 1,452 lines

How it starts

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

Traveling Salesman Problem (TSP)

You are an expert in the Traveling Salesman Problem and combinatorial optimization. Your goal is to help find the shortest possible route that visits each city exactly once and returns to the origin city, minimizing total travel distance or time.

Initial Assessment

Before solving TSP instances, understand:

  1. Problem Characteristics

    • How many cities/locations need to be visited?
    • Symmetric TSP (distance i→j = distance j→i) or asymmetric?
    • What metric? (Euclidean distance, travel time, cost)
    • Any special constraints? (time windows → see vrp-time-windows)
  2. Problem Scale

    • Small (< 20 cities): Exact methods feasible
    • Medium (20-100 cities): Advanced exact or good heuristics
    • Large (100-1000 cities): Metaheuristics required
    • Very large (> 1000 cities): Specialized algorithms
  3. Solution Requirements

    • Need proven optimal solution?
    • Acceptable optimality gap? (e.g., within 5% of optimal)
    • Time constraint for solution?
    • Single tour or multiple tours needed?
  4. Data Format

    • Coordinates (lat/lon, x/y)?
    • Distance matrix provided?
    • Need to calculate distances?
    • Real road network or Euclidean?

Mathematical Formulation

Classic TSP Formulation (MTZ)

Decision Variables:

  • x_{ij} ∈ {0,1}: 1 if arc (i,j) is in tour, 0 otherwise
  • u_i ∈ ℝ: Position of city i in tour (subtour elimination)

Parameters:

  • c_{ij}: Cost/distance from city i to city j
  • n: Number of cities

Objective Function:

Minimize: Σ_{i=1}^n Σ_{j=1}^n c_{ij} * x_{ij}

Constraints:

1. Each city has exactly one outgoing arc:
   Σ_{j=1}^n x_{ij} = 1,  ∀i

2. Each city has exactly one incoming arc:
   Σ_{i=1}^n x_{ij} = 1,  ∀j

3. Subtour elimination (Miller-Tucker-Zemlin):
   u_i - u_j + n*x_{ij} ≤ n-1,  ∀i,j ∈ {2,...,n}, i≠j

4. Variable bounds:
   x_{ij} ∈ {0,1}
   2 ≤ u_i ≤ n,  ∀i ∈ {2,...,n}

Alternative: DFJ (Dantzig-Fulkerson-Johnson) Formulation

Read the full file on GitHub · 1,452 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. 9d ago First seen · 1,452 lines · 91 tokens per session scan A be42cb2dfa31

Subscribe to this mod's changes

traveling-salesman-problem is a skill published in the GitHub repository kishorkukreja/awesome-supply-chain (67 stars, last pushed 12d ago), licensed MIT. It adds 91 tokens to every session and 10,216 once invoked, about $0.0005 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens