Agent skill

Algo Hr Matching

by asgard-ai-platform in asgard-ai-platform/skills

Implement Gale-Shapley stable matching algorithm for two-sided matching problems.

MITAuto-check passed

Install Algo Hr Matching

skills CLI
$ npx skills add asgard-ai-platform/skills --skill algo-hr-matching -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install asgard-ai-platform/skills algo-hr-matching --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/algo-hr-matching .claude/skills/algo-hr-matching && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
algo-hr-matching
GitHub stars
242
Token cost
~1k tokens
SKILL.md length
392 words
Files
4 (incl. references)
Skills in repo
207
Repo updated
First seen
Licence
MIT

At a glance

Implement Gale-Shapley stable matching algorithm for two-sided matching problems.

  • Works in 4 steps: Input Validation → Core Algorithm → Verification → …
  • The user needs to match candidates to positions
  • SKILL.md covers Overview, When to Use, Algorithm and Output Format, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Algo Hr Matching is an agent skill from asgard-ai-platform/skills. Implement Gale-Shapley stable matching algorithm for two-sided matching problems. Use this skill when the user needs to match candidates to positions, assign students to schools, or solve any two-sided preference matching — even if they say 'optimal job matching', 'stable assignment', or 'candidate-position pairing'.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `examples/sample_scenario.md`, `references/many-to-one.md` and `references/strategic-manipulation.md`).

The repository describes itself as: 301 open-source coding agent skills across 22 domains — methodology, judgment & gotchas packaged as Claude Agent Skills for the Asgard AI Platform. The licence is MIT.

When your agent uses it

  • The user needs to match candidates to positions
  • Assign students to schools
  • Solve any two-sided preference matching — even if they say optimal job matching
  • Stable assignment

Example prompts

  • “optimal job matching”
  • “stable assignment”
  • “candidate-position pairing”
  • “/algo-hr-matching”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Input Validation
  2. Core Algorithm
  3. Verification
  4. Output

What it can do on your machine

Read from SKILL.md and the folder at commit 4e7f4f8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Algo Hr Matching loads about 1k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 392 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from asgard-ai-platform/skills at commit 4e7f4f8, republished under its MIT licence (© asgard-ai-platform). 392 words, ~1,020 tokens.

Download SKILL.mdSave it as .claude/skills/algo-hr-matching/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
algo-hr-matching
description
Implement Gale-Shapley stable matching algorithm for two-sided matching problems. Use this skill when the user needs to match candidates to positions, assign students to schools, or solve any two-sided preference matching — even if they say 'optimal job matching', 'stable assignment', or 'candidate-position pairing'.
metadata.category
WP-42 HR 演算法
metadata.tags
hr, stable-matching, gale-shapley, assignment

Gale-Shapley Stable Matching

Overview

Gale-Shapley (deferred acceptance) finds a stable matching between two equally-sized sets where no unmatched pair prefers each other over their current match. Runs in O(n²) worst case. Proposer-optimal: the proposing side gets their best stable partner.

When to Use

Trigger conditions:

  • Matching candidates to job positions based on mutual preferences
  • Assigning students to schools or residents to hospitals
  • Any two-sided matching where stability (no blocking pairs) is required

When NOT to use:

  • For one-sided assignment (use Hungarian algorithm)
  • When preferences are based on scores, not rankings (use optimization)

Algorithm

IRON LAW: The Proposing Side Gets Their BEST Stable Partner
Gale-Shapley is proposer-optimal and reviewer-pessimal. If employers
propose, they get their best stable match; candidates get their worst.
The CHOICE of who proposes determines which stable matching is found.
Phase 1: Input Validation

Collect: preference rankings from both sides. Each participant ranks all members of the other side. Gate: Complete preference lists, equal-sized groups (or handle unequal with dummy entries).

