Agent skill

AI Model Privacy Audit

by mukul975 in mukul975/Privacy-Data-Protection-Skills

Conducts privacy auditing of AI models including training data extraction testing, membership inference attacks, model inversion testing, and attribute inference assessment.

Apache-2.0Auto-check passedLegal & Compliance

Install AI Model Privacy Audit

skills CLI
$ npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-model-privacy-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mukul975/Privacy-Data-Protection-Skills ai-model-privacy-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mukul975/Privacy-Data-Protection-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/privacy/ai-model-privacy-audit .claude/skills/ai-model-privacy-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ai-model-privacy-audit
GitHub stars
301
Token cost
~2.8k tokens
SKILL.md length
1,256 words
Files
5 (incl. scripts, references, assets)
Skills in repo
280
Repo updated
First seen
Licence
Apache-2.0

At a glance

Conducts privacy auditing of AI models including training data extraction testing, membership inference attacks, model inversion testing, and attribute inference assessment.

  • Works in 9 steps: Training Data Extraction → Membership Inference → Model Inversion → …
  • Tasks that involve Privacy and GDPR
  • SKILL.md covers Overview, Privacy Attack Taxonomy, Audit Methodology and Privacy Leakage Thresholds, plus 4 more sections
  • Runs Python scripts from its folder

What it does

AI Model Privacy Audit is an agent skill from mukul975/Privacy-Data-Protection-Skills. Conducts privacy auditing of AI models including training data extraction testing, membership inference attacks, model inversion testing, and attribute inference assessment. Uses ML Privacy Meter and related tools to quantify privacy leakage. Keywords: model audit, membership inference, privacy meter, model inversion, training data extraction.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts, reference files and assets (for example `assets/template.md`, `references/standards.md` and `references/workflows.md`).

It sits in Legal & Compliance, covering Privacy and GDPR. The repository describes itself as: 282+ structured privacy & data protection skills for AI agents. GDPR, CCPA, EU AI Act, HIPAA, LGPD, PIPL, DPDP Act. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Privacy and GDPR

Example prompts

  • “Use the ai-model-privacy-audit skill to conduct privacy auditing of AI models including training data extraction testing, membership inference…”
  • “/ai-model-privacy-audit”

Requirements

  • Python 3

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Training Data Extraction
  2. Membership Inference
  3. Model Inversion
  4. Attribute Inference
  5. Audit Scoping (Days 1-3)
  6. Environment Setup (Days 4-7)
  7. Attack Execution (Days 8-18)
  8. Analysis and Reporting (Days 19-25)
  9. Remediation Validation (Days 26-30)

What it can do on your machine

Read from SKILL.md and the folder at commit 9b2ef9e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AI Model Privacy Audit loads about 2.8k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 1,256 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from mukul975/Privacy-Data-Protection-Skills at commit 9b2ef9e, republished under its Apache-2.0 licence (© mukul975). 1,256 words, ~2,782 tokens.

Download SKILL.mdSave it as .claude/skills/ai-model-privacy-audit/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
ai-model-privacy-audit
description
Conducts privacy auditing of AI models including training data extraction testing, membership inference attacks, model inversion testing, and attribute inference assessment. Uses ML Privacy Meter and related tools to quantify privacy leakage. Keywords: model audit, membership inference, privacy meter, model inversion, training data extraction.
license
Apache-2.0
metadata.author
mukul975
metadata.version
1.0
metadata.domain
privacy
metadata.subdomain
ai-privacy-governance
metadata.tags
model-audit, membership-inference, privacy-meter, model-inversion, data-extraction, attribute-inference

AI Model Privacy Audit

Overview

AI model privacy auditing is the systematic assessment of whether trained ML models leak information about their training data. Models can memorize individual training records, enabling adversaries to extract personal data, determine dataset membership, reconstruct input features, or infer sensitive attributes. This skill implements a comprehensive model privacy audit methodology using established attack techniques and tools (ML Privacy Meter, ART, Foolbox) to quantify privacy leakage before deployment and periodically during operation. The audit results feed directly into the AI DPIA risk assessment and inform mitigation measure selection.

