Agent skill

Algo Rank Wilson

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

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

MITAuto-check passedResearch & Science

Install Algo Rank Wilson

skills CLI
$ npx skills add asgard-ai-platform/skills --skill algo-rank-wilson -a claude-code

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

GitHub CLI
$ gh skill install asgard-ai-platform/skills algo-rank-wilson --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-rank-wilson .claude/skills/algo-rank-wilson && 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-rank-wilson
GitHub stars
242
Token cost
~1.1k tokens
SKILL.md length
436 words
Files
5 (incl. scripts, references)
Skills in repo
207
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 4 steps: Input Validation → Core Algorithm → Verification → …
  • The user needs to rank products by ratings
  • SKILL.md covers Overview, When to Use, Algorithm and Output Format, plus 4 more sections
  • Runs Python scripts from its folder; calls python

What it does

Algo Rank Wilson is an agent skill from asgard-ai-platform/skills. Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction. Use this skill when the user needs to rank products by ratings, sort content by approval rate, or build a 'best rated' list that accounts for sample size — even if they say 'rank by star rating', 'best rated with few reviews', or 'confidence-adjusted rating'.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `examples/sample_input.json`, `references/bayesian-average.md` and `references/reddit-ranking.md`).

It sits in Research & Science, covering Experimental design and Statistics. 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 rank products by ratings
  • Sort content by approval rate
  • Build a best rated list that accounts for sample size — even if they say rank by star rating
  • Best rated with few reviews

Example prompts

  • “best rated”
  • “rank by star rating”
  • “best rated with few reviews”
  • “/algo-rank-wilson”

Requirements

  • Python 3

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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    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 Rank Wilson loads about 1.1k tokens when it runs, and up to ~5k if it reads all its reference files. Until then it costs about 98 tokens; SKILL.md has 436 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

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

Download SKILL.mdSave it as .claude/skills/algo-rank-wilson/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
algo-rank-wilson
description
Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction. Use this skill when the user needs to rank products by ratings, sort content by approval rate, or build a 'best rated' list that accounts for sample size — even if they say 'rank by star rating', 'best rated with few reviews', or 'confidence-adjusted rating'.
metadata.category
WP-44 排名演算法
metadata.tags
ranking, wilson-score, confidence-interval, rating

Wilson Score Ranking

Overview

Wilson Score interval provides a lower confidence bound on the true proportion of positive ratings. Unlike simple averages, it penalizes items with few ratings, preventing a 5/5 review item (1 review) from outranking a 4.8/5 item (1000 reviews). Computes in O(1) per item.

When to Use

Trigger conditions:

  • Ranking items by user ratings when review counts vary widely
  • Building "top rated" or "best of" lists that are fair to well-reviewed items
  • Sorting binary feedback (upvote/downvote) with confidence

When NOT to use:

  • For continuous scores (use Bayesian average instead)
  • When comparing items with similar sample sizes (simple average suffices)

Algorithm

IRON LAW: Never Rank by Simple Average When Sample Sizes Differ
A 5.0 average from 1 review is NOT better than 4.8 from 1000 reviews.
Wilson Score lower bound accounts for sample uncertainty:
Items with few ratings get a LOWER bound, properly reflecting our
uncertainty about their true quality.
Phase 1: Input Validation

Collect per item: number of positive ratings (p), total ratings (n). For star ratings, convert to binary (e.g., 4-5 stars = positive). Gate: n > 0 for all items, confidence level chosen (typically 95%, z=1.96).

Phase 2: Core Algorithm
  1. Compute observed proportion: p̂ = positive / total
  2. Wilson lower bound: (p̂ + z²/2n - z × √(p̂(1-p̂)/n + z²/4n²)) / (1 + z²/n)
  3. Rank by Wilson lower bound descending (conservative estimate of true quality)
Phase 3: Verification

Check: items with many positive reviews rank above items with few reviews and same proportion. Items with very few reviews are appropriately penalized. Gate: Ranking intuitively correct on manual inspection.

Phase 4: Output

Return ranked items with scores and confidence intervals.

Output Format

json
{
  "rankings": [{"item": "Product_A", "wilson_lower": 0.89, "positive": 950, "total": 1000, "proportion": 0.95}],
  "metadata": {"confidence": 0.95, "z": 1.96, "items_ranked": 500}
}

Examples

Sample I/O

Input: Item A: 1 positive / 1 total (100%). Item B: 950 positive / 1000 total (95%). Expected: B ranks higher. Wilson lower: A ≈ 0.05, B ≈ 0.94. The single review gives almost no confidence.

Show full SKILL.md (181 more words)Show less
Edge Cases
InputExpectedWhy
0 reviewsCannot rankn=0, undefined. Exclude or assign minimum
0 positive, 100 totalVery low scoreGenuinely bad item, high confidence
1M positive, 1M totalLower bound ≈ 1.0Massive sample, high confidence in 100%

