bind-consent-to-a-stated-purpose
Use when building or auditing a consent flow and the wording, scope, or audit trail is unclear. Record purpose, notice version, and proof of action, then gate processing on a current grant.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- bind-consent-to-a-stated-purpose
- description
- Use when building or auditing a consent flow and the wording, scope, or audit trail is unclear. Record purpose, notice version, and proof of action, then gate processing on a current grant.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md358 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Bind consent to a stated purpose
Consent that does not name a purpose cannot be relied on. This skill records what was agreed, when, and for exactly which use, and enforces it at call time.
Procedure
-
Write each purpose as a discrete record id:
purpose_id = "marketing_email_2024". Vague wording such as "improve services" fails. -
Store the consent event append-only, never mutate:
(subject_id, purpose_id, granted_at, text_version, source, method, revoked_at). -
Pin the exact wording by hash so you can prove what the user saw: store
text_sha256of the notice that was displayed. -
Capture the unbundled choice: separate rows for analytics, marketing, and personalisation. A single checkbox is not valid consent for three purposes.
-
Capture proof of the action: IP, user agent, and the click itself, not the page load. A scripted consent event is not consent.
-
Gate processing on a fresh lookup every time:
select 1 from consent where subject_id=$1 and purpose_id=$2 and revoked_at is null and granted_at > now() - interval '24 months' -
Make revocation as easy as grant and propagate it through every downstream system within a defined SLA (for example 24h to the email provider).
-
Log the check result (granted or denied) per message so a complaint is answerable from logs alone.
-
Re-consent on any material wording change; a new purpose is a new consent, never an edit to the old row.
Pitfalls
- Pre-ticked boxes and implied consent fail in GDPR-style regimes; record an affirmative act.
- Bundling consent into terms acceptance invalidates it for optional processing.
- Deleting the row on revocation erases proof that consent ever existed; revoke with a timestamp instead.
- A suppression list keyed only on email fails when the address changes; also key on the person identifier.
- Consent drift: an old purpose string lingers in code while the notice changed underneath it; match on
purpose_idand version.
Verification
psql "$CONSENT_DB" -c "select purpose_id, count(*) filter (where revoked_at is null) active, count(*) total from consent group by 1 order by 1"
Report the active count per purpose, the newest notice version in use, and any system still sending on a revoked grant.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.