Install any skill in seconds. Free to start, no credit card required.
Get Started Free →mkurman/bias-audit
Audit dataset bias across protected attributes — demographic parity, equalized odds, representation gaps, and intersectional bias. Reports actionable gaps with per-group metrics.
Passed 21 of 21 test cases with the skill, and 9 of 21 without it.
and 17 more in the full report
13 fixed9 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
In our retail customer dataset, the largest demographic segment comprises 68% of records while the smallest comprises 8%. What risk level does this group size ratio represent, and what is the numeric metric value?
| Checked | Without skill | With skill |
|---|---|---|
| Calculates the group imbalance ratio as 8.5 | Passed | Passed |
| Classifies the group ratio risk level as yellow | Missed | Passed |
The instructions your model reads when the skill loads.
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.
import 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,
test cases passed, vs 9 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.