Communitygithub.com

YepAPI/skills

GDPR 合規 — 資料刪除、同意追蹤、PII 匿名化與資料可攜性。

skills 是什麼?

這個技能提供一套完整的 GDPR 合規實作方案,協助開發者在其應用程式中導入資料主體權利(Right to Erasure)與資料可攜性(Right to Portability)。技能透過 API 端點與程式碼範例,演示如何安全地刪除或匿名化個人識別資訊(PII)、記錄使用者同意的時間戳與政策版本、以及建立 PII 存取稽核日誌。支援平台包括 Node.js 與 Drizzle ORM 為主的後端架構,並可擴充至 Express 或其它框架。此技能也涵蓋 Cookie 同意橫幅、隱私權政策連結及 72 小時違規通知流程等實務要求,是任何服務歐盟使用者的應用程式不可或缺的合規工具。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/gdpr-compliance

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

GDPR 合規

規則

  • 實作資料刪除端點(刪除權):應要求刪除或匿名化所有使用者 PII
  • 使用時間戳追蹤明確同意:記錄使用者同意的內容、時間及政策版本
  • 在分析與日誌中匿名化 PII:使用不透明 ID,絕不儲存原始電子郵件或姓名
  • 實作資料匯出端點(可攜性權):以 JSON 或 CSV 格式回傳所有使用者資料
  • 顯示 Cookie 同意橫幅:在使用者選擇加入前,不載入任何追蹤腳本
  • 在每個含有資料收集表單的頁面上,連結至隱私權政策
  • 維護 PII 存取稽核日誌:記錄誰在何時檢視了哪些個人資料
  • 72 小時違規通知:準備好文件化的流程與聯絡人清單
// 資料刪除端點
app.delete("/api/user/data", requireAuth, async (req, res) => {
  const userId = req.user.id;
  await db.transaction(async (tx) => {
    await tx.delete(userProfiles).where(eq(userProfiles.userId, userId));
    await tx.delete(userSessions).where(eq(userSessions.userId, userId));
    await tx.update(users).set({
      email: `deleted_${userId}@anonymized.local`,
      name: "Deleted User",
      deletedAt: new Date(),
    }).where(eq(users.id, userId));
  });
  await auditLog("user_data_deleted", { userId, requestedBy: userId });
  res.json({ success: true });
});
// 同意追蹤
const consentSchema = z.object({
  marketing: z.boolean(),
  analytics: z.boolean(),
  policyVersion: z.string(),
});

app.post("/api/consent", requireAuth, async (req, res) => {
  const consent = consentSchema.parse(req.body);
  await db.insert(consentRecords).values({
    userId: req.user.id,
    ...consent,
    consentedAt: new Date(),
    ipAddress: req.ip,
  });
  res.json({ success: true });
});

避免事項

  • 軟刪除使用者資料但未實際移除 PII — 「已刪除」使用者的電子郵件仍留在資料庫中
  • 在取得 Cookie 同意前載入 Google Analytics 或追蹤像素
  • 在分析事件或應用程式日誌中儲存原始電子郵件
  • 缺少資料匯出機制 — 使用者對其資料擁有合法權利
  • 假設 GDPR 僅適用於歐盟公司 — 實際上,任何服務歐盟使用者的應用程式都需遵守

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

相關技能