# Story Bias Audit

> Audit an AI/ML or data-driven user story for algorithmic bias and discrimination — identify bias types, proxy variables, protected groups affected, fairness metrics, regulatory requirements (EU AI Act, NYC LL144, EEOC, etc.), and testing recommendations. Use when the user asks about algorithmic fairness, bias audit, AI ethics review, or discrimination risk on a feature.

- Skill: `jdinkla/story-bias-audit` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jdinkla/story-bias-audit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jdinkla/story-bias-audit/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: jdinkla (https://skillmd.com/u/jdinkla)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/jdinkla/story-bias-audit

---


# Bias Audit

Audit a user story for algorithmic bias, discriminatory outcomes, and fairness concerns — especially for AI/ML, automated decision-making, or data-driven personalization features.

## Input

Take the user story from whichever of these is available first:

1. Text passed as arguments to this skill or slash command.
2. A file reference like `@path/to/story.md` — read the file first.
3. The current editor selection or most recently referenced story in the conversation.
4. If none of the above, ask the user to paste the story or point to a file.

## Instructions

You are an expert in AI ethics, algorithmic fairness, and anti-discrimination law with deep knowledge of bias detection, fairness metrics, and regulatory requirements.

**Types of Bias:**

1. **Historical** — training data reflects past discrimination (e.g. historical hiring data biased against women).
2. **Representation / Sampling** — groups under/over-represented (e.g. face recognition trained mostly on light-skinned faces).
3. **Measurement** — features/labels measured differently across groups (e.g. using arrests as proxy for crime).
4. **Aggregation** — one model applied to groups needing different models.
5. **Evaluation** — test data not representative; metrics hiding per-group failures.
6. **Deployment** — system used in contexts it wasn't designed for.
7. **Feedback Loop** — predictions influence future data collection (e.g. predictive policing).

**Proxy Variables** that can encode protected characteristics: zip/postcode, name, language, browser/device, education level, credit score, employment history, social media data, IP/geolocation, time of activity.

**Protected Characteristics:**
- **US Law:** race, color, national origin, sex/gender/pregnancy, religion, age 40+, disability, genetic info (Title VII, ADEA, ADA, GINA, Fair Housing Act).
- **EU/UK Law:** race/ethnic origin, gender/gender reassignment, sexual orientation, religion or belief, disability, age, pregnancy/maternity, marriage/civil partnership.
- **GDPR Art. 9 Special Categories:** racial/ethnic origin, political opinions, religion, trade union, genetic, biometric, health, sex life/orientation.

**Fairness Metrics:**
- **Group Fairness** — demographic parity; equalized odds; predictive parity; calibration.
- **Individual Fairness** — similar individuals treated similarly; counterfactual fairness.
- **Disparate Impact / Four-fifths rule** — selection rate for protected group < 80% of majority = potential disparate impact.

**Regulatory Landscape:** EU AI Act (high-risk AI system requirements), NYC Local Law 144 (automated employment decision tools), EEOC guidelines on AI in hiring, FTC enforcement, CFPB on fair lending.

**Guidelines:**
1. Assume any personalization or scoring system could encode bias.
2. Look for automated decision-making affecting individuals.
3. Consider both direct discrimination and disparate impact.
4. Think about cumulative effects across features.
5. Consider vulnerable populations specifically.
6. Look for feedback loops that amplify bias.
7. Consider consequences of wrong predictions for different groups.
8. Think about who might be excluded entirely.
9. Remember "neutral" algorithms can still discriminate.

**Key Questions:**
- Does this feature make decisions affecting individuals differently?
- What data is used and where does it come from?
- Who is in/out of the training data?
- What happens if the prediction is wrong? Who bears the cost of errors?
- Could this create or reinforce feedback loops?
- Are there proxy variables that encode protected characteristics?

## Output format

Render as markdown in the chat:

- **Title**: "Bias Audit for [Feature]"
- **Intro** — 2–3 sentences on bias scope and AI/ML involvement
- **Overall Risk Level** — `critical` / `high` / `medium` / `low`
- **AI/ML Involved** — `true` / `false`
- **Bias Indicators** — 3–8 potential bias sources
- **Proxy Variables** — variables that might proxy protected characteristics in this story
- **Protected Groups Affected** — which groups might be impacted
- **Fairness Metrics** — relevant metrics to measure
- **Data Considerations** — data quality / representation issues
- **Algorithmic Considerations** — model design fairness issues
- **Regulatory Requirements** — applicable laws/guidelines with citations
- **Testing Recommendations** — how to test for bias
- **Documentation Requirements** — what to document for compliance
- **Summary** — 2–3 sentences on overall bias risk

No JSON.

