account-research
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM.…
\"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
$ npx -y skills add charlieviettq/awesome-agent-skill --skill algo-rank-wilson --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/algo-rank-wilsonContext preview
The summary Claude sees to decide when to auto-load this skill.
\"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
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'.\"." allowed-tools: Bash, Read, Write, Edit, Glob, Grep
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.
**Trigger conditions:**
**When NOT to use:**
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.
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).
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)
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.
Return ranked items with scores and confidence intervals.
{
"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}
}**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.
| Input | Expected | Why | |-------|----------|-----| | 0 reviews | Cannot rank | n=0, undefined. Exclude or assign minimum | | 0 positive, 100 total | Very low score | Genuinely bad item, high confidence | | 1M positive, 1M total | Lower bound ≈ 1.0 | Massive sample, high confidence in 100% |
| Script | Description | Usage | |--------|-------------|-------| | `scripts/wilson_score.py` | Compute Wilson score interval and rank items | `python scripts/wilson_score.py --help` |
Run `python scripts/wilson_score.py --verify` to execute built-in sanity tests.
Curated skill pack for LLM agents in engineer and science workflow (Cursor & Claude ready).
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM.…
Evaluate LLM agents and tool-using workflows—task success, tool accuracy, latency/cost, safety, and regression suites. Use when shipping agent features,…
Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and discoverability for LLM callers. Use when defining tools for agents, SDKs, or…
\"Implement and select ad bidding strategies from manual CPC to automated target-CPA and target-ROAS. Use this skill when the user needs to choose a bidding…
\"Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to distribute budget across…
\"Build CTR prediction models for estimating ad click-through rates from features. Use this skill when the user needs to predict click probability, build an ad…