MCPInstall

ai-data-retention

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.

Installs
43
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-data-retention
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads ai-data-retention automatically when relevant.

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

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

FAQ

What does the ai-data-retention skill do?

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.

How do I install ai-data-retention?

Run npx skills add https://github.com/mukul975/privacy-data-protection-skills --skill ai-data-retention 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-data-retention/ (personal) or .claude/skills/ai-data-retention/ (project).

Which AI agents can use ai-data-retention?

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-data-retention 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-data-retention?

It is published by mukul975 in mukul975/privacy-data-protection-skills. It has 43 recorded installs.

More from mukul975/privacy-data-protection-skills

View all →

brazil-lgpd

mukul975/privacy-data-protection-skills

Open the skill to read its SKILL.md instructions.

61 installs

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.

Data & Databases56 installs

audit-report-writing

mukul975/privacy-data-protection-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing50 installs

gdpr-compliance-audit

mukul975/privacy-data-protection-skills

Open the skill to read its SKILL.md instructions.

Security48 installs

conducting-gdpr-dpia

mukul975/privacy-data-protection-skills

Open the skill to read its SKILL.md instructions.

48 installs

backup-retention-erasure

mukul975/privacy-data-protection-skills

Open the skill to read its SKILL.md instructions.

47 installs

Popular security skills

View category →

azure-compliance

microsoft/azure-skills

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

OfficialSecurity567K installs

minimal-run-and-audit

lllllllama/rigorpilot-skills

Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.

Security477.4K installs

seo-audit

coreyhaines31/marketingskills

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.

Security238.7K installs

firebase-security-rules-auditor

firebase/agent-skills

Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.

OfficialSecurity139.1K installs

audit

pbakaus/impeccable

Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.

Security81.9K installs

competitors

coreyhaines31/marketingskills

When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.

Security79.3K installs