AI Ethics and Fairness Validator

VerifiedCaution

Validate AI/ML models and datasets for bias, fairness, and ethical compliance. Computes fairness metrics (demographic parity, equalized odds) and generates audit reports with mitigation strategies aligned to IEEE, EU, and ACM ethical frameworks.

Sby Skills Guide Bot
Data & AIAdvanced
3/11/2026
Claude CodeCodex
#fairness#bias-detection#model-audit#fairlearn#ethics-compliance

Recommended for

Automated summary

This skill audits AI/ML models and datasets by computing quantitative fairness metrics (demographic parity, equalized odds, calibration, disparate impact) and producing severity-classified findings with mitigation recommendations.

Strengths

  • Computes core fairness metrics through Fairlearn and AIF360, with explicit application of the four-fifths rule (0.80 threshold)
  • Classifies each finding by severity (low to critical) based on ratio values, making prioritization straightforward
  • Generates a compliance matrix mapped to IEEE, EU, and ACM ethical frameworks with documented decisions
  • Includes proxy variable detection (correlation above 0.3 with protected attributes) and a ranked mitigation plan

Limitations

  • Assumes model predictions and ground truth labels are already available, along with sensitive attribute columns under appropriate governance
  • Groups with fewer than 30 observations make metrics unreliable and require aggregation or bootstrap confidence intervals
  • The error handling section is truncated in the provided document, limiting coverage of failure cases
When to use it

Use when auditing AI systems for ethical compliance, assessing fairness across demographic groups, or detecting bias in a model or dataset.

When not to use it

Avoid when protected attributes are not accessible or when no model predictions and ground truth labels are available for analysis.

Security analysis

Caution
Quality score84/100

The instructions are transparent and goal-directed: read a predictions dataset, compute fairness metrics with Fairlearn/AIF360, and write a report. Risk comes from the broad Bash(python:*) grant and handling of sensitive protected-attribute data, not from malicious intent — there are no exfiltration or destructive patterns. This places it at 'caution' rather than 'safe', since an agent could execute arbitrary Python and persist sensitive demographic findings.

Findings
  • •Declared Bash(python:*) scope permits arbitrary Python execution, which can reach the network and filesystem beyond the stated fairness-analysis purpose.
  • •The skill operates on protected demographic attributes (race, gender, age, socioeconomic status) but gives no guidance on de-identification, access control, or secure handling of that data.
  • •Write/Edit permissions combined with the generated audit report could persist sensitive group-level findings to disk without any stated retention or redaction policy.
  • •No evidence of destructive commands, secret exfiltration, obfuscated payloads, curl|sh installs, or safety-disabling behavior in the instructions.
How this analysis is made

Examples

Audit de fairness sur un modèle de scoring
Audite la fairness de mon modèle de scoring de crédit : charge predictions.csv et labels.csv, calcule la parité démographique et les equalized odds par genre, puis génère un rapport avec constats classés par sévérité.
Détection de biais et variables proxy
Vérifie mon dataset de recrutement pour des biais : identifie les features corrélées à l'attribut protégé 'origine' et signale celles au-dessus de r > 0.3.
Matrice de conformité éthique
Évalue la conformité éthique de ce classifieur selon les lignes directrices IEEE et EU Trustworthy AI, et produis une matrice pass/fail avec les preuves.

name: validating-ai-ethics-and-fairness description: | Validate AI/ML models and datasets for bias, fairness, and ethical concerns. Use when auditing AI systems for ethical compliance, fairness assessment, or bias detection. Trigger with phrases like "evaluate model fairness", "check for bias", or "validate AI ethics".

allowed-tools: Read, Write, Edit, Grep, Glob, Bash(python:*) version: 1.0.0 author: Jeremy Longshore jeremy@intentsolutions.io license: MIT compatible-with: claude-code, codex, openclaw

AI Ethics Validator

Overview

Validate AI/ML models and datasets for bias, fairness, and ethical compliance using quantitative fairness metrics and structured audit workflows. This skill computes demographic parity, equalized odds, calibration scores, and disparate impact ratios across protected groups, then generates severity-classified findings with actionable mitigation strategies aligned to IEEE, EU, and ACM ethical frameworks.

Prerequisites

  • Python 3.9+ with Fairlearn >= 0.9 (pip install fairlearn)
  • IBM AI Fairness 360 toolkit (pip install aif360) for comprehensive bias analysis
  • pandas, NumPy, and scikit-learn for data manipulation and model evaluation
  • Model predictions (probabilities or binary labels) and corresponding ground truth labels
  • Demographic attribute columns (age, gender, race, etc.) accessible under appropriate data governance
  • Optional: Google What-If Tool for interactive fairness exploration on TensorFlow models

