simulated-annealing

simulated-annealing is a skill for Claude Code from hajibabaie/combinatorial-optimization-skills. It costs 134 tokens per session (9,803 once invoked), scanned A, original, MIT.

A guide to simulated annealing, a search method that explores many possible solutions while gradually becoming less willing to accept worse ones. It is used for hard choice and ordering problems.

In plain words
What is it for?
Use it to design or implement cooling schedules, temperature settings, reheating, restarts, and stopping rules for combinatorial optimization.
Why use it?
It helps local search escape a poor solution where small improvements are no longer available. It also explains how to tune the search so its settings are reproducible.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the combinatorial-optimization plugin — 76 skills shipped together

Good fit Use it to design or implement cooling schedules, temperature settings, reheating, restarts, and stopping rules for combinatorial optimization.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/simulated-annealing"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/simulated-annealing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,803 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.00134 $0.09803
Opus 5 $0.00067 $0.04901
Sonnet 5 $0.00027 $0.01961
Haiku 4.5 $0.00013 $0.00980

Measured 7d ago against content hash 070a6de4772d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

simulated-annealing 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 7d 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/simulated-annealing/SKILL.md · 687 lines

How it starts

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

Simulated Annealing

You are an expert in simulated annealing (SA) for combinatorial optimization. This skill covers the Metropolis acceptance rule, cooling-schedule design (geometric, Lundy-Mees, logarithmic, adaptive), initial-temperature calibration, plateau lengths, stopping rules, reheating, and restart strategies, with implementation-grade Python. Use the framework below to take a user from "local search gets stuck" to a calibrated, reproducible SA implementation with a defensible parameter story.

Initial Assessment

Establish these facts before writing any SA code:

  • Objective and move set. What is minimized, and what is one elementary move (swap, recolor, flip, insertion)? SA is only as good as its neighborhood; if the move set is undecided, design it first (see local-search-and-neighborhoods).
  • Delta evaluation cost. Can the objective change of a move be computed in O(1) or O(n) instead of recomputing from scratch? SA performs millions of evaluations; without cheap deltas it is rarely competitive.
  • Problem size and evaluation budget. Instance size, time budget in seconds, and measured moves-per-second together fix the total move count. The cooling schedule must be derived from that count, not chosen in a vacuum.
  • Hard vs soft constraints. Decide per constraint: keep it satisfied by construction (feasibility-preserving moves such as Kempe chains), or penalize violations in the objective. Penalty weights interact with temperature, so this choice shapes calibration.
  • Objective scale. Temperature has the same units as the objective. Note the typical magnitude of a move's objective change; calibration depends on it, not on the absolute objective value.
  • Quality requirement. Is the goal a quick 5%-gap solution, or near-best-known on benchmark instances? The first allows a fast schedule; the second needs long plateaus, slow cooling, and replications.
  • Baseline. Is there an existing greedy/hill-climbing baseline to beat? Always run plain first-improvement descent first; if SA cannot beat it, the temperature schedule is broken.
  • Competing methods. If a strong problem-specific local search exists, iterated local search or tabu search often beats SA (e.g., robust tabu search dominates SA on QAP). Choose SA when the landscape is rugged, deltas are cheap, and simplicity or anytime behavior matters.
  • Reproducibility needs. Number of seeds per instance, reporting format (best/mean/std), and whether results feed a statistical comparison.
  • Termination contract. Wall-clock limit, move limit, target objective, or stagnation rule — pick one primary criterion now, because the schedule is derived from it.

Read the full file on GitHub · 687 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. 7d ago First seen · 687 lines · 134 tokens per session scan A 070a6de4772d

Subscribe to this mod's changes

simulated-annealing is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (7 stars, last pushed 2mo ago), licensed MIT. It adds 134 tokens to every session and 9,803 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

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

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

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.

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