Token导航 LogoToken导航

Agent Skill · 研究检索

data-retention-policies(数据保留政策)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

data-retention-policies 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 57,063。

总安装 441周安装 18GitHub Stars 19下载 143核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:data-retention-policies(数据保留政策)
来源仓库:https://github.com/finsilabs/awesome-ecommerce-skills
仓库路径:skills/data-retention-policies
安装命令:
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill data-retention-policies
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill data-retention-policies

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于制定和管理电商平台的数据保留策略,平衡法律合规与隐私保护需求。适用于处理 GDPR 数据最小化要求、税务记录保存期限及不同平台的数据管理差异。通过明确各类数据的保留周期、归档和清理规则,确保合规且高效的数据治理流程。安装需指定 GitHub 仓库路径,使用 npx skills add 命令完成技能添加。

涉及敏感数据处理时,应确认权限边界并遵循数据脱敏规范。

来源仓库内路径:skills/data-retention-policies

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill dat…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

data-retention-policies 怎么安装?

在终端执行 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill data-retentio…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

data-retention-policies 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

data-retention-policies 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

data-retention-policies 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

data-retention-policies 用的人多吗?

公开数据是累计安装 441 次,近一周安装 18 次,下载 143 次,GitHub 19 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

data-retention-policies 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
data-retention-policies

数据保留政策 · 本页

44119需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Data Retention Policies

Overview

