Ai Data Retention logo

Ai Data Retention

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

Overview

Publishermukul975
RepositoryPrivacy-Data-Protection-Skills
Skill nameai-data-retention
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 Data Retention 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-data-retention .claude/skills/ai-data-retention
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ai Data Retention 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 Data Retention 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 Data Retention 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 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

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 Data Retention AI 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.

Why use Ai Data Retention on TypingMind?

Because you install it once and use it with any model. Ai Data Retention 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 Data Retention 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-data-retention. 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 Data Retention?

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

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

Is the Ai Data Retention 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 👇