Privacy Attack Taxonomy

1. Training Data Extraction

Objective: Extract verbatim or near-verbatim records from the model's training data.

Attack VectorDescriptionTarget Models
Prompt-based extractionCraft prompts that cause LLMs to regurgitate training dataLanguage models, generative models
Canary extractionInsert known canary strings into training data and test if model reproduces themAny model (testing methodology)
Gradient-based extractionUse model gradients to reconstruct training inputsModels with accessible gradients
Generative reconstructionUse the model as an oracle to iteratively reconstruct training samplesGANs, VAEs, diffusion models

Risk Factors Increasing Extraction Likelihood:

  • Large model capacity relative to training data size (overfitting)
  • Training data containing duplicated or near-duplicated records
  • Longer training duration (more epochs)
  • Lower regularisation
  • Models with high output granularity (logits, probabilities)

Testing Methodology:

  1. Insert canary records with unique identifiers into training data
  2. Train the model
  3. Attempt extraction through various prompting strategies
  4. Measure extraction success rate (percentage of canaries recovered)
  5. Threshold: extraction rate should be below 0.1% for acceptable risk
2. Membership Inference

Objective: Determine whether a specific record was in the model's training set.

Attack TypeMethodComputational Cost
Shadow model attackTrain shadow models on similar data, build a binary classifier on model outputsHigh — requires training multiple shadow models
Metric-based attackUse model confidence, loss, or entropy to distinguish members from non-membersLow — single model query per sample
Label-only attackUse predicted labels (no confidence scores) to infer membershipMedium — requires multiple queries
Likelihood ratio attack (LiRA)Compare per-sample loss to reference distributionsHigh — most accurate, requires multiple models

ML Privacy Meter Implementation:

  • Population metric-based attack: compares target model's loss on a sample against population loss distribution
  • Reference metric-based attack: uses reference models to compute per-sample metrics
  • Shadow model attack: trains shadow models and uses the attack model to classify members

Testing Methodology:

  1. Partition data: training set (members) and held-out set (non-members)
  2. Run membership inference attacks using ML Privacy Meter
  3. Measure attack success: true positive rate at low false positive rate (TPR@FPR=0.1%, 1%)
  4. Generate ROC curves per sample and aggregate
  5. Threshold: TPR@1%FPR should be below 5% for acceptable privacy
3. Model Inversion

Objective: Reconstruct input features from model outputs.

Attack TypeMethodTarget
Confidence-based inversionIteratively optimise input to maximise model confidence for a known labelClassification models
Gradient-based inversionUse model gradients to reconstruct inputs from outputsWhite-box models
GAN-based inversionTrain a GAN to invert model outputs to input spaceFace recognition, image classifiers

Testing Methodology:

  1. Select target classes or individuals
  2. Run inversion attacks with various initializations
  3. Measure reconstruction quality (SSIM, PSNR for images; cosine similarity for embeddings)
  4. Assess re-identification risk: can reconstructed data identify specific individuals?
  5. Threshold: reconstruction similarity should be below 0.3 (SSIM) for acceptable risk
4. Attribute Inference

Objective: Infer sensitive attributes not present in the model's output.

Attack TypeDescription
Correlation exploitationUse correlated features to infer sensitive attributes from model behaviour
Partial knowledge attackAttacker knows some attributes and uses model to infer remaining sensitive ones
Group inferenceDetermine statistical properties of training subgroups

Testing Methodology:

  1. Identify sensitive attributes (Art. 9 categories) that may be correlated with model features
  2. Train attack models to predict sensitive attributes from model outputs
  3. Measure inference accuracy for each sensitive attribute
  4. Compare against random baseline
  5. Threshold: inference accuracy should not exceed random baseline + 10%

