Agent skill

AI Data Retention

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

Manages AI model retention and machine unlearning requirements.

Apache-2.0Auto-check passedLegal & Compliance

Install AI Data Retention

skills CLI
$ npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-data-retention -a claude-code

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

GitHub CLI
$ gh skill install mukul975/Privacy-Data-Protection-Skills ai-data-retention --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-data-retention .claude/skills/ai-data-retention && 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-data-retention
GitHub stars
297
Token cost
~1.9k tokens
SKILL.md length
756 words
Files
5 (incl. scripts, references, assets)
Skills in repo
280
Repo updated
First seen
Licence
Apache-2.0

At a glance

Manages AI model retention and machine unlearning requirements.

  • Works in 4 steps: Membership inference test: Run MI attack… → Output comparison: Compare model outputs… → Canary test: If canary records were… → …
  • Tasks that involve Privacy and GDPR
  • SKILL.md covers Overview, AI Data Retention Categories, Retention Policy Framework and Machine Unlearning Techniques, plus 3 more sections
  • Runs Python scripts from its folder

What it does

AI Data Retention is an agent skill from mukul975/Privacy-Data-Protection-Skills. Manages AI model retention and machine unlearning requirements. Covers training data deletion verification, model versioning for compliance, machine unlearning techniques (SISA, gradient-based), and retraining triggers. Keywords: AI retention, machine unlearning, model versioning, training data deletion, retraining, storage limitation.

Its SKILL.md is about 1.9k 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-data-retention skill to manage AI model retention and machine unlearning requirements”
  • “/ai-data-retention”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Membership inference test: Run MI attack on unlearned records — should classify as non-members
  2. Output comparison: Compare model outputs with and without the unlearned data
  3. Canary test: If canary records were included, verify they are no longer extractable
  4. Statistical test: Compare model to one retrained from scratch on the same data minus deleted records

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 Data Retention loads about 1.9k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 756 words of instructions outside code blocks.

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

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). 756 words, ~1,920 tokens.

Download SKILL.mdSave it as .claude/skills/ai-data-retention/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
ai-data-retention
description
Manages AI model retention and machine unlearning requirements. Covers training data deletion verification, model versioning for compliance, machine unlearning techniques (SISA, gradient-based), and retraining triggers. Keywords: AI retention, machine unlearning, model versioning, training data deletion, retraining, storage limitation.
license
Apache-2.0
metadata.author
mukul975
metadata.version
1.0
metadata.domain
privacy
metadata.subdomain
ai-privacy-governance
metadata.tags
ai-retention, machine-unlearning, model-versioning, training-data-deletion, retraining, storage-limitation

AI Model Retention and Unlearning

Overview

GDPR Art. 5(1)(e) storage limitation requires that personal data be kept no longer than necessary for the processing purpose. For AI systems, this creates complex retention challenges: training data used to build a model may no longer be needed once training is complete, but the model itself encodes information about the training data. Machine unlearning — the process of removing the influence of specific data from a trained model — is an emerging field that addresses the gap between deleting training data and eliminating its influence from model parameters. This skill provides retention policies, deletion verification methods, and machine unlearning techniques for AI compliance.

AI Data Retention Categories

Data CategoryDescriptionRetention Consideration
Raw training dataOriginal personal data used for model trainingDelete after training unless retraining justifies retention
Processed training dataCleaned, augmented, feature-engineered dataSame as raw — delete when training purpose exhausted
Validation/test dataData used for model evaluationRetain for model audit and comparison; pseudonymise
Model weights/parametersTrained model artefacts encoding training data informationRetain while model is deployed; delete on decommission
Inference logsInputs and outputs of model predictionsRetention based on purpose (audit, debugging, rights exercise)
Model metadataTraining configuration, hyperparameters, provenanceRetain for compliance documentation; low privacy risk
Embedding vectorsDense representations derived from personal dataMay contain personal data — apply retention policy

Retention Policy Framework

Training Data Retention Decision Tree
Training data category identified
│
├─ Is the data still needed for model retraining?
│  ├─ YES → Retain with documented justification and review date
│  └─ NO → Continue
│
├─ Is the data needed for model validation or audit?
│  ├─ YES → Retain in pseudonymised form with access controls
│  └─ NO → Continue
│
├─ Is the data needed for data subject rights exercise?
│  ├─ YES → Retain for rights exercise period, then delete
│  └─ NO → Continue
│
├─ Is there a legal obligation to retain?
│  ├─ YES → Retain per legal requirement
│  └─ NO → DELETE the training data
│
└─ After deletion: assess model for residual data encoding
Model Lifecycle Retention
PhaseRetention Rule
DevelopmentTraining data retained during active development
DeploymentTraining data deleted unless retraining is planned within defined period
OperationInference logs retained per purpose (30 days debug, 1 year audit)
RetrainingNew training data collected; old data deleted post-training
DecommissionAll model artefacts, training data, and logs deleted; retain only compliance documentation

Machine Unlearning Techniques

Exact Unlearning

Full retraining: Retrain the model from scratch on the dataset minus deleted records.

