matchmaking-system

matchmaking-system is a skill for Claude Code from fcsouza/agent-skills. It costs 116 tokens per session (2,489 once invoked), scanned A, original, MIT.

A set of guidance for building systems that place players into suitable game matches. Matchmaking means selecting and grouping players according to rules such as skill, rank, or queue position.

In plain words
What is it for?
Implementing skill-based matching, lobbies, queues, rank-based grouping, ELO pairing, and brackets.
Why use it?
It helps structure the queues and selection logic needed when players should be grouped fairly or efficiently.

Skill for Claude Code

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

Part of the game-dev plugin — 39 skills shipped together

Good fit Implementing skill-based matching, lobbies, queues, rank-based grouping, ELO pairing, and brackets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcsouza/agent-skills/matchmaking-system
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 fcsouza/agent-skills --skill matchmaking-system
Clone the repo
git clone --depth 1 https://github.com/fcsouza/agent-skills

Made for: Claude Code.

Or install game-dev, the plugin that ships this one along with the rest of its 39 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 matchmaking-system

README.md
[![agentmods](https://agentmods.dev/badge/skills/fcsouza/agent-skills/matchmaking-system/github.svg)](https://agentmods.dev/skills/fcsouza/agent-skills/matchmaking-system)
Your own site
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/matchmaking-system"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/matchmaking-system/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 matchmaking-system

Your own site · 80×15
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/matchmaking-system"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/matchmaking-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,489 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.00116 $0.02489
Opus 5.5 $0.00046 $0.00996
Sonnet 5.5 $0.00023 $0.00498
Haiku 4.5 $0.00012 $0.00249

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

Security

Grade A, and why

matchmaking-system 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 19d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (boilerplate/lobby-manager.ts, boilerplate/matchmaker.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/matchmaking-system/SKILL.md · 135 lines

How it starts

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

Matchmaking System

Pairs players by skill from a Redis sorted set, widens the skill bracket as they wait, claims each pair atomically, and runs the lobby until the match ends.

Choose the rating system

System Pick it when What it tracks
Elo Matches are plentiful and you can keep matchmaking tight One number. Menke: needs more matches to converge than Glicko or TrueSkill.
Glicko-2 Players compete alone and you want an uncertainty that grows while a player is away (RD rises in a rating period with no games) Rating, rating deviation (RD), volatility; a draw scores 0.5. Menke, on Glicko: converges faster than Elo, not naturally adapted to teams.
TrueSkill Team modes, more than two teams, or draws Mean mu and uncertainty sigma per player; team skill is the sum of its players. Menke: designed for teams and draws, converges in the fewest matches of the three.

Starting values with a source:

  • Glicko-2: unrated players start at rating 1500, RD 350, volatility 0.06. Set the system constant tau between 0.3 and 1.2 and test which predicts best. Rating periods work best with 10-15 games per player.
  • TrueSkill: new players start at mu 25, sigma 8.333. Rank on the conservative estimate mu - 3 sigma, not on mu.
  • A Glicko-2 player's strength sits in rating plus or minus 2 RD with 95% confidence.

No Elo K-factor is given here because no source was checked. Pick one and tune it against your own win-prediction data.

Persist ratings in Postgres after each match (postgres-game-schema) and cache them in Redis for the queue.

Procedure

  1. Split pools by game mode and region. One sorted set per pool, score = rating. A player only searches their own pool unless they opt in to cross-region.
  2. Enqueue: write the sorted-set member and a hash with rating, deviation, games played and queuedAt, with a TTL so a crashed client does not stay queued forever.
  3. Add one BullMQ search job per player. The job calls findMatch; if nothing fits, it adds a delayed copy of itself, so the search runs again with a wider bracket.
  4. Bracket width comes from wait time: initial + floor(wait / interval) * step, capped at a maximum. Derive it from queuedAt on every search; do not store it, so it cannot go stale and needs no separate "widen" job.
  5. A pair fits when the rating gap is inside the wider of the two players' brackets, so the player who waited longer decides.
  6. Claim the pair in one Lua script: if both members are still in the sorted set, remove both and delete both hashes; otherwise remove nothing and try the next candidate. See "Atomic dequeue" below.
  7. Create the lobby. Players ready up; the last ready-up moves the lobby to COUNTDOWN.
  8. When the countdown ends, check every player's presence (WebSocket heartbeat). If all are there, the lobby goes IN_PROGRESS. If anyone dropped, the lobby is short of its match size, so it dissolves: startMatch deletes it, unmaps every player and returns the connected ones in requeue. Requeue them with their original queuedAt so their bracket stays wide. A leave before IN_PROGRESS dissolves the lobby the same way; leaveLobby returns the ids to requeue.
  9. On match end, mark the lobby COMPLETE, update ratings, and let the lobby expire after the results screen.

Read the full file on GitHub · 135 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 19d ago Changed · -69 lines · +65 tokens per session bf52d84608f7
  2. 3mo ago First seen · 204 lines · 51 tokens per session scan A 5be5f8231187

Subscribe to this mod's changes

matchmaking-system is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 116 tokens to every session and 2,489 once invoked, about $0.0005 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-30.

Related

matchmaking-system compared with skills from other repositories

matchmaking-system next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
matchmaking-systemfcsouza/agent-skillsSkill29todayMITA116Claude Code
playtest-reportDonchitos/Claude-Code-Game-StudiosSkill42k24d agoMITA20Claude Code
godot-signals-groupsgamedev-skills/awesome-gamedev-agent-skillsSkill13k3d agoApache-2.0A93Claude Code
scenario-unreal-gameplayscenario-labs/skillsSkill4.7kyesterdayMITA121Claude Code
texture-workflowarjun988/blender-skillsSkill5.8k27d agoMITA41Claude Code
motionOpenDCAI/GameFactory-3ASkill1.6kyesterdayApache-2.0A0Claude Code, Codex
gamedev-shadersericrisco/rsc-harnessSkill707yesterdayMITA102Claude Code, Codex