Ai Bias Special Category logo

Ai Bias Special Category

Community
mukul975
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.

Overview

Publishermukul975
RepositoryPrivacy-Data-Protection-Skills
Skill nameai-bias-special-category
Stars
279
Forks
59
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mukul975 on GitHub. Read the source before you install it.

Installation

Install the Ai Bias Special Category AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mukul975/Privacy-Data-Protection-Skills.git /tmp/Privacy-Data-Protection-Skills
mkdir -p .claude/skills
cp -r /tmp/Privacy-Data-Protection-Skills/plugins/ai-privacy-governance-skills/skills/ai-bias-special-category .claude/skills/ai-bias-special-category
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ai Bias Special Category in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ai Bias Special Category on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ai Bias Special Category is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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:

CategoryAI Bias RiskExample
Racial or ethnic originDiscrimination in hiring, credit, policingCV screening penalising names associated with ethnic minorities
Political opinionsPolitical profiling, content suppressionNews recommendation amplifying or suppressing political viewpoints
Religious beliefsService denial, discriminatory targetingInsurance pricing varying by religious affiliation
Trade union membershipEmployment discriminationPerformance scoring penalising union activity
Genetic dataGenetic discrimination in insurance/employmentHealth insurance pricing based on genetic predisposition
Biometric dataDifferential accuracy across demographicsFacial recognition with higher error rates for darker skin tones
Health dataHealth-based discriminationHiring algorithms penalising disability or mental health history
Sexual orientationDiscrimination, outingContent recommendation inadvertently revealing sexual orientation

Proxy Inference of Special Categories

AI models frequently infer Art. 9 data from non-sensitive features:

Proxy FeatureInferred CategoryMechanism
Postcode/zip codeRace/ethnicity, incomeResidential segregation patterns
First/last nameRace/ethnicity, religionName-ethnicity correlations
Browsing historyPolitical opinion, religion, healthContent consumption patterns
Purchase historyHealth status, religionMedication purchases, dietary products
Language patternsNational origin, educationDialect, vocabulary, grammar patterns
Device/app usageAge, income, disabilityAccessibility 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

MetricDefinitionWhen to Use
Demographic parityP(positive outcomegroup A) = P(positive outcome
Equalized oddsTPR and FPR equal across groupsWhen accuracy should be equal across groups
Equal opportunityTPR equal across groups (relaxed equalized odds)When true positive detection should be equal
CalibrationP(Y=1score=s, group=A) = P(Y=1
Predictive parityPPV equal across groupsWhen positive predictions should be equally reliable

Individual Fairness Metrics

MetricDefinition
ConsistencySimilar individuals receive similar outcomes
Counterfactual fairnessOutcome would be the same if protected attribute were different
Causal fairnessNo causal path from protected attribute to outcome

Metric Selection Guidance

Decision ContextRecommended MetricJustification
Hiring/admissionsEqualized odds or equal opportunityEqual detection of qualified candidates across groups
Credit scoringCalibrationScore should mean the same probability regardless of group
Criminal riskEqualized oddsBoth FPR and TPR should be equal to avoid disproportionate impact
HealthcareEqual opportunity + calibrationEqual detection of conditions; equal meaning of risk scores
Content moderationDemographic parityContent 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

  1. Profile training data demographics against target population
  2. Identify underrepresented groups that may have lower model performance
  3. Check for historical bias in labelled data (e.g., biased hiring decisions used as ground truth)
  4. Identify label noise differential across groups
  5. Assess feature distributions across groups for proxy discrimination potential

Phase 2: Model Testing

  1. Evaluate model performance disaggregated by protected groups
  2. Compute selected fairness metrics for each protected group pair
  3. Run counterfactual testing: change protected attributes, observe output changes
  4. Test for intersectional bias (combinations of protected attributes)
  5. Evaluate model performance on edge cases and adversarial examples per group

Phase 3: Output Analysis

  1. Analyse decision distribution across groups
  2. Identify threshold effects that disproportionately impact specific groups
  3. Test for feedback loop amplification over time
  4. Assess output explanation fairness (are explanations equally informative across groups?)

Bias Mitigation Strategies

Pre-processing (Data-Level)

StrategyDescriptionTrade-off
ResamplingOver-sample underrepresented groups, under-sample overrepresentedMay reduce data diversity or introduce duplicates
ReweightingAssign higher weights to underrepresented group samplesComputationally simple; may not address structural bias
RelabellingCorrect historically biased labelsRequires domain expertise; may be subjective
Fair representation learningLearn latent representation that removes protected attribute informationMay lose legitimate correlations

In-processing (Algorithm-Level)

StrategyDescriptionTrade-off
Adversarial debiasingTrain adversary to predict protected attribute from model; penalise successAccuracy-fairness trade-off; requires protected attribute data
Fairness constraintsAdd fairness metric as training constraintMay reduce overall accuracy; constraint satisfaction varies
RegularisationAdd fairness-related regularisation term to loss functionBalances accuracy and fairness; requires tuning
Causal modellingUse causal graph to block discriminatory pathsRequires causal knowledge; complex to implement

Post-processing (Output-Level)

StrategyDescriptionTrade-off
Threshold adjustmentDifferent decision thresholds per group to equalise metricsMay be perceived as unfair; legally complex
Score calibrationCalibrate scores per groupRequires sufficient group data; may reduce discrimination
Reject optionAbstain from decision for borderline cases across groupsReduces coverage; requires human fallback

AI Act Art. 10 Data Governance

Art. 10 requires for high-risk AI training data:

RequirementImplementation
Relevant dataTraining data must be relevant to the intended purpose
Sufficiently representativeData must represent the population the system will be deployed on
Free of errorsData quality assessment and cleaning processes
CompleteSufficient coverage of deployment scenarios
Appropriate statistical propertiesDistribution analysis including demographic representation
Bias examinationExamine 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

SectionContent
System descriptionModel, purpose, affected groups
Protected attributes assessedArt. 9 categories + equality law characteristics
Fairness metrics selectedWith justification for selection
Data audit resultsTraining data demographics, representation gaps
Model testing resultsPer-group performance, fairness metrics, counterfactual results
Bias findingsIdentified disparities with severity assessment
Mitigation measuresApplied strategies with effectiveness evidence
Residual biasRemaining disparities after mitigation
Trade-off documentationAccuracy-fairness trade-offs, metric impossibility acknowledgement
Ongoing monitoring planPost-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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ai Bias Special Category AI 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.

Why use Ai Bias Special Category on TypingMind?

Because you install it once and use it with any model. Ai Bias Special Category is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ai Bias Special Category in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mukul975/Privacy-Data-Protection-Skills/tree/main/plugins/ai-privacy-governance-skills/skills/ai-bias-special-category. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ai Bias Special Category?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ai Bias Special Category?

As many as you like. As long as a model supports skills, you can use Ai Bias Special Category with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ai Bias Special Category AI skill free?

Yes. It is published on GitHub by mukul975 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