Phase 2: Core Algorithm
  1. All proposers are "free" (unmatched)
  2. While any proposer is free and hasn't proposed to everyone:
    • Free proposer proposes to their highest-ranked unproposed-to reviewer
    • Reviewer accepts if unmatched, or replaces current match if new proposer is preferred
    • Replaced proposer becomes free again
  3. Terminate when all proposers are matched
Phase 3: Verification

Check stability: for every unmatched pair (a,b), verify that at least one of them prefers their current match over the other. No blocking pairs = stable. Gate: Zero blocking pairs found.

Phase 4: Output

Return matching with stability confirmation.

Output Format

json
{
  "matching": [{"proposer": "Candidate_A", "reviewer": "Company_X", "proposer_rank": 1, "reviewer_rank": 2}],
  "metadata": {"pairs": 10, "rounds": 23, "blocking_pairs": 0, "proposer_side": "candidates"}
}

Examples

Sample I/O

Input: 3 candidates, 3 companies, each with full preference rankings Expected: Stable matching with zero blocking pairs. Candidate-proposing gives candidate-optimal result.

Show full SKILL.md (147 more words)Show less
Edge Cases
InputExpectedWhy
All prefer same #1Still terminates, stableRejected proposers move to next choice
Identical preferencesUnique stable matchingOnly one possibility
Unequal sidesSome unmatched on larger sideAdd dummy entries or use many-to-one variant

Gotchas

  • Proposer advantage: If candidates propose, they get better matches than if companies propose. This is a design choice with equity implications.
  • Incomplete preferences: If participants don't rank everyone, unmatched results are possible. Handle with acceptable-partner thresholds.
  • Many-to-one: Hospital-resident matching uses the many-to-one variant (each hospital has multiple slots). Use the Roth-Peranson extension.
  • Strategic manipulation: The reviewing side CAN benefit from misreporting preferences (truncating lists). The proposing side cannot — truthful reporting is dominant strategy for proposers.
  • Preference elicitation: Getting honest, complete rankings is hard in practice. People satisfice rather than fully rank all options.

References

  • For many-to-one matching (hospital-resident), see references/many-to-one.md
  • For strategic behavior analysis, see references/strategic-manipulation.md

© asgard-ai-platform, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in algo-hr-matching of asgard-ai-platform/skills.

  • SKILL.md
  • examples/sample_scenario.md
  • references/many-to-one.md
  • references/strategic-manipulation.md

Open the folder on GitHubat commit 4e7f4f8

Compare with similar skills

Algo Hr Matching next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Algo Hr Matching compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Algo Hr Matching this skillasgard-ai-platform/skills242—~1kAutomated safety check: PassMIT
Manim Video Productionbrowser-use/video-use29k6 repos~3kAutomated safety check: PassMIT
Logseq Review Workflow Evallogseq/logseq45k—~1kAutomated safety check: PassAGPL-3.0
Baoyu URL To Markdownsdyckjq-lab/llm-wiki-skill2.5k2 repos~3.2kAutomated safety check: PassNone
DeepTutor CLIHKUDS/DeepTutor41k—~2.8kAutomated safety check: PassApache-2.0
Obsidian CLIAtmosphere/atmosphere3.8k13 repos~795Automated safety check: PassApache-2.0

Similar skills

  • Manim Video Production

    browser-use/video-use

    Produces math and technical explainer videos with Manim Community Edition: concept animations, equation derivations, algorithm walkthroughs and data stories.

    29k GitHub starsUsed in 6 repos~3k tokens
    Media & CreativeAuto-check passed
  • Compare two revisions of the Logseq logseq-review-workflow skill by running the same review prompt against isolated before and after skill snapshots, collecting both outputs, and producing a…

    45k GitHub stars~1k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Baoyu URL To Markdown

    sdyckjq-lab/llm-wiki-skill

    Fetch any URL and convert to markdown using Chrome CDP. An agent skill from sdyckjq-lab/llm-wiki-skill.

    2.5k GitHub starsUsed in 2 repos~3.2k tokens
    Knowledge ManagementAuto-check passed
  • DeepTutor CLI

    HKUDS/DeepTutor

    Teaches the agent to set up and run DeepTutor from the command line: chat and capabilities, knowledge bases, partners, memory, sessions, notebooks and the server or Web app.

    41k GitHub stars~2.8k tokensUpdated 3 days ago
    EducationAuto-check passed
  • Obsidian CLI

    Atmosphere/atmosphere

    Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more.

    3.8k GitHub starsUsed in 13 repos~795 tokens
    Knowledge ManagementAuto-check passed
  • AI Engineering Placement Quiz

    rohitg00/ai-engineering-from-scratch

    Runs a 10-question quiz across five areas to place a learner in the AI Engineering from Scratch curriculum, so they skip what they already know.

    67k GitHub stars~2k tokensUpdated today
    EducationAuto-check passed

More from asgard-ai-platform/skills

All 207 skills in this repo
  • Algo Ecom Bm25

    asgard-ai-platform/skills

    Implement BM25 ranking function for e-commerce product search relevance scoring.

    242 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Mfg Cpk

    asgard-ai-platform/skills

    Calculate Cpk process capability index to assess whether a process meets specification requirements.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Price Elasticity

    asgard-ai-platform/skills

    Calculate price elasticity of demand to quantify how price changes affect sales volume.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Bayesian

    asgard-ai-platform/skills

    Apply Bayesian averaging to rank items by combining observed ratings with prior expectations.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Elo

    asgard-ai-platform/skills

    Implement Elo rating system to rank items or players from pairwise comparison outcomes.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Wilson

    asgard-ai-platform/skills

    Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Algo Hr Matching

What does Algo Hr Matching do?

Implement Gale-Shapley stable matching algorithm for two-sided matching problems. Algo Hr Matching is an agent skill from asgard-ai-platform/skills. Implement Gale-Shapley stable matching algorithm for two-sided matching problems.

When should I use Algo Hr Matching?

Algo Hr Matching fits situations like: the user needs to match candidates to positions; assign students to schools; solve any two-sided preference matching — even if they say optimal job matching; stable assignment.

How do I install Algo Hr Matching in Claude Code?

Run `npx skills add asgard-ai-platform/skills --skill algo-hr-matching -a claude-code`. Or copy the skill folder (algo-hr-matching in asgard-ai-platform/skills) into .claude/skills/algo-hr-matching in your project. Claude Code loads it when a task matches its description.

How do I install Algo Hr Matching in Codex?

Run `npx skills add asgard-ai-platform/skills --skill algo-hr-matching -a codex`. Or copy the skill folder (algo-hr-matching in asgard-ai-platform/skills) into .agents/skills/algo-hr-matching in your project. Codex loads it when a task matches its description.

Can I use Algo Hr Matching in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add asgard-ai-platform/skills --skill algo-hr-matching -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/algo-hr-matching, .gemini/skills/algo-hr-matching, .github/skills/algo-hr-matching and .opencode/skills/algo-hr-matching in your project.

What does Algo Hr Matching need to run?

SKILL.md names no scripts, command-line tools or credentials: Algo Hr Matching is instructions for the agent only.

Does Algo Hr Matching access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Algo Hr Matching safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Algo Hr Matching use?

Algo Hr Matching is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Algo Hr Matching use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.1k tokens, read only when the agent opens those files.

What are the alternatives to Algo Hr Matching?

Skills that share tags, products or a category with Algo Hr Matching: Manim Video Production (browser-use/video-use, 29k stars), Logseq Review Workflow Eval (logseq/logseq, 45k stars), Baoyu URL To Markdown (sdyckjq-lab/llm-wiki-skill, 2.5k stars) and DeepTutor CLI (HKUDS/DeepTutor, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Algo Hr Matching?

asgard-ai-platform (a GitHub organization) maintains it in asgard-ai-platform/skills, which has 242 GitHub stars. The repository holds 207 skills in this directory. The repository was last updated on June 6, 2026.

Source: asgard-ai-platform/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.