MCPInstall

auto-deletion-workflow

Implements automated data deletion workflows for GDPR Article 17 right to erasure and retention period expiry. Covers cascading deletion across dependent systems, dependency handling for referential integrity, confirmation logging, and audit trail generation. Activate for automated deletion, erasure automation, data purge, retention expiry queries.

Installs
44
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 auto-deletion-workflow
  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 auto-deletion-workflow 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.

Automated Data Deletion Workflow

Overview

Automated deletion workflows ensure that personal data is removed from all systems when retention periods expire or when a valid erasure request is received under GDPR Article 17. Manual deletion at scale is error-prone and fails to meet the storage limitation principle consistently. This skill defines the architecture, logic, and operational procedures for building automated deletion pipelines that handle cascading dependencies, maintain referential integrity, produce audit-grade confirmation logs, and satisfy both scheduled retention expiry and on-demand erasure requests.

Legal Foundation

GDPR Article 17(1) — Right to Erasure

The data subject shall have the right to obtain from the controller the erasure of personal data concerning him or her without undue delay, and the controller shall have the obligation to erase personal data without undue delay where one of the specified grounds applies.

GDPR Article 5(1)(e) — Storage Limitation

Personal data shall be kept for no longer than is necessary for the purposes for which the personal data are processed. Automated deletion is the primary technical measure for enforcing this principle at scale.

GDPR Article 25(1) — Data Protection by Design

The controller shall implement appropriate technical and organisational measures designed to implement data-protection principles, such as data minimisation, in an effective manner. Automated deletion is a core by-design control.

GDPR Article 30(1)(f) — Envisaged Time Limits for Erasure

Records of processing activities must include, where possible, the envisaged time limits for erasure of the different categories of data. Automated deletion systems operationalize these envisaged time limits.

Automated Deletion Architecture

Deletion Trigger Types

Trigger TypeSourceSLAPriority
Retention expiryRetention schedule metadata reaching calculated deletion dateWithin 30 days of expiryStandard
Data subject erasure requestVerified Art. 17 request via DSAR workflowWithin 30 calendar days of verified requestHigh
Consent withdrawalConsent management platform eventWithin 30 days (best practice: 72 hours)High
Account closureCustomer account termination eventPer retention schedule (post-closure retention period)Standard
Purpose completionProcessing purpose fulfilled, no further legal basisWithin 30 days of purpose completionStandard
Legal hold releaseLitigation hold lifted by Legal counselWithin 14 days of hold releaseStandard

System Architecture

┌─────────────────────────────────────────────────────────────┐
│                   DELETION ORCHESTRATOR                      │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────┐  │
│  │  Trigger      │  │  Dependency  │  │  Execution       │  │
│  │  Engine       │  │  Resolver    │  │  Engine          │  │
│  │              │  │              │  │                  │  │
│  │ - Scheduled   │  │ - FK mapping │  │ - System agents  │  │
│  │ - Event-driven│  │ - Cascade    │  │ - API calls      │  │
│  │ - On-demand   │  │   rules      │  │ - Direct DB ops  │  │
│  │ - Hold check  │  │ - Orphan     │  │ - File system    │  │
│  │              │  │   handling   │  │   purge          │  │
│  └──────┬───────┘  └──────┬───────┘  └────────┬─────────┘  │
│         │                 │                    │             │
│         └────────┬────────┘                    │             │
│                  ▼                             │             │
│  ┌──────────────────────────┐                 │             │
│  │  Deletion Job Queue      │─────────────────┘             │
│  │  (Priority-ordered)      │                               │
│  └──────────────────────────┘                               │
│                  │                                           │
│                  ▼                                           │
│  ┌──────────────────────────┐  ┌──────────────────────────┐ │
│  │  Confirmation Logger     │  │  Audit Trail Generator   │ │
│  │  - Per-system status     │  │  - Immutable audit log   │ │
│  │  - Completion timestamp  │  │  - Deletion certificate  │ │
│  │  - Verification hash     │  │  - Regulatory report     │ │
│  └──────────────────────────┘  └──────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Deletion Workflow Procedures

Workflow 1: Scheduled Retention Expiry Deletion

[Daily Retention Scan — 02:00 UTC]
         │
         ▼
[Query all records where calculated_deletion_date <= TODAY + 30 days]
         │
         ▼
[For each record approaching expiry]
   │
   ├── [Check: Active litigation hold?]
   │     ├── Yes ──► [Skip — log hold reference, notify Legal]
   │     └── No ──► Continue
   │
   ├── [Check: Active regulatory investigation?]
   │     ├── Yes ──► [Skip — log investigation reference]
   │     └── No ──► Continue
   │
   ├── [Check: Pending data subject request referencing this data?]
   │     ├── Yes ──► [Coordinate with DSAR workflow]
   │     └── No ──► Continue
   │
   ├── [Check: Retention exception approved?]
   │     ├── Yes ──► [Skip — log exception reference and expiry]
   │     └── No ──► Continue
   │
   ▼
[Add to deletion job queue with priority: STANDARD]
         │
         ▼