Instructions

  1. Load the model predictions and ground truth dataset using the Read tool; verify schema includes sensitive attribute columns
  2. Define the protected attributes and privileged/unprivileged group definitions for the fairness analysis
  3. Compute representation statistics: group counts, class label distributions, and feature coverage per demographic segment
  4. Calculate core fairness metrics using Fairlearn or AIF360:
    • Demographic parity ratio (selection rate parity across groups)
    • Equalized odds difference (TPR and FPR parity)
    • Equal opportunity difference (TPR parity only)
    • Predictive parity (precision parity across groups)
    • Calibration scores per group (predicted probability vs observed outcome)
  5. Apply four-fifths rule: flag any metric where the ratio falls below 0.80 as potential adverse impact
  6. Classify each finding by severity: low (ratio 0.90-1.0), medium (0.80-0.90), high (0.70-0.80), critical (below 0.70)
  7. Identify proxy variables by computing correlation between non-protected features and sensitive attributes
  8. Generate mitigation recommendations: resampling, reweighting, threshold adjustment, or in-processing constraints (e.g., ExponentiatedGradient from Fairlearn)
  9. Produce a compliance assessment mapping findings to IEEE Ethically Aligned Design, EU Ethics Guidelines for Trustworthy AI, and ACM Code of Ethics
  10. Document all ethical decisions, trade-offs, and residual risks in a structured audit report

Output

  • Fairness metric dashboard: per-group values for demographic parity, equalized odds, equal opportunity, predictive parity, and calibration
  • Severity-classified findings table: metric name, affected groups, ratio value, severity level, recommended action
  • Representation analysis: group sizes, class distributions, feature coverage gaps
  • Proxy variable report: features correlated with protected attributes above threshold (r > 0.3)
  • Mitigation plan: ranked strategies with expected fairness improvement and accuracy trade-off estimates
  • Compliance matrix: pass/fail against IEEE, EU, and ACM ethical guidelines with evidence citations

Error Handling

| Error | Cause | Solution | |-------|-------|----------| | Insufficient group sample size | Fewer than 30 observations in a demographic group | Aggregate related subgroups; use bootstrap confidence intervals; flag metric as unreliable | | Missing sensitive attributes | Protected attribute columns absent from dataset | Apply proxy detection via correlated features; request attribute access under data governance approval | | Conflicting fairness criteria | Demographic parity and equalized odds contradict | Document the impossibility theorem trade-off; prioritize the metric most aligned with the deployment context | | Data quality failures | Inconsistent encoding or null values in attribute columns | Standardize categorical encodings; impute or exclude nulls; validate with schema checks before analysis | | Model output format mismatch | Predictions not in expected probability or binary format | Convert logits to probabilities via sigmoid; binarize at the decision threshold before metric computation |

Examples

Scenario 1: Hiring Model Audit -- Validate a resume-screening classifier for gender and age bias. Compute demographic parity across male/female groups and age buckets (18-30, 31-50, 51+). Apply the four-fifths rule. Finding: female selection rate at 0.72 of male rate (critical severity). Recommend reweighting training samples and adjusting the decision threshold.

Scenario 2: Credit Scoring Fairness -- Assess a credit approval model for racial disparate impact. Calculate equalized odds (TPR and FPR) across racial groups. Finding: FPR for Group A is 2.1x Group B (high severity). Recommend in-processing constraint using ExponentiatedGradient with FalsePositiveRateParity.

Scenario 3: Healthcare Risk Prediction -- Evaluate a patient risk model for age and socioeconomic bias. Compute calibration curves per group. Finding: model overestimates risk for low-income patients by 15%. Recommend recalibration using Platt scaling per subgroup with post-deployment monitoring for fairness drift.

Resources

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/ai-ethics-and-fairness-validator-mmlj2p8i/download' --output '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md.part' && mv '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md.part' '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Write, Edit, Grep, Glob, Bash(python:*)

Original excerpt: Prerequisites
  • Python 3.9+ with Fairlearn >= 0.9 (pip install fairlearn)
  • IBM AI Fairness 360 toolkit (pip install aif360) for comprehensive bias analysis
  • pandas, NumPy, and scikit-learn for data manipulation and model evaluation
  • Model predictions (probabilities or binary labels) and corresponding ground truth labels
  • Demographic attribute columns (age, gender, race, etc.) accessible under appropriate data governance
  • Optional: Google What-If Tool for interactive fairness exploration on TensorFlow models

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md' && test -s '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/validating-ai-ethics-and-fairness' && cp -R '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i' '.claude/skills/validating-ai-ethics-and-fairness'

Codex
test -f '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md' && test -s '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/validating-ai-ethics-and-fairness' && cp -R '.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i' '.agents/skills/validating-ai-ethics-and-fairness'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i'

openskills read 'ai-ethics-and-fairness-validator-mmlj2p8i'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/ai-ethics-and-fairness-validator-mmlj2p8i/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills