Communitygithub.com

coastdigitalgroup/coastai-skills

設計並實作一套系統化的使用者隱私管理框架,包含同意橫幅、偏好中心與持續性隱私控制,在確保法規遵循的同時建立使用者信任。

coastai-skills 是什麼?

這個技能提供了一套完整的方法論,用於設計使用者隱私管理的視覺與結構框架,特別針對 GDPR、CCPA 等法規的合規性。它能協助開發者系統性地規劃 Cookie 橫幅、細緻的偏好中心,以及持久性的隱私控制元件,從而避免「同意疲勞」並提升使用者信任。此技能支援多種平台(如 Claude Code、Cursor),並透過清晰的決策規則(如「拒絕」按鈕必須與「接受」按鈕有相同視覺權重)來防止暗黑模式。實作工作流程涵蓋從同意層級分類、空間模式選擇、資訊層級建立,到瀏覽器級別選擇退出訊號(如 Global Privacy Control)的偵測與尊重,確保隱私體驗既合法又符合無障礙標準(WCAG 2.2)。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coastdigitalgroup/coastai-skills/tree/HEAD/website-design/consent-and-preference-system

在你喜歡的 AI 中提問

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

說明文件

同意與偏好系統

目的

同意與偏好系統提供一套方法論,用於設計使用者隱私管理的視覺與結構框架。它確保隱私通知、Cookie 橫幅與細緻的偏好控制能以符合法規(GDPR、CCPA)、無障礙且高信任度的方式整合到網站體驗中。此系統透過將資訊組織成清晰的層級結構,並提供直覺的資料共享控制項,來避免「同意疲勞」。

使用案例

  • 初始同意橫幅: 設計首次接觸時通知使用者 Cookie 使用的覆蓋層或工具列。
  • 細緻偏好中心: 建立讓使用者可以切換特定資料類別(分析、行銷等)的模態視窗或頁面。
  • 持續性隱私觸發器: 實作在初始選擇後仍可存取的微妙「隱私設定」觸發器。
  • 法規適應: 標準化設計以滿足不同地區的變動需求(例如「全部拒絕」按鈕的要求)。
  • 通訊偏好: 設計用於管理電子報或行銷通知選擇加入的 UI。

何時不應使用

  • 內部資料治理: 此技能處理 UI/UX 層;它不管理後端資料架構或法律政策撰寫。
  • 一般橫幅: 對於簡單的公告(如促銷或維護),請使用 banner-and-alert-system。
  • 系統設定: 對於純功能性的應用程式設定(如主題、語言)且無隱私影響時,請使用 site-navigation-system 或專用的設定檢視。

輸入

  1. 法規要求: 適用的法律有哪些(GDPR、CCPA/CPRA、DMA)?
  2. 資料類別: 所有資料收集工具的列表(必要、功能性、分析、行銷/目標鎖定)。
  3. 品牌語氣: 隱私溝通的預期語氣(例如:透明、極簡、令人安心)。
  4. 佈局情境: 橫幅應放置的位置(底部工具列、浮動方塊、全螢幕模態視窗)。
  5. 瀏覽器訊號: 網站是否必須偵測並尊重 Global Privacy Control (GPC) 或「Do Not Track」訊號作為有效的選擇退出。

輸出

  1. 同意結構規格: 定義橫幅/模態視窗的區域(標題、說明、切換開關、動作按鈕)。
  2. 狀態矩陣: 待處理、已接受、已拒絕和焦點狀態的視覺規格。
  3. 偏好中心藍圖: 細緻類別管理的結構化地圖。
  4. 互動規格: 背景行為、「全部拒絕」的顯著性以及持續性觸發器放置的規則。

工作流程

1. 分類同意層級

根據法律和使用者體驗目標決定所需的干擾層級:

  • 第 1 級(隱含/資訊性): 不阻擋互動的微妙工具列。最適合低風險地區或非追蹤網站。
  • 第 2 級(主動/模態): 需要在導航之前或期間做出選擇的浮動方塊或模態視窗。最適合 GDPR/CCPA 合規。
  • 第 3 級(硬關卡): 完全阻止存取直到做出選擇的全螢幕覆蓋層。僅適用於極端合規或年齡驗證情境。