[On calculated_deletion_date: Execute deletion]

Workflow 2: On-Demand Erasure Request Deletion

[Verified Art. 17 Erasure Request Received]
         │
         ▼
[Data Discovery — Identify all instances of data subject's data]
   │
   ├── Primary databases (CRM, ERP, HR system)
   ├── Data warehouse and analytics platforms
   ├── File storage (SharePoint, network drives, cloud storage)
   ├── Email and communication systems
   ├── Backup and archive systems
   ├── Third-party processor systems
   └── Logs and audit trails
         │
         ▼
[Generate Deletion Manifest]
   Reference: DEL-YYYY-NNNN
   Data Subject: [Pseudonymised reference]
   Systems identified: [List with record counts]
   Exceptions identified: [Any Art. 17(3) exceptions]
   Estimated completion: [Date]
         │
         ▼
[DPO Review and Approval]
   ├── Approved ──► [Add to deletion job queue with priority: HIGH]
   └── Exceptions found ──► [Partial deletion — exclude excepted data]
         │
         ▼
[Execute deletion across all identified systems]

Workflow 3: Cascading Deletion Logic

When deleting a primary record, dependent records across related systems must also be deleted. The cascading deletion resolver handles referential integrity:

[Primary Record Identified for Deletion]
         │
         ▼
[Load Dependency Map for Record Type]
         │
         ▼
[Resolve Dependencies — Depth-First Traversal]
   │
   ├── [Level 0: Primary record]
   │     Example: Customer record in CRM
   │
   ├── [Level 1: Direct dependents]
   │     Example: Orders, support tickets, consent records
   │
   ├── [Level 2: Secondary dependents]
   │     Example: Order line items, payment records, shipping records
   │
   └── [Level 3+: Tertiary dependents]
         Example: Invoice line items, refund records
         │
         ▼
[For each dependent record]
   │
   ├── [Shared dependency?]
   │     (Record also linked to other primary records not being deleted)
   │     ├── Yes ──► [Nullify foreign key — do NOT delete]
   │     └── No ──► [Add to deletion manifest]
   │
   ├── [Legal retention override?]
   │     (Dependent record has its own statutory retention requirement)
   │     ├── Yes ──► [Anonymize link to primary record, retain dependent]
   │     └── No ──► [Add to deletion manifest]
   │
   └── [Aggregated/statistical record?]
         (Record contributes to aggregated reporting)
         ├── Yes ──► [Anonymize — remove personal identifiers, retain aggregate]
         └── No ──► [Add to deletion manifest]
         │
         ▼
[Execute deletion in reverse order (deepest dependents first)]
   Level 3+ ──► Level 2 ──► Level 1 ──► Level 0

Dependency Map Template

The following dependency map is configured for Orion Data Vault Corp:

Primary EntityDependent EntityRelationshipDeletion ActionRetention Override
CustomerOrders1:NCascade delete (after statutory retention)6 years — HMRC
CustomerSupport Tickets1:NCascade delete3 years — limitation period
CustomerConsent Records1:NCascade deleteRetain suppression record
CustomerMarketing Preferences1:1Cascade deleteRetain opt-out on suppression list
CustomerAccount Audit Log1:NAnonymize (nullify customer reference)7 years — audit retention
OrderOrder Lines1:NCascade deleteFollows order retention
OrderPayment Records1:NAnonymize6 years — financial records
OrderShipping Records1:NCascade deleteFollows order retention
OrderInvoices1:NAnonymize6 years — tax records
EmployeePayroll Records1:NCascade delete (after statutory retention)6 years — PAYE Regulations
EmployeePerformance Reviews1:NCascade deleteDuration of employment + 6 years
EmployeeAccess Logs1:NAnonymize2 years — security retention

Confirmation Logging

Deletion Confirmation Record Structure

Every deletion execution produces an immutable confirmation record:

DELETION CONFIRMATION RECORD — Orion Data Vault Corp
-----------------------------------------------------
Reference: DEL-2026-0142
Trigger: Retention expiry / Art. 17 request / Consent withdrawal
Data Subject Reference: DS-HASH-a3f8c2e1
Request Date: 2026-02-15 (if applicable)
Execution Date: 2026-03-14
Completed Date: 2026-03-14T14:23:07Z

SYSTEMS PROCESSED:
┌─────────────────────────┬──────────┬───────────────┬──────────────────┐
│ System                  │ Records  │ Action        │ Status           │
├─────────────────────────┼──────────┼───────────────┼──────────────────┤
│ CRM (Salesforce)        │ 1        │ Hard delete   │ Confirmed        │
│ ERP (SAP)               │ 47       │ Hard delete   │ Confirmed        │
│ Data Warehouse (BQ)     │ 312      │ Hard delete   │ Confirmed        │
│ Email (Exchange)        │ 23       │ Hard delete   │ Confirmed        │
│ File Storage (S3)       │ 8        │ Hard delete   │ Confirmed        │
│ Backup (Veeam)          │ N/A      │ Flagged       │ Pending (cycle)  │
│ Analytics (Mixpanel)    │ 156      │ Hard delete   │ Confirmed        │
│ Support (Zendesk)       │ 12       │ Hard delete   │ Confirmed        │
│ Audit Log               │ 89       │ Anonymized    │ Confirmed        │
│ Payment (Stripe)        │ 5        │ Anonymized    │ Confirmed        │
└─────────────────────────┴──────────┴───────────────┴──────────────────┘

THIRD-PARTY NOTIFICATIONS (Art. 19):
- Processor A (Analytics SaaS): Notified 2026-03-14, confirmed 2026-03-16
- Processor B (Email service): Notified 2026-03-14, confirmed 2026-03-15
- Processor C (Payment gateway): Notified 2026-03-14, pending

EXCEPTIONS APPLIED:
- Financial records (invoices): Anonymized, retained until 2032-03-14 (6-year statutory period)
- Audit log entries: Anonymized, retained until 2033-03-14 (7-year audit retention)

BACKUP DELETION:
- Backup system: Next full rotation cycle completes 2026-06-12
- Expected complete erasure from backups: 2026-06-12

VERIFICATION:
- Post-deletion scan completed: 2026-03-14T14:45:00Z
- Residual data found: None
- Verification hash: SHA-256:e3b0c44298fc1c149afbf4c8996fb924...

Executed by: Deletion Orchestrator v3.2 (automated)
Reviewed by: [DPO Name] (for Art. 17 requests only)

Audit Trail Requirements

  1. Immutability: Deletion confirmation records are written to an append-only audit log (write-once storage or blockchain-anchored hash).
  2. Retention of confirmation records: 3 years from deletion date (sufficient to demonstrate compliance if challenged).
  3. No personal data in logs: Confirmation records reference data subjects by pseudonymised identifier only — never by name, email, or other direct identifier.
  4. Searchability: Records must be searchable by deletion reference, data subject hash, trigger type, system, and date range.

Error Handling and Retry Logic

Deletion Failure Handling

Failure TypeActionRetryEscalation
System unavailableQueue for retry3 attempts at 1h, 4h, 24h intervalsAlert IT Operations after 3 failures
Permission deniedLog error, flag for manual reviewNo automatic retryEscalate to system administrator
Referential integrity violationRoute to dependency resolverRe-resolve dependencies, retryEscalate to DPO if unresolvable
Partial deletion (some records failed)Log successful deletions, retry failed3 attemptsEscalate to IT + DPO
Third-party processor non-responseSend reminder at 7 daysFollow up at 14 daysEscalate to DPO + Legal at 21 days
Backup system — cannot delete from active backupFlag for next rotation cycleMonitor backup rotation scheduleAlert if not completed within 90 days

Rollback Considerations

Deletion is inherently irreversible. Therefore:

  1. Pre-deletion snapshot: For Art. 17 requests, take a temporary encrypted snapshot of the data to be deleted. Retain for 72 hours after deletion execution to allow for error correction. Auto-destroy after 72 hours.
  2. Staged execution: For large-scale retention expiry deletions (>10,000 records), execute in batches of 1,000 with verification between batches.
  3. Dry-run mode: All new deletion rules must be tested in dry-run mode for 30 days before activation. Dry-run produces the deletion manifest and confirmation record without executing actual deletion.

Monitoring and Reporting

Key Metrics

MetricTargetMeasurement
Retention expiry deletion completion rate99.5% within 30 days of expiryMonthly
Art. 17 erasure request completion rate100% within 30 calendar daysPer request
Average deletion execution time< 4 hours (end-to-end across all systems)Per execution
Failed deletion rate< 0.5%Monthly
Backup deletion completion rate100% within backup rotation cyclePer rotation
Third-party processor confirmation rate100% within 14 daysPer notification

Quarterly Compliance Report

The automated deletion system generates a quarterly report containing:

  1. Total records deleted by trigger type (retention expiry, Art. 17, consent withdrawal, etc.)
  2. Deletion completion rates against SLA targets
  3. Exceptions applied (with legal basis breakdown)
  4. Failed deletions and resolution status
  5. Third-party processor compliance rates
  6. Backup deletion status and outstanding items
  7. Trend analysis (volume growth, system coverage, performance)

FAQ

What does the auto-deletion-workflow skill do?

Implements automated data deletion workflows for GDPR Article 17 right to erasure and retention period expiry. Covers cascading deletion across dependent systems, dependency handling for referential integrity, confirmation logging, and audit trail generation. Activate for automated deletion, erasure automation, data purge, retention expiry queries.

How do I install auto-deletion-workflow?

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

Which AI agents can use auto-deletion-workflow?

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 auto-deletion-workflow 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 auto-deletion-workflow?

It is published by mukul975 in mukul975/privacy-data-protection-skills. It has 44 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 productivity & automation skills

View category →

agent-browser

vercel-labs/agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

OfficialProductivity & Automation1.3M installs

lark-doc

open.feishu.cn

飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。

lark-base

open.feishu.cn

飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。

lark-drive

open.feishu.cn

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。

lark-shared

open.feishu.cn

Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.

lark-im

open.feishu.cn

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。