Data retention policies define how long each category of data is kept, when it is archived, and when it is purged. E-commerce stores must balance legal obligations (tax records must typically be kept 5–7 years) against privacy regulations (GDPR's data minimization principle requires deleting data that is no longer needed). The right approach depends on your platform — Shopify handles some retention automatically, while WooCommerce/custom stores require explicit implementation.

When to Use This Skill

  • When implementing GDPR data minimization requirements for a new or existing e-commerce platform
  • When legal or compliance teams request a documented data retention policy
  • When preparing for a data protection audit or SOC 2 Type II assessment
  • When storage costs are growing due to uncontrolled data accumulation
  • When a customer submits a Subject Access Request and you need to know exactly where their data lives

Core Instructions

Step 1: Document your retention schedule first

Before configuring any tool, document a retention schedule. Legal, compliance, and engineering must agree before implementation. This Register of Processing Activities (RoPA) is required under GDPR Article 30 for large processors and recommended for all:

Data CategoryRetention PeriodAction After PeriodLegal Basis
Orders (financial records)7 yearsAnonymize PII; keep financial dataTax law (US IRS, EU VAT)
Invoices7 yearsArchive to cold storageTax compliance
Customer accounts3 years after last activityDeleteLegitimate interest
Sessions / login logs90 daysDeleteLegitimate interest
Marketing email consentUntil unsubscribeDelete on unsubscribeGDPR consent
Abandoned cart data30 daysDeleteLegitimate interest
Fraud/security logs90 daysAnonymizeLegitimate interest
Analytics events13 monthsAggregate then deleteLegitimate interest

Key principle: Never delete what the law requires you to keep. For orders, anonymize the customer's PII (name, email, address) while preserving the financial record (amounts, tax, payment method brand/last 4).

Step 2: Platform-specific retention configuration


Shopify

Shopify stores order data indefinitely by default and handles platform-level data retention for infrastructure components.

Customer data export and deletion (GDPR compliance): Shopify provides built-in GDPR webhooks:

  1. Go to Settings → Customers → Customer privacy
  2. Shopify automatically sends customers/data_request and customers/redact webhooks to any installed apps when a customer requests their data or deletion
  3. For your own app or custom code, register webhook handlers for these events

Manual customer anonymization:

  1. Open a customer record → More actions → Anonymize this customer
  2. Shopify replaces PII with anonymized placeholders while keeping order records
  3. This is irreversible — confirm before proceeding

Automated email list cleanup: Use Klaviyo (or your email provider) to automatically suppress or delete contacts who haven't opened an email in 12+ months. Most email providers have "sunset" automation features built in.

Data export for archiving:

  1. Go to Customers → Export to download customer data as CSV for archival
  2. For orders: Orders → Export
  3. Store exports in encrypted cold storage (e.g., AWS S3 with Glacier lifecycle policy)

WooCommerce

WooCommerce does not enforce data retention automatically. You need to configure it via plugins and scheduled tasks.

WooCommerce's built-in cleanup:

  1. Go to WooCommerce → Status → Tools
  2. Use Clean up WooCommerce sessions to delete expired session data
  3. Use WooCommerce tracker cleanup to clear tracking data

GDPR / data retention plugin: Install WP GDPR Compliance or GDPR Cookie Consent (by WebToffee):

  1. Go to WP GDPR Compliance → Settings → Data Retention
  2. Configure retention periods per data type
  3. The plugin creates scheduled cleanups via WP-Cron

Manual scheduled cleanup (WP-Cron):

// Add to your theme's functions.php or a custom plugin
// Schedule a daily cleanup job
if (!wp_next_scheduled('wc_data_retention_cleanup')) {
    wp_schedule_event(time(), 'daily', 'wc_data_retention_cleanup');
}

add_action('wc_data_retention_cleanup', 'run_data_retention');

function run_data_retention() {
    // Delete WooCommerce sessions older than 90 days
    global $wpdb;
    $wpdb->query(
        $wpdb->prepare(
            "DELETE FROM {$wpdb->prefix}woocommerce_sessions WHERE session_expiry < %d",
            time() - (90 * DAY_IN_SECONDS)
        )
    );
    // Log the cleanup
    error_log('WC data retention: cleaned sessions older than 90 days');
}

Order PII anonymization for tax compliance: Do not delete orders (required for tax records). Instead, anonymize PII while keeping financial data. Install WooCommerce GDPR (WebToffee) which adds an "Anonymize" action to orders.


BigCommerce

BigCommerce provides customer data management tools in the admin panel.

Customer data export:

  1. Go to Customers → Export → All Customers (CSV)
  2. Use for archival before deleting customer accounts

Customer deletion:

  1. Go to Customers → find the customer → Delete
  2. BigCommerce retains associated order records when a customer account is deleted

Automated retention: BigCommerce does not have built-in scheduled data retention. Use the BigCommerce Customers API and Orders API to:

  1. Query customers inactive for more than 3 years
  2. Archive their data
  3. Delete or anonymize their accounts

This requires a custom script or a third-party integration (e.g., via Zapier or a custom app).


Custom / Headless

For custom storefronts, implement automated purge and anonymization jobs that run on a schedule.

Key principle: batch small, run off-peak, always log:

// Run nightly at 2 AM UTC
import { CronJob } from 'cron';

new CronJob('0 2 * * *', runRetentionJobs).start();

async function runRetentionJobs() {
  const jobs = [
    { name: 'purge_sessions', fn: purgeSessions },
    { name: 'purge_abandoned_carts', fn: purgeAbandonedCarts },
    { name: 'anonymize_old_orders', fn: anonymizeOldOrders },
    { name: 'purge_inactive_customers', fn: purgeInactiveCustomers },
  ];

  for (const job of jobs) {
    try {
      const result = await job.fn();
      await db.retentionAuditLog.insert({ job: job.name, ...result, runAt: new Date() });
    } catch (err) {
      await alertOps(`Retention job failed: ${job.name}`, err);
    }
  }
}

// Paginated delete — avoids table locks
async function purgeSessions(): Promise<{ deleted: number }> {
  const cutoff = new Date(Date.now() - 90 * 86400_000);
  let deleted = 0;
  while (true) {
    const batch = await db.sessions.findExpired(cutoff, { limit: 1000 });
    if (batch.length === 0) break;
    await db.sessions.deleteBatch(batch.map(s => s.id));
    deleted += batch.length;
    await new Promise(r => setTimeout(r, 100)); // yield between batches
  }
  return { deleted };
}

// Anonymize order PII but keep financial data (7-year tax requirement)
async function anonymizeOldOrders(): Promise<{ anonymized: number }> {
  const cutoff = new Date(Date.now() - 7 * 365 * 86400_000);
  const orders = await db.orders.findWhere({ created_at: { lt: cutoff }, pii_anonymized_at: null }, { limit: 500 });
  for (const order of orders) {
    await db.orders.update(order.id, {
      customer_email:   `anon_${order.id}@deleted.invalid`,
      customer_name:    'Anonymous Customer',
      shipping_name:    'Anonymous',
      shipping_street:  null,
      shipping_city:    order.shipping_city,    // Keep for tax jurisdiction
      shipping_country: order.shipping_country,
      billing_name:     'Anonymous',
      billing_street:   null,
      // Financial data (total_amount, tax_amount, payment_method_last4): UNCHANGED
      pii_anonymized_at: new Date(),
    });
  }
  return { anonymized: orders.length };
}

Cross-service customer deletion: When deleting a customer, purge data from every system that holds it:

async function purgeCustomer(customerId: string, reason: 'gdpr_request' | 'inactivity') {
  // 1. Anonymize orders (keep for tax, remove PII)
  await anonymizeOrdersForCustomer(customerId);
  // 2. Delete from email platform (Klaviyo, Mailchimp)
  await emailPlatform.deleteContact(customerId);
  // 3. Delete from search index (Algolia, Elasticsearch)
  await searchIndex.deleteCustomer(customerId);
  // 4. Delete analytics identifier
  await analytics.deleteUser(customerId);
  // 5. Delete the customer profile
  await db.customers.anonymize(customerId);
  // 6. Log for compliance evidence
  await db.retentionAuditLog.insert({ action: 'customer_purged', customerId, reason, executedAt: new Date() });
}

Best Practices

  • Document before implementing — legal, compliance, and engineering must agree on the retention schedule; unilateral engineering decisions create compliance gaps
  • Anonymize financial records, never delete them — orders must be retained for the tax statutory period; replace PII fields with anonymized placeholders
  • Keep a separate, append-only retention audit log — this is your evidence for compliance auditors; never delete from this log
  • Run purge jobs in small batches off-peak — use SELECT... LIMIT n batches to avoid table locks that impact live traffic
  • Handle cross-service deletion as a checklist — purges spanning multiple services (database, email platform, analytics) must be resilient; log completion for each system separately
  • Respond to GDPR deletion requests within 30 days — build automated workflows with reminders and escalations; track all requests with deadlines

Common Pitfalls

ProblemSolution
Retention job locks production tablesUse small batch sizes (500–5000 rows), add LIMIT to every DELETE/UPDATE, run during low-traffic hours
Purging customers with open disputes or pending ordersCheck for pending chargebacks, open orders, and active subscriptions before any purge; implement a legal hold mechanism
Forgetting search indexes and analytics warehousesMaintain a registry of all systems that store personal data; include each in every deletion workflow
GDPR deletion request not completed within 30 daysBuild an automated workflow with a 30-day deadline tracker; escalate to a human if not completed 5 days before the deadline
Backup systems containing data past retention periodFlag purged customer IDs so that if a backup is restored for disaster recovery, those records are immediately re-purged

Related Skills

  • @gdpr-ecommerce
  • @account-security
  • @financial-audit-trail
  • @financial-compliance-sox

平台分布

Codex

34.79%
按下载量换算50

Claude

29.28%
按下载量换算42

Cursor

17%
按下载量换算24

Gemini CLI

9.73%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills