Install any skill in seconds. Free to start, no credit card required.
Get Started Free →asgard-ai-platform/algo-hr-matching
Implement Gale-Shapley stable matching algorithm for two-sided matching problems.
Passed 22 of 23 test cases with the skill, and 16 of 23 without it.
and 9 more in the full report
6 fixed16 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
Compute the candidate-proposing stable matching for 2 applicants (A1, A2) and 2 employers (E1, E2) where A1 ranks [E1, E2], A2 ranks [E2, E1], E1 ranks [A1, A2], and E2 ranks [A2, A1]. Format the output as JSON with top-level 'matching' list and 'metadata' object. What value is assigned to 'proposer_side' in metadata?
| Checked | Without skill | With skill |
|---|---|---|
| The "proposer_side" field in metadata is set to "candidates". | Missed | Passed |
| The "pairs" field in metadata is set to 2. | Missed | Passed |
The instructions your model reads when the skill loads.
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.
Trigger conditions:
When NOT to use:
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.
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).
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.
test cases passed, vs 16 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.