PropertyValue
GuaranteeComplete — model has no knowledge of deleted data
CostVery high — full training cost for each deletion request
FeasibilityImpractical for large models or frequent deletion requests
When to useSmall models, infrequent requests, high-sensitivity data
SISA (Sharded, Isolated, Sliced, Aggregated) Training

Train model on sharded data partitions. To unlearn, retrain only the affected shard.

PropertyValue
GuaranteeExact within the affected shard
Cost1/k of full retraining (k = number of shards)
FeasibilityRequires SISA architecture from the start
Trade-offModel accuracy may decrease with fewer shards contributing
Approximate Unlearning
Gradient-Based Unlearning

Apply gradient ascent on the data to be forgotten, then fine-tune on remaining data.

PropertyValue
GuaranteeApproximate — statistically similar to retrained model
CostLow — few gradient steps
FeasibilityWorks for most differentiable models
VerificationRequires membership inference testing to verify
Show full SKILL.md (312 more words)Show less
Influence Function-Based Unlearning

Use influence functions to estimate the effect of removing data and adjust model accordingly.

PropertyValue
GuaranteeApproximate — first-order approximation
CostMedium — requires Hessian computation
FeasibilityBest for smaller models or linear models
Unlearning Verification

After applying unlearning, verify effectiveness:

  1. Membership inference test: Run MI attack on unlearned records — should classify as non-members
  2. Output comparison: Compare model outputs with and without the unlearned data
  3. Canary test: If canary records were included, verify they are no longer extractable
  4. Statistical test: Compare model to one retrained from scratch on the same data minus deleted records

Model Versioning for Compliance

Version Control Requirements
ElementDocumentation
Model version IDUnique identifier (e.g., model-v2.3.1-20260314)
Training data snapshotHash of training dataset used for this version
Training dateWhen training was executed
Data deletions appliedWhich data subject deletions are reflected in this version
Unlearning appliedAny approximate unlearning applied since last full retraining
Privacy propertiesDP epsilon, MI test results for this version
Deployment datesWhen deployed and when retired
Retraining Triggers
TriggerAction
Accumulated deletion requests exceed thresholdFull retraining on updated dataset
Scheduled periodic retrainingIncorporate all pending deletions
Privacy audit reveals unacceptable leakageRetrain with enhanced privacy measures
Model performance degradationRetrain with current data (post-deletions)
Regulatory changeAssess if retraining needed for compliance

Enforcement Relevance

  • EDPB Guidelines 04/2025: Training data retention must be justified; deletion of training data does not automatically eliminate GDPR obligations for the model if it encodes personal data.
  • Garante v. OpenAI (2023): Required mechanism for data deletion from training data; acknowledged technical challenges but expected good faith effort.
  • EDPB ChatGPT Taskforce (2024): Controllers must demonstrate capability to address erasure requests affecting training data.

Integration Points

  • ai-data-subject-rights: Erasure rights implementation requires unlearning
  • ai-dpia: Retention and deletion capability assessed in DPIA
  • ai-model-privacy-audit: Audit verifies deletion effectiveness
  • ai-training-lawfulness: Retention justification part of lawful basis assessment

© 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-data-retention 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 Data Retention 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 Data Retention compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI Data Retention this skillmukul975/Privacy-Data-Protection-Skills297—~1.9kAutomated 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-terms586—~2.9kAutomated safety check: PassApache-2.0
Gdpr ComplianceSushegaad/Claude-Skills-Governance-Risk-and-Compliance9431 repos~3.9kAutomated safety check: PassMIT
Hipaa ComplianceSushegaad/Claude-Skills-Governance-Risk-and-Compliance9431 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.

    586 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…

    943 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.

    943 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.

    149 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.

    297 GitHub stars~3.7k 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.

    297 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).

    297 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.

    297 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.

    297 GitHub stars~880 tokensUpdated 6 mo ago
    Auto-check passed
  • Retention Schedule

    mukul975/Privacy-Data-Protection-Skills

    Designs and implements data retention schedules compliant with GDPR Article 5(1)(e) storage limitation principle.

    297 GitHub stars~3.3k tokensUpdated 6 mo ago
    Auto-check passed

Questions about AI Data Retention

What does AI Data Retention do?

Manages AI model retention and machine unlearning requirements. AI Data Retention is an agent skill from mukul975/Privacy-Data-Protection-Skills. Manages AI model retention and machine unlearning requirements.

When should I use AI Data Retention?

AI Data Retention fits situations like: tasks that involve Privacy and GDPR.

How do I install AI Data Retention in Claude Code?

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

How do I install AI Data Retention in Codex?

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

Can I use AI Data Retention 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-data-retention -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-data-retention, .gemini/skills/ai-data-retention, .github/skills/ai-data-retention and .opencode/skills/ai-data-retention in your project.

What does AI Data Retention need to run?

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

Does AI Data Retention 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 Data Retention 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 Data Retention use?

AI Data Retention 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 Data Retention use?

About 1.9k tokens (SKILL.md is roughly 7.7k 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 763 tokens, read only when the agent opens those files.

What are the alternatives to AI Data Retention?

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

Who maintains AI Data Retention?

mukul975 (a GitHub user) maintains it in mukul975/Privacy-Data-Protection-Skills, which has 297 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.