
ai-bias-special-category
Assesses AI bias risks for GDPR Art. 9 special category data and AI Act Art. 10 data governance. Covers fairness metrics, bias detection methods, mitigation strategies, and documentation requirements for protected characteristics. Keywords: AI bias, special category, fairness metrics, discrimination, Art. 9, Art. 10.
- Installs
- 42
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/mukul975/privacy-data-protection-skills --skill ai-bias-special-category- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads ai-bias-special-category automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
AI Bias Assessment for Special Category Data
Overview
AI systems can amplify, perpetuate, or introduce bias against protected groups defined by GDPR Art. 9 special categories (race, ethnicity, political opinion, religion, trade union membership, genetic data, biometric data, health, sexual orientation) and by EU equality law (gender, age, disability). The AI Act Art. 10 requires data governance practices for training data that address bias, while Art. 5 prohibits AI-based social scoring. This skill provides the methodology for detecting, measuring, and mitigating bias in AI systems that process or infer special category data, with documentation requirements meeting both GDPR and AI Act obligations.
Art. 9 Special Categories and AI Bias
Direct Processing of Special Category Data
When AI systems directly process Art. 9 data:
| Category | AI Bias Risk | Example |
|---|---|---|
| Racial or ethnic origin | Discrimination in hiring, credit, policing | CV screening penalising names associated with ethnic minorities |
| Political opinions | Political profiling, content suppression | News recommendation amplifying or suppressing political viewpoints |
| Religious beliefs | Service denial, discriminatory targeting | Insurance pricing varying by religious affiliation |
| Trade union membership | Employment discrimination | Performance scoring penalising union activity |
| Genetic data | Genetic discrimination in insurance/employment | Health insurance pricing based on genetic predisposition |
| Biometric data | Differential accuracy across demographics | Facial recognition with higher error rates for darker skin tones |
| Health data | Health-based discrimination | Hiring algorithms penalising disability or mental health history |
| Sexual orientation | Discrimination, outing | Content recommendation inadvertently revealing sexual orientation |
Proxy Inference of Special Categories
AI models frequently infer Art. 9 data from non-sensitive features:
| Proxy Feature | Inferred Category | Mechanism |
|---|---|---|
| Postcode/zip code | Race/ethnicity, income | Residential segregation patterns |
| First/last name | Race/ethnicity, religion | Name-ethnicity correlations |
| Browsing history | Political opinion, religion, health | Content consumption patterns |
| Purchase history | Health status, religion | Medication purchases, dietary products |
| Language patterns | National origin, education | Dialect, vocabulary, grammar patterns |
| Device/app usage | Age, income, disability | Accessibility features, device type |
EDPB position: inferring Art. 9 data from non-sensitive inputs constitutes processing of special category data — the same protections apply.
Fairness Metrics
Group Fairness Metrics
| Metric | Definition | When to Use |
|---|---|---|
| Demographic parity | P(positive outcome | group A) = P(positive outcome |
| Equalized odds | TPR and FPR equal across groups | When accuracy should be equal across groups |
| Equal opportunity | TPR equal across groups (relaxed equalized odds) | When true positive detection should be equal |
| Calibration | P(Y=1 | score=s, group=A) = P(Y=1 |
| Predictive parity | PPV equal across groups | When positive predictions should be equally reliable |
Individual Fairness Metrics
| Metric | Definition |
|---|---|
| Consistency | Similar individuals receive similar outcomes |
| Counterfactual fairness | Outcome would be the same if protected attribute were different |
| Causal fairness | No causal path from protected attribute to outcome |
Metric Selection Guidance
| Decision Context | Recommended Metric | Justification |
|---|---|---|
| Hiring/admissions | Equalized odds or equal opportunity | Equal detection of qualified candidates across groups |
| Credit scoring | Calibration | Score should mean the same probability regardless of group |
| Criminal risk | Equalized odds | Both FPR and TPR should be equal to avoid disproportionate impact |
| Healthcare | Equal opportunity + calibration | Equal detection of conditions; equal meaning of risk scores |
| Content moderation | Demographic parity | Content removal should not disproportionately affect groups |
Note: Mathematical impossibility results show that demographic parity, equalized odds, and calibration cannot all be satisfied simultaneously when base rates differ across groups. Document the trade-off explicitly.
Bias Detection Methodology
Phase 1: Data Audit
- Profile training data demographics against target population
- Identify underrepresented groups that may have lower model performance
- Check for historical bias in labelled data (e.g., biased hiring decisions used as ground truth)
- Identify label noise differential across groups
- Assess feature distributions across groups for proxy discrimination potential
Phase 2: Model Testing
- Evaluate model performance disaggregated by protected groups
- Compute selected fairness metrics for each protected group pair
- Run counterfactual testing: change protected attributes, observe output changes
- Test for intersectional bias (combinations of protected attributes)
- Evaluate model performance on edge cases and adversarial examples per group
Phase 3: Output Analysis
- Analyse decision distribution across groups
- Identify threshold effects that disproportionately impact specific groups
- Test for feedback loop amplification over time
- Assess output explanation fairness (are explanations equally informative across groups?)
Bias Mitigation Strategies
Pre-processing (Data-Level)
| Strategy | Description | Trade-off |
|---|---|---|
| Resampling | Over-sample underrepresented groups, under-sample overrepresented | May reduce data diversity or introduce duplicates |
| Reweighting | Assign higher weights to underrepresented group samples | Computationally simple; may not address structural bias |
| Relabelling | Correct historically biased labels | Requires domain expertise; may be subjective |
| Fair representation learning | Learn latent representation that removes protected attribute information | May lose legitimate correlations |
In-processing (Algorithm-Level)
| Strategy | Description | Trade-off |
|---|---|---|
| Adversarial debiasing | Train adversary to predict protected attribute from model; penalise success | Accuracy-fairness trade-off; requires protected attribute data |
| Fairness constraints | Add fairness metric as training constraint | May reduce overall accuracy; constraint satisfaction varies |
| Regularisation | Add fairness-related regularisation term to loss function | Balances accuracy and fairness; requires tuning |
| Causal modelling | Use causal graph to block discriminatory paths | Requires causal knowledge; complex to implement |
Post-processing (Output-Level)
| Strategy | Description | Trade-off |
|---|---|---|
| Threshold adjustment | Different decision thresholds per group to equalise metrics | May be perceived as unfair; legally complex |
| Score calibration | Calibrate scores per group | Requires sufficient group data; may reduce discrimination |
| Reject option | Abstain from decision for borderline cases across groups | Reduces coverage; requires human fallback |
AI Act Art. 10 Data Governance
Art. 10 requires for high-risk AI training data:
| Requirement | Implementation |
|---|---|
| Relevant data | Training data must be relevant to the intended purpose |
| Sufficiently representative | Data must represent the population the system will be deployed on |
| Free of errors | Data quality assessment and cleaning processes |
| Complete | Sufficient coverage of deployment scenarios |
| Appropriate statistical properties | Distribution analysis including demographic representation |
| Bias examination | Examine training data for possible biases, especially related to Art. 10(2)(f) |
Art. 10(5): Processing of special category data for bias detection is permitted for high-risk AI if:
- Strictly necessary for bias monitoring, detection, and correction
- Subject to appropriate safeguards (pseudonymisation, access controls)
- Data is not used for other purposes
- Deleted after bias assessment unless retention is required for compliance documentation
Documentation Requirements
Bias Assessment Report
| Section | Content |
|---|---|
| System description | Model, purpose, affected groups |
| Protected attributes assessed | Art. 9 categories + equality law characteristics |
| Fairness metrics selected | With justification for selection |
| Data audit results | Training data demographics, representation gaps |
| Model testing results | Per-group performance, fairness metrics, counterfactual results |
| Bias findings | Identified disparities with severity assessment |
| Mitigation measures | Applied strategies with effectiveness evidence |
| Residual bias | Remaining disparities after mitigation |
| Trade-off documentation | Accuracy-fairness trade-offs, metric impossibility acknowledgement |
| Ongoing monitoring plan | Post-deployment fairness monitoring |
Enforcement Precedents
- Dutch Tax Authority (SyRI, 2020): Court struck down algorithmic fraud detection for discriminatory profiling — system disproportionately targeted residents of low-income, immigrant-background neighbourhoods.
- Italian DPA v. Deliveroo (2021): Algorithmic worker management found to discriminate based on protected characteristics — Art. 22 and equality law violations.
- Austrian DPA v. AMS Algorithm (2020): Austrian employment service algorithm that scored job seekers lower based on gender, age, disability, and citizenship — DPA found processing unlawful.
- AEPD guidance (2021): Spanish DPA issued guidance on algorithmic discrimination, emphasising DPIA requirement for AI systems processing protected characteristics.
- CNIL (2024): AI bias assessment framework published requiring fairness testing for high-impact AI systems.
Integration Points
- ai-dpia: Bias assessment feeds into DPIA risk assessment for discrimination harms
- ai-automated-decisions: Biased automated decisions trigger Art. 22 and equality law violations
- ai-training-lawfulness: Art. 10(5) processing of special category data for bias detection requires documentation
- ai-transparency-reqs: Bias findings should be disclosed in model cards and transparency documentation
- ai-act-high-risk-docs: Art. 10 data governance documentation is part of conformity assessment
FAQ
What does the ai-bias-special-category skill do?
Assesses AI bias risks for GDPR Art. 9 special category data and AI Act Art. 10 data governance. Covers fairness metrics, bias detection methods, mitigation strategies, and documentation requirements for protected characteristics. Keywords: AI bias, special category, fairness metrics, discrimination, Art. 9, Art. 10.
How do I install ai-bias-special-category?
Run npx skills add https://github.com/mukul975/privacy-data-protection-skills --skill ai-bias-special-category in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/ai-bias-special-category/ (personal) or .claude/skills/ai-bias-special-category/ (project).
Which AI agents can use ai-bias-special-category?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is ai-bias-special-category safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains ai-bias-special-category?
It is published by mukul975 in mukul975/privacy-data-protection-skills. It has 42 recorded installs.
More from mukul975/privacy-data-protection-skills
brazil-lgpd
mukul975/privacy-data-protection-skills
Guides compliance with Brazil's Lei Geral de Proteção de Dados (LGPD, Lei 13.709/2018). Covers the 10 lawful bases under Art. 7, DPO appointment, ANPD enforcement, data subject rights under Arts. 17-22, and international transfer mechanisms. Keywords: LGPD, Brazil data protection, ANPD, lawful bases, data subject rights, international transfers.
analytics-cookie-consent
mukul975/privacy-data-protection-skills
Managing consent for analytics cookies and implementing privacy-preserving measurement. Covers GA4 privacy configuration, consent mode fallback behavior, aggregate reporting alternatives, and cookieless measurement approaches.
audit-report-writing
mukul975/privacy-data-protection-skills
Guides privacy audit report writing including executive summary drafting, findings classification (critical, high, medium, low), evidence referencing, root cause analysis documentation, recommendation formulation, management response tracking, and report distribution protocols. Covers report structure from scope definition through appendices and sign-off. Keywords: audit report, findings documentation, executive summary, recommendations, report structure, privacy audit deliverables.
gdpr-compliance-audit
mukul975/privacy-data-protection-skills
Guides a comprehensive organisational data protection audit against key GDPR requirements including Articles 5, 24, 25, 28, 30, 32, 35, and 37. Includes 50+ control points covering principles, accountability, security, and governance. Activate when performing compliance audits, preparing for supervisory authority inspections, or assessing organisational GDPR maturity. Keywords: data protection audit, compliance audit, GDPR audit, control points, accountability.
conducting-gdpr-dpia
mukul975/privacy-data-protection-skills
Guides the end-to-end GDPR Data Protection Impact Assessment process under Article 35, including mandatory trigger identification per Art. 35(3), DPIA content requirements per Art. 35(7), and EDPB WP248rev.01 methodology. Activate for systematic profiling, large-scale special category processing, or large-scale public monitoring. Keywords: DPIA, Article 35, impact assessment, WP248, data protection, risk assessment.
backup-retention-erasure
mukul975/privacy-data-protection-skills
Manages backup and archive data under retention schedules and erasure obligations. Covers the technical infeasibility exception for backup deletion, backup cycle alignment with retention periods, restore-and-delete procedures, and interim protective measures during backup retention. Activate for backup deletion, archive erasure, backup retention, restore and delete, technical infeasibility queries.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image