particle-swarm-optimization

particle-swarm-optimization is a skill for Claude Code from hajibabaie/combinatorial-optimization-skills. It costs 125 tokens per session (8,588 once invoked), scanned A, original, MIT.

A guide to particle swarm optimization, a search method that moves a group of candidate solutions through a problem's possible answers using their own and the group's best results.

In plain words
What is it for?
Use it to design, implement, tune, or diagnose particle swarm optimization, including velocity updates, swarm layouts, and discrete adaptations.
Why use it?
It helps choose the right version and settings for continuous values, binary choices, permutations, or schedules instead of treating every problem the same way.

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 to design, implement, tune, or diagnose particle swarm optimization, including velocity updates, swarm layouts, and discrete adaptations.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hajibabaie/combinatorial-optimization-skills/particle-swarm-optimization"><img src="https://agentmods.dev/badge/skills/hajibabaie/combinatorial-optimization-skills/particle-swarm-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,588 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.00125 $0.08588
Opus 5 $0.00063 $0.04294
Sonnet 5 $0.00025 $0.01718
Haiku 4.5 $0.00013 $0.00859

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

Security

Grade A, and why

particle-swarm-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 10d 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/particle-swarm-optimization/SKILL.md · 680 lines

How it starts

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

Particle Swarm Optimization

You are an expert in particle swarm optimization (PSO) for continuous and combinatorial optimization. This skill covers the canonical velocity/position dynamics, inertia and constriction variants, swarm topologies, parameter selection, and discrete adaptations (random-key decoding and probability-based binary PSO). Use the framework below to implement, configure, and diagnose PSO, and to decide when PSO is the right tool versus an alternative population method.

Initial Assessment

Establish the following before writing any code:

  • Search-space type. Continuous box-constrained vectors are PSO's native habitat. Permutations, subsets, and schedules require a decoder (random keys) or the binary variant. Identify which case applies — it changes the algorithm, not just a parameter.
  • Dimension d and bounds. Confirm explicit lower/upper bounds per variable. PSO needs them for initialization and velocity clamping. Note whether bounds are hard physical limits (must repair) or soft search-region hints.
  • Evaluation cost and total budget. Ask for the cost of one objective evaluation and the budget (evaluation count or wall-clock). PSO spends n_particles evaluations per iteration; a 40-particle swarm over 1,000 iterations is 40,000 evaluations.
  • Batch evaluability. Determine whether the objective can evaluate an (n_particles, d) matrix in one vectorized call. If yes, the whole swarm update is a handful of numpy operations and Python overhead disappears.
  • Multimodality. A roughly unimodal landscape favors gbest topology and aggressive convergence; a rugged landscape favors ring topology, restarts, and larger swarms.
  • Constraints beyond bounds. Decide the handling strategy up front: penalty in the objective, repair after the position update, or a feasibility-enforcing decoder.
  • Quality requirement. A good feasible solution within budget, or a near-optimal result that must beat a published baseline? The second demands tuning, multi-seed protocols, and a comparison method.
  • Gradients. If the objective is smooth and gradients are available, multistart L-BFGS will usually beat PSO. Use PSO when gradients are absent, noisy, or misleading.
  • Baseline. Always plan a sanity baseline: random search at equal budget, and differential evolution for continuous problems. PSO results without a baseline are uninterpretable.
  • Reproducibility. Fix seeds (np.random.default_rng(seed)), record every parameter, and plan at least 10-30 independent seeds for any reported comparison.

Read the full file on GitHub · 680 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. 10d ago First seen · 680 lines · 125 tokens per session scan A 3cb3e965169c

Subscribe to this mod's changes

particle-swarm-optimization is a skill published in the GitHub repository hajibabaie/combinatorial-optimization-skills (7 stars, last pushed 2mo ago), licensed MIT. It adds 125 tokens to every session and 8,588 once invoked, about $0.0006 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-08-31.

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