Audit Methodology

Phase 1: Audit Scoping (Days 1-3)
  1. Define audit scope: which models, what deployment context, what threat model
  2. Identify assets: training data, model artefacts, deployment infrastructure
  3. Define threat model: who are the adversaries, what access do they have?
    • Black-box: API access only (queries and responses)
    • Grey-box: API access plus model architecture knowledge
    • White-box: Full access to model weights and architecture
  4. Select attacks based on threat model and model type
  5. Define success criteria (acceptable leakage thresholds)
  6. Obtain audit authorisation from model owner and legal
Show full SKILL.md (515 more words)Show less
Phase 2: Environment Setup (Days 4-7)
  1. Set up isolated audit environment (no production data leakage)
  2. Install audit tools: ML Privacy Meter, ART (Adversarial Robustness Toolbox), custom scripts
  3. Obtain model access (API endpoint or model weights depending on threat model)
  4. Prepare member/non-member datasets for membership inference
  5. Prepare canary data for extraction testing
  6. Configure monitoring to log all audit queries
Phase 3: Attack Execution (Days 8-18)

For each selected attack:

  1. Configure attack parameters
  2. Execute attack against the target model
  3. Collect results (success rates, confidence intervals)
  4. Vary attack parameters to find worst-case leakage
  5. Document: attack configuration, results, computational cost
Phase 4: Analysis and Reporting (Days 19-25)
  1. Aggregate results across all attacks
  2. Calculate privacy risk scores per attack type
  3. Identify high-risk data subsets (records most vulnerable to extraction)
  4. Cross-reference with DPIA risk register
  5. Generate audit report with:
    • Executive summary
    • Attack results per category
    • Risk assessment with GDPR alignment
    • Recommended mitigations
    • Residual risk after proposed mitigations
Phase 5: Remediation Validation (Days 26-30)
  1. If mitigations are applied (differential privacy, output perturbation, etc.)
  2. Re-run key attacks to validate mitigation effectiveness
  3. Document residual leakage post-mitigation
  4. Compare against acceptable thresholds
  5. Issue final audit certificate or remediation requirements

Privacy Leakage Thresholds

MetricAcceptableElevatedUnacceptable
Membership inference TPR@1%FPR< 5%5-15%> 15%
Training data extraction rate< 0.1%0.1-1%> 1%
Model inversion SSIM< 0.30.3-0.6> 0.6
Attribute inference accuracy above baseline< 10%10-25%> 25%

Mitigation Measures

MitigationAttacks MitigatedTrade-off
Differential privacy (DP-SGD)All — provides mathematical guaranteeModel accuracy reduction (calibrate epsilon)
Training data deduplicationExtraction, membership inferenceOne-time preprocessing cost
Regularisation (dropout, weight decay)Membership inference, overfitting-related leakageMay affect model performance
Output perturbationModel inversion, attribute inferenceReduces output precision
Confidence score roundingMetric-based membership inferenceMinor output precision loss
Model distillationExtraction, membership inferenceRequires additional training
Rate limitingAll query-based attacksAffects legitimate use
Input/output PII filteringExtraction of PII from generative modelsMay affect model utility

Tools and Frameworks

ToolPurposeSource
ML Privacy MeterMembership inference auditinggithub.com/privacytrustlab/ml_privacy_meter
IBM ARTAdversarial robustness and privacy testinggithub.com/Trusted-AI/adversarial-robustness-toolbox
TensorFlow PrivacyDifferential privacy traininggithub.com/tensorflow/privacy
OpacusPyTorch differential privacygithub.com/pytorch/opacus
Google DP LibraryDifferential privacy algorithmsgithub.com/google/differential-privacy
FoolboxAdversarial attack librarygithub.com/bethgelab/foolbox

Enforcement Relevance

Model privacy auditing is not explicitly required by the GDPR or AI Act, but is effectively mandated through:

  • Art. 35 DPIA: Risk assessment for AI systems must evaluate privacy leakage risks — auditing is the standard methodology
  • Art. 32 Security: Appropriate technical measures to ensure security of processing — privacy auditing validates these measures
  • AI Act Art. 9: Risk management for high-risk AI requires identification and mitigation of privacy risks
  • AI Act Art. 15: Accuracy, robustness, and cybersecurity requirements — privacy attacks are a cybersecurity concern
  • EDPB Guidelines 04/2025: Controllers must assess whether AI models have effectively anonymised training data — auditing tests this claim

Integration Points

  • ai-dpia: Audit results feed into DPIA Phase 3 risk assessment
  • ai-data-retention: Audit validates whether deletion from training data is effective
  • ai-deployment-checklist: Pre-deployment privacy audit is a checklist requirement
  • ai-federated-learning: Federated learning models require distributed privacy auditing

© mukul975, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references, assets) in skills/privacy/ai-model-privacy-audit of mukul975/Privacy-Data-Protection-Skills.

  • SKILL.md
  • assets/template.md
  • references/standards.md
  • references/workflows.md
  • scripts/process.py

Open the folder on GitHubat commit 9b2ef9e

Compare with similar skills

AI Model Privacy Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AI Model Privacy Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI Model Privacy Audit this skillmukul975/Privacy-Data-Protection-Skills301—~2.8kAutomated safety check: PassApache-2.0
C15tc15t/c15t1.9k1 repos~1.6kAutomated safety check: PassApache-2.0
HIPAA Safe Harbor Coverage Auditmaziyarpanahi/openmed5.5k—~1.7kAutomated safety check: PassApache-2.0
Korean Privacy Termskimlawtech/korean-privacy-terms587—~2.9kAutomated safety check: PassApache-2.0
Gdpr ComplianceSushegaad/Claude-Skills-Governance-Risk-and-Compliance9461 repos~3.9kAutomated safety check: PassMIT
Hipaa ComplianceSushegaad/Claude-Skills-Governance-Risk-and-Compliance9461 repos~2.3kAutomated safety check: PassMIT

Similar skills

  • C15t

    c15t/c15t

    Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript.

    1.9k GitHub starsUsed in 1 repo~1.6k tokens
    Legal & ComplianceAuto-check passed
  • Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.

    5.5k GitHub stars~1.7k tokensUpdated today
    Legal & ComplianceAuto-check passed
  • Korean Privacy Terms

    kimlawtech/korean-privacy-terms

    처리방침·이용약관 자동 생성 스킬 패키지 (v4.0). An agent skill from kimlawtech/korean-privacy-terms.

    587 GitHub stars~2.9k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Gdpr Compliance

    Sushegaad/Claude-Skills-Governance-Risk-and-Compliance

    Expert GDPR compliance assistant covering all four core workflows: (1) auditing code and systems for GDPR violations, (2) drafting GDPR-compliant documents such as privacy policies, Data Processing…

    946 GitHub starsUsed in 1 repo~3.9k tokens
    Legal & ComplianceAuto-check passed
  • Hipaa Compliance

    Sushegaad/Claude-Skills-Governance-Risk-and-Compliance

    Expert HIPAA compliance assistant for healthcare and software contexts.

    946 GitHub starsUsed in 1 repo~2.3k tokens
    Legal & ComplianceAuto-check passed
  • Pii Contract Analyze

    gregmos/PII-Shield

    Universal legal document processor with PII anonymization. An agent skill from gregmos/PII-Shield.

    150 GitHub stars~8.9k tokensUpdated 3 mo ago
    Legal & ComplianceAuto-check: notes

More from mukul975/Privacy-Data-Protection-Skills