2. 選擇空間模式

  • 底部工具列: 橫跨底部全寬。低干擾,常見模式。
  • 浮動方塊: 通常位於左下角或右下角。對主要內容的阻礙較少,但高度可見。
  • 偏好模態視窗: 用於細緻選擇的置中覆蓋層。由「管理偏好設定」按鈕觸發。

3. 建立資訊層級

避免「法律條文疲勞」:

  • 標題: 清晰且誠實(例如「您的隱私選擇」)。
  • 主要說明: 1-2 句精簡的句子,解釋為什麼收集資料以及使用者的權利。
  • 類別標籤: 高層級的分類(例如「個人化」、「廣告」),附帶可展開的「了解更多」詳細資訊。

4. 設計動作優先順序

在必要時遵循「相同權重」規則:

  • 主要動作: 「全部接受」和「全部拒絕」(或「確認選擇」)理論上應具有相似的視覺重量,以避免「暗黑模式」。
  • 次要動作: 「管理偏好設定」或「Cookie 設定」連結到細緻檢視。
  • 逃生口: 若使用隱含同意,確保使用者能輕鬆找到「關閉」或「解除」。

5. 定義持續性觸發器

同意是一種動態狀態;使用者必須能夠改變心意:

  • 「隱私盾牌」圖示: 一個小型的持續性浮動圖示(通常在左下角),可重新開啟偏好中心。
  • 頁尾連結: site-footer-system 中的專用「Cookie 設定」連結。

6. 尊重瀏覽器層級的選擇退出訊號

對於承認自動化選擇退出機制(例如 CCPA/CPRA 承認 Global Privacy Control)的司法管轄區:

  • 偵測並套用: 如果存在 GPC 訊號,將其視為有效的「拒絕」或「選擇不出售/分享」訊號,並在偏好中心反映該狀態,無需使用者手動重新切換。
  • 不重新提示: 不要僅為了要求使用者覆蓋已發送的 GPC 訊號而重新顯示初始橫幅。
  • 透明性: 在偏好中心顯示偵測到的訊號(例如「我們偵測到 Global Privacy Control 訊號,並已套用您的選擇退出」),使狀態不會被靜默套用。

決策規則

  • 「相同權重」規則: 如果您的所在地區需要「全部拒絕」(例如歐盟),該按鈕必須與「全部接受」一樣容易找到和點擊。避免讓「拒絕」按鈕變成一個小文字連結,而「接受」是一個大的藍色按鈕。
  • 「不預先勾選」規則: 為符合 GDPR,所有非必要(分析、行銷)的切換開關必須預設為關閉。
  • 「清晰語言」規則: 避免技術術語。使用「改善我們的網站」而不是「處理基於像素的遙測」。
  • 分層揭露: 保持初始橫幅簡單。將 20 段的政策列表移到偏好中心或專用的隱私政策頁面。
  • 「尊重訊號」規則: 偵測到的 GPC 選擇退出優先於過時的本地「全部接受」Cookie;不要讓快取的同意記錄覆蓋新的瀏覽器層級選擇退出訊號。

限制條件

  • 無障礙性: 橫幅必須可透過鍵盤到達。偏好模態視窗必須鎖定焦點,且焦點指示器在鎖定期間必須保持可見且不被遮蔽(WCAG 2.2 SC 2.4.11)。所有切換開關必須有清晰的 ARIA 標籤,並滿足 24x24px 的最小目標大小(SC 2.5.8)。
  • 對比度: 按鈕文字和切換開關必須符合 WCAG AA(4.5:1)對比度。
  • 響應式設計: 橫幅絕不能覆蓋主要行動導覽(如底部導覽列)。如果浮動方塊太擁擠,請切換為全螢幕抽屜。

常見失敗模式

  • 「暗黑模式」陷阱: 讓使用者無法找到「拒絕」按鈕以強迫使用者同意。
  • 干擾導覽: 將底部橫幅放在會覆蓋網站行動選單或主要號召性用語的位置。
  • Z-Index 戰爭: 橫幅出現在其他覆蓋層或選單之下,使其無法點擊。
  • 「50 項核對清單」: 強迫使用者切換 50 個單獨的供應商,而不是使用高層級的類別。
  • 逃生口故障: 橫幅關閉後不允許使用者更改偏好設定。

驗證標準

  • 「全部接受」和「全部拒絕」在目標地區具有適當的視覺顯著性。
  • 非必要類別預設為關閉(為嚴格合規)。
  • 持續性觸發器(圖示或頁尾連結)允許使用者重新開啟設定。
  • 資訊分層(簡單橫幅 -> 詳細偏好中心)。
  • 切換開關和按鈕符合 WCAG 2.2 SC 2.5.8(24x24px 最小觸控目標)。
  • 無障礙性:處理偏好模態視窗的焦點管理,並且焦點指示器永不遮蔽(WCAG 2.2 SC 2.4.11)。
  • 所有文字和互動狀態的對比度比例符合 WCAG AA。
  • Global Privacy Control(或同等)訊號被偵測並尊重,無需重新提示使用者。

Individual skills in this repo

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

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for progressive disclosure using accordions, ensuring structural integrity, visual affordances, and accessibility across different content densities and devices.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for long-form content, managing readability, vertical rhythm, and information density to ensure a superior reading experience.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for informational elements that communicate state (Badges) and categorization (Tags) with clarity and accessibility.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for non-overlay notifications, managing global announcements and contextual inline alerts to communicate system states without interrupting the user's flow.

coastdigitalgroup/coastai-skills

Design and implement a systematic, asymmetrical bento-grid layout framework to organize diverse content types cohesively while maintaining strict visual hierarchy, logical focus order, and responsive flexibility.

coastdigitalgroup/coastai-skills

Design a responsive, mobile-first bottom navigation bar and persistent action dock system for mobile websites and web applications, establishing spatial anchors, tab bar anatomy, badge indicators, thumb-zone ergonomics, safe area inset handling, active/inactive state contrast, and desktop responsive adaptation rules.

coastdigitalgroup/coastai-skills

Design a mobile-first bottom sheet overlay system with configurable detents, drag affordances, safe area padding, responsive desktop modal/popover adaptation, and WCAG AA accessibility compliance.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for secondary navigation trails that provide orientation, context, and one-click access to parent levels in deep information architectures.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for buttons and interactive triggers, managing visual hierarchy, variant logic, and action grouping to ensure clear intent and accessible interaction.

coastdigitalgroup/coastai-skills

Design a systematic framework for date and time selection, managing calendar grids, range pickers, and scheduling interfaces to ensure precision and accessibility.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for modular content containers that maintain hierarchy, structural integrity, and action alignment across variable content and responsive viewports.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for horizontal discovery components, managing navigation affordances, scroll behavior, and accessibility to ensure effective content density without compromising usability.

coastdigitalgroup/coastai-skills

Design a systematic, highly accessible, and developer-friendly UI layout framework for code blocks, snippet showcases, multi-file code tabs, line-highlighting, diff views, and syntax token contrast in technical documentation and developer platforms.

coastdigitalgroup/coastai-skills

Design a systematic framework for global command menus (Cmd+K panels) that combines keyboard-driven navigation, command execution, and shortcut discovery into an accessible, responsive overlay.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for threaded conversations, managing nesting depths, action hierarchies, and community signaling to foster engagement and readability.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for side-by-side comparison interfaces, managing high attribute density and responsive complexity to support informed decision-making.

coastdigitalgroup/coastai-skills

Design and implement a systematic, highly accessible, and responsive visual layout framework for conversational chat widgets, live chat boxes, and chatbot panels that ensures clear message scannability, native focus flow, and seamless mobile keyboard adaptation.

coastdigitalgroup/coastai-skills

Design a systematic, accessible, and high-conversion framework for custom select dropdowns and comboboxes, defining anatomy, states, search-filtering, and responsive mobile-adaptive patterns.

coastdigitalgroup/coastai-skills

Design and specify a systematic dark theme framework, establishing rules for elevation-based surface colors, desaturated brand accents, text legibility, and media adaptation to ensure an accessible, low-fatigue experience.

coastdigitalgroup/coastai-skills

Design and implement a systematic color palette that ensures WCAG 2.2 accessibility compliance. Trigger this skill when asked to define brand colors, create UI themes, or establish a visual system for a website.

相關技能