Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Audit dataset bias across protected attributes — demographic parity, equalized odds, representation gaps, and intersectional bias. Reports actionable gaps with per-group metrics.
.claude/skills/mkurman-bias-audit/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 40% | 0% |
Bias in training data produces biased models, full stop. This audit measures representation, outcome disparities, and intersectional gaps so you can fix problems before training.
Use when: building models that make decisions about people, deploying in regulated domains, or when protected attributes (gender, race, age, etc.) are available.
pythonimport pandas as pd import numpy as np def representation_audit(df, protected_cols, population_benchmark=None): """Check if dataset representation matches population.""" n = len(df) results = {} for col in protected_cols: dist = df[col].value_counts(normalize=True).to_dict() results[col] = { "distribution": dist, "n_groups": len(dist), "min_group_pct": min(dist.values()), "max_group_pct": max(dist.values()), "imbalance_ratio": max(dist.values()) / (min(dist.values()) + 1e-10), } # Intersectional audit if len(protected_cols) >= 2: intersectional = df.groupby(protected_cols).size() / n min_intersection = intersectional.min() results["intersectional"] = { "n_intersections": len(intersectional), "min_pct": min_intersection, "empty_groups": (intersectional == 0).sum(), } return results
pythondef outcome_audit(df, label_col, protected_col, positive_label=1): """Check if outcomes differ across protected groups.""" groups = df.groupby(protected_col) metrics = {} for group, data in groups: metrics[group] = { "n": len(data), "positive_rate": (data[label_col] == positive_label).mean(), "label_distribution": data[label_col].value_counts().to_dict(), } # Disparity metrics pos_rates = [m["positive_rate"] for m in metrics.values()] disparity = max(pos_rates) - min(pos_rates) return { "per_group": metrics, "max_disparity": disparity, "disparity_ratio": max(pos_rates) / (min(pos_rates) + 1e-10), }
| Metric | Green | Yellow | Red | |------|-------|-------|-------| | Group size ratio (max/min) | < 3:1 | 3:1-10:1 | > 10:1 | | Outcome disparity | < 5pp | 5-15pp | > 15pp | | Min intersection group | > 1% | 0.1-1% | < 0.1% |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 29,348 | 19,533 | -33% | 1 | 1 | 0% | 5,916 | 4,986 | -16% | 0 | 0 | — |
case-02 | fail→pass | 21,045 | 21,567 | +2% | 1 | 1 | 0% | 4,115 | 5,009 | +22% | 0 | 0 | — |
case-03 | fail→pass | 23,895 | 20,404 | -15% | 1 | 1 | 0% | 4,525 | 4,816 | +6% | 0 | 0 | — |
case-04 | pass→pass | 15,614 | 15,769 | +1% | 1 | 1 | 0% | 2,952 | 3,688 | +25% | 0 | 0 | — |
case-05 | pass→pass | 15,195 | 17,222 | +13% | 1 | 1 | 0% | 2,928 | 4,060 | +39% | 0 | 0 | — |
case-06 | pass→pass | 19,731 | 19,162 | -3% | 1 | 1 | 0% | 3,553 | 4,445 | +25% | 0 | 0 | — |
case-07 | fail→pass | 6,884 | 3,202 | -53% | 1 | 1 | 0% | 1,232 | 1,369 | +11% | 0 | 0 | — |
case-08 | fail→pass | 14,641 | 14,852 | +1% | 1 | 1 | 0% | 2,539 | 3,552 | +40% | 0 | 0 | — |
case-22 | fail→pass | 8,899 | 4,376 | -51% | 1 | 1 | 0% | 1,509 | 1,575 | +4% | 0 | 0 | — |
case-09 | fail→pass | 8,322 | 5,867 | -30% | 1 | 1 | 0% | 1,476 | 1,935 | +31% | 0 | 0 | — |
case-10 | fail→pass | 7,262 | 5,978 | -18% | 1 | 1 | 0% | 1,309 | 1,895 | +45% | 0 | 0 | — |
case-11 | fail→pass | 19,087 | 3,367 | -82% | 1 | 1 | 0% | 975 | 1,360 | +39% | 0 | 0 | — |
case-12 | fail→pass | 12,666 | 10,697 | -16% | 1 | 1 | 0% | 2,039 | 2,523 | +24% | 0 | 0 | — |
case-13 | pass→pass | 13,187 | 12,966 | -2% | 1 | 1 | 0% | 1,971 | 2,899 | +47% | 0 | 0 | — |
case-14 | pass→pass | 14,912 | 15,558 | +4% | 1 | 1 | 0% | 2,208 | 3,135 | +42% | 0 | 0 | — |
case-15 | pass→pass | 12,423 | 9,644 | -22% | 1 | 1 | 0% | 1,945 | 2,242 | +15% | 0 | 0 | — |
case-16 | pass→pass | 18,352 | 8,741 | -52% | 1 | 1 | 0% | 3,643 | 2,600 | -29% | 0 | 0 | — |
case-17 | fail→pass | 16,814 | 10,316 | -39% | 1 | 1 | 0% | 3,484 | 3,070 | -12% | 0 | 0 | — |
case-18 | pass→pass | 16,818 | 13,476 | -20% | 1 | 1 | 0% | 3,069 | 3,401 | +11% | 0 | 0 | — |
case-19 | fail→pass | 11,928 | 11,012 | -8% | 1 | 1 | 0% | 1,824 | 2,441 | +34% | 0 | 0 | — |
case-20 | pass→pass | 11,519 | 5,025 | -56% | 1 | 1 | 0% | 2,000 | 1,684 | -16% | 0 | 0 | — |
case-21 | fail→pass | 8,362 | 3,258 | -61% | 1 | 1 | 0% | 1,448 | 1,454 | +0% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.