Gotchas

  • Binary conversion: For 5-star ratings, the positive/negative threshold matters. 4+ stars as positive? 3+ stars? Different thresholds produce different rankings.
  • Not for continuous data: Wilson Score is for proportions (binary outcomes). For continuous ratings, use Bayesian average with a prior.
  • Cold start: New items with zero reviews can't be ranked. Use a minimum review threshold or Bayesian smoothing.
  • Confidence level choice: Higher confidence (99%) penalizes small samples more aggressively. 95% is standard but tune for your use case.
  • Sorting by lower bound is conservative: This approach favors well-known items. For discovery/exploration, consider also boosting items with high upper bounds (potential hidden gems).

Scripts

ScriptDescriptionUsage
scripts/wilson_score.pyCompute Wilson score interval and rank itemspython scripts/wilson_score.py --help

Run python scripts/wilson_score.py --verify to execute built-in sanity tests.

References

  • For Bayesian average alternative, see references/bayesian-average.md
  • For Reddit's ranking algorithm (Wilson-based), see references/reddit-ranking.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 4 other files (scripts, references) in algo-rank-wilson of asgard-ai-platform/skills.

  • SKILL.md
  • examples/sample_input.json
  • references/bayesian-average.md
  • references/reddit-ranking.md
  • scripts/wilson_score.py

Open the folder on GitHubat commit 4e7f4f8

Compare with similar skills

Algo Rank Wilson 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 Rank Wilson compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Algo Rank Wilson this skillasgard-ai-platform/skills242—~1.1kAutomated safety check: PassMIT
Data Scientistmagnus919/hermes-profiles289—~3.3kAutomated safety check: PassMIT
Data Scientistmagnus919/agent-skills119—~4.1kAutomated safety check: PassMIT
Statistical PowerK-Dense-AI/scientific-agent-skills48k1 repos~4.4kAutomated safety check: NotesMIT
Analyze StatsAperivue/medsci-skills333—~7kAutomated safety check: PassMIT
Hypothesis Testing Guidewentorai/research-plugins2981 repos~2kAutomated safety check: PassMIT

Similar skills

  • Data Scientist

    magnus919/hermes-profiles

    PhD-level expertise in data science, statistics, and machine learning.

    289 GitHub stars~3.3k tokensUpdated 3 mo ago
    Research & ScienceAuto-check passed
  • Data Scientist

    magnus919/agent-skills

    A skill your agent uses for PhD-level expertise in data science, statistics, and machine learning: rigorous statistical analysis, experimental design, causal inference, advanced modeling, research…

    119 GitHub stars~4.1k tokensUpdated today
    Research & ScienceAuto-check passed
  • Statistical Power

    K-Dense-AI/scientific-agent-skills

    Calculates sample sizes and statistical power for study planning.

    48k GitHub starsUsed in 1 repo~4.4k tokens
    Research & ScienceAuto-check: notes
  • Analyze Stats

    Aperivue/medsci-skills

    A skill your agent uses when data needs statistical analysis.

    333 GitHub stars~7k tokensUpdated 5 days ago
    Research & ScienceAuto-check passed
  • Hypothesis Testing Guide

    wentorai/research-plugins

    Statistical hypothesis testing, power analysis, and significance reporting

    298 GitHub starsUsed in 1 repo~2k tokens
    Research & ScienceAuto-check passed
  • Power Analysis Guide

    wentorai/research-plugins

    Sample size calculation and statistical power analysis guide

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Research & ScienceAuto-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 Risk Altman Z

    asgard-ai-platform/skills

    Calculate Altman Z-Score to predict corporate bankruptcy probability from financial ratios.

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

Questions about Algo Rank Wilson

What does Algo Rank Wilson do?

Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction. Algo Rank Wilson is an agent skill from asgard-ai-platform/skills. Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction.

When should I use Algo Rank Wilson?

Algo Rank Wilson fits situations like: the user needs to rank products by ratings; sort content by approval rate; build a best rated list that accounts for sample size — even if they say rank by star rating; best rated with few reviews.

How do I install Algo Rank Wilson in Claude Code?

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

How do I install Algo Rank Wilson in Codex?

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

Can I use Algo Rank Wilson 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-rank-wilson -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-rank-wilson, .gemini/skills/algo-rank-wilson, .github/skills/algo-rank-wilson and .opencode/skills/algo-rank-wilson in your project.

What does Algo Rank Wilson need to run?

Going by SKILL.md and its folder, Algo Rank Wilson needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Algo Rank Wilson 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 Rank Wilson 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Algo Rank Wilson use?

Algo Rank Wilson 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 Rank Wilson use?

About 1.1k tokens (SKILL.md is roughly 4.3k 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 3.9k tokens, read only when the agent opens those files.

What are the alternatives to Algo Rank Wilson?

Skills that share tags, products or a category with Algo Rank Wilson: Data Scientist (magnus919/hermes-profiles, 289 stars), Data Scientist (magnus919/agent-skills, 119 stars), Statistical Power (K-Dense-AI/scientific-agent-skills, 48k stars) and Analyze Stats (Aperivue/medsci-skills, 333 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Algo Rank Wilson?

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.