All 280 skills in this repo
  • Age Gating Services

    mukul975/Privacy-Data-Protection-Skills

    Implements age-gating mechanisms for online services to restrict access based on user age.

    301 GitHub stars~3.7k tokensUpdated 6 mo ago
    Auto-check passed
  • AI Data Retention

    mukul975/Privacy-Data-Protection-Skills

    Manages AI model retention and machine unlearning requirements.

    301 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • AI Dpia

    mukul975/Privacy-Data-Protection-Skills

    Conducts Data Protection Impact Assessments for AI and ML systems per EDPB Guidelines 04/2025 on AI processing.

    301 GitHub stars~3.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Dpia Mitigation Plan

    mukul975/Privacy-Data-Protection-Skills

    Structures risk mitigation planning and residual risk tracking for Data Protection Impact Assessments under GDPR Article 35(7)(d).

    301 GitHub stars~846 tokensUpdated 6 mo ago
    Auto-check passed
  • Gdpr Accountability

    mukul975/Privacy-Data-Protection-Skills

    Guides implementation of the GDPR accountability principle under Articles 5(2) and 24, including documentation requirements for policies, DPIAs, RoPA, training records, and breach logs.

    301 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Pia Threshold Screening

    mukul975/Privacy-Data-Protection-Skills

    Conducts pre-DPIA threshold screening to determine whether a full Data Protection Impact Assessment is required under GDPR Article 35.

    301 GitHub stars~880 tokensUpdated 6 mo ago
    Auto-check passed

Questions about AI Model Privacy Audit

What does AI Model Privacy Audit do?

Conducts privacy auditing of AI models including training data extraction testing, membership inference attacks, model inversion testing, and attribute inference assessment. AI Model Privacy Audit is an agent skill from mukul975/Privacy-Data-Protection-Skills. Conducts privacy auditing of AI models including training data extraction testing, membership inference attacks, model inversion testing, and attribute inference assessment.

When should I use AI Model Privacy Audit?

AI Model Privacy Audit fits situations like: tasks that involve Privacy and GDPR.

How do I install AI Model Privacy Audit in Claude Code?

Run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-model-privacy-audit -a claude-code`. Or copy the skill folder (skills/privacy/ai-model-privacy-audit in mukul975/Privacy-Data-Protection-Skills) into .claude/skills/ai-model-privacy-audit in your project. Claude Code loads it when a task matches its description.

How do I install AI Model Privacy Audit in Codex?

Run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-model-privacy-audit -a codex`. Or copy the skill folder (skills/privacy/ai-model-privacy-audit in mukul975/Privacy-Data-Protection-Skills) into .agents/skills/ai-model-privacy-audit in your project. Codex loads it when a task matches its description.

Can I use AI Model Privacy Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-model-privacy-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-model-privacy-audit, .gemini/skills/ai-model-privacy-audit, .github/skills/ai-model-privacy-audit and .opencode/skills/ai-model-privacy-audit in your project.

What does AI Model Privacy Audit need to run?

Going by SKILL.md and its folder, AI Model Privacy Audit needs Python for the scripts in its folder. Our summary lists: Python 3.

Does AI Model Privacy Audit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is AI Model Privacy Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does AI Model Privacy Audit use?

AI Model Privacy Audit is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AI Model Privacy Audit use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to AI Model Privacy Audit?

Skills that share tags, products or a category with AI Model Privacy Audit: C15t (c15t/c15t, 1.9k stars), HIPAA Safe Harbor Coverage Audit (maziyarpanahi/openmed, 5.5k stars), Korean Privacy Terms (kimlawtech/korean-privacy-terms, 587 stars) and Gdpr Compliance (Sushegaad/Claude-Skills-Governance-Risk-and-Compliance, 946 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AI Model Privacy Audit?

mukul975 (a GitHub user) maintains it in mukul975/Privacy-Data-Protection-Skills, which has 301 GitHub stars. The repository holds 280 skills in this directory. The repository was last updated on March 16, 2026.

Source: mukul975/Privacy-Data-Protection-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.