Cookie Consent
Design a cookie consent implementation for "$ARGUMENTS". Conduct a cookie audit, categorize cookies, design consent mechanisms by jurisdiction, and create an implementation checklist.
Note: AI-generated legal content does not constitute legal advice. Consult a qualified attorney.
Arguments. $ARGUMENTS may contain the project name and optional flags. Take the first token as <project> and treat --skip-checks as a flag; never include flags in file paths. All paths below use <project>. If --skip-checks is present, skip the prerequisite check and, before writing any artifact, append one line to .singularskills/log.jsonl: {"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"skipped","artifact":"03-comply.md","note":"<reason or \"none given\">"}.
Prerequisites
Part of a workflow. This skill is phase 3 (Comply) of the Legal Lifecycle workflow (legal); cross-domain workflows run it too. First check .singularskills/log.jsonl for an open run for this project: a run-started line with "project":"<project>" and no later run-finished line for the same workflow and project. If one exists, the conductor is running you: continue here. Otherwise, if the user asked to start, run, continue or resume a process or workflow rather than this one step, do not continue here: invoke the workflow skill with the workflow the user asked for, or legal when they named none, followed by <project>; it runs this phase in order, asks before it writes and records the run. Otherwise continue here: a later phase runs on its own, behind its gate.
Run this skill's gate before writing: sh <this skill's folder>/scripts/gate.sh <project> <project root>, where <project root> is the folder that contains .singularskills/ (use . when you are already there). If it exits non-zero, stop and tell the user what it printed, unless --skip-checks was given (see Arguments). On a refusal, before you stop, append this line to .singularskills/log.jsonl (create the folder and file if missing): {"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"refused","artifact":"03-comply.md","note":"<what the gate printed>"}. Once the gate has passed, or under --skip-checks once you have appended the skipped line, append this line before you start work: {"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"started","artifact":"03-comply.md","note":""}.
Check that .singularskills/legal/<project>/00-assess.md exists. If it does not exist, stop and tell the user:
"Run an Assess skill first (e.g. /legal-risk-assessment <project>) to generate the prerequisite assessment artifact."
Process
Read inputs:
- Read
.singularskills/legal/<project>/00-assess.md for risk, jurisdiction, and data practice context
- Read any existing cookie policy or draft artifacts in
.singularskills/legal/<project>/ for additional context
Conduct cookie audit:
- Scan site for all cookies and similar tracking technologies (local storage, session storage, pixels, fingerprinting)
- Document each cookie/tracker: name, provider, purpose, type (first-party vs. third-party), duration (session vs. persistent with expiry)
- Identify all third-party services that set cookies (analytics, advertising, social media, CDN, etc.)
Categorize cookies:
- Strictly necessary — essential for site functionality, no consent required (session management, authentication, security, load balancing, cookie consent preferences)
- Functional/Preferences — enable enhanced functionality and personalization (language preference, region selection, user interface customization)
- Analytics/Performance — collect information about site usage (page views, bounce rates, traffic sources, performance monitoring)
- Advertising/Marketing — track visitors across websites for advertising purposes (ad targeting, retargeting, campaign measurement, social media sharing)
Design consent mechanism by jurisdiction:
- EU (ePrivacy Directive + GDPR): opt-in required for non-essential cookies, granular category control, no cookie walls (or limited use per EDPB guidance), prior consent before cookies are set
- UK (UK GDPR + PECR): similar to EU post-Brexit, opt-in for non-essential, ICO enforcement guidance
- US (varies by state): California — opt-out for sale/sharing via cookies; Colorado, Connecticut, Virginia — opt-out mechanisms; no federal cookie law
- Other jurisdictions — document requirements for any additional applicable jurisdictions
Consent banner design:
- First layer: clear and prominent banner with Accept All, Reject All, and Customize/Manage Preferences buttons; brief explanation of cookie use
- Second layer (preference center): category toggles with descriptions, list of cookies per category, ability to accept/reject per category, save preferences button
- Design requirements: no dark patterns, equal prominence for accept and reject, no pre-ticked boxes, accessible design (WCAG AA), mobile-responsive
Consent storage:
- How consent choices are recorded (consent cookie, server-side storage)
- What information to store (timestamp, version of consent text, categories accepted/rejected, method of consent)
- How to prove consent was obtained (audit trail)
- Consent ID for record-keeping
Re-consent triggers:
- New cookies or tracking technologies added
- Change in cookie purposes or categories
- Privacy policy or cookie policy updates
- Time-based re-consent (recommended: 6-12 months)
- Change in applicable regulations
Implementation checklist:
- CMP (Consent Management Platform) selection criteria and recommendations
- Tag manager configuration (Google Tag Manager, etc.) for consent-based firing
- Consent-before-load enforcement (no non-essential cookies until consent obtained)
- Server-side consent checking for backend tracking
- Testing procedures (verify no cookies set before consent, verify categories respected)
- Integration with analytics and advertising platforms
- Documentation and training for content and marketing teams
Write the artifact — append to .singularskills/legal/<project>/03-comply.md under a ## Cookie Consent section. Create the file with a # Comply — <project> heading if it does not exist; if a ## Cookie Consent section already exists, replace only that section. The section contains:
- Cookie Audit Results — complete inventory of cookies and trackers
- Cookie Categories — categorization with justification
- Jurisdictional Requirements — consent rules per applicable jurisdiction
- Banner Design Specification — first and second layer requirements
- Consent Storage and Proof — recording and audit trail design
- Re-Consent Policy — triggers and timelines
- Implementation Checklist — step-by-step technical implementation plan
- Compliance Gaps — identified gaps with remediation recommendations
Output
The cookie consent implementation appended to .singularskills/legal/<project>/03-comply.md. Present a summary to the user highlighting:
- Total number of cookies/trackers identified
- Breakdown by category (necessary, functional, analytics, advertising)
- Jurisdictions addressed and consent model per jurisdiction
- Key implementation steps and CMP recommendations
- Compliance gaps requiring attention
Record the run. After you have written your section, append this line to .singularskills/log.jsonl (the started line of Prerequisites, with "event":"finished"): {"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"finished","artifact":"03-comply.md","note":""}.
This artifact is shared by every skill of phase 3 (Comply). The frontmatter is written once, by whoever creates the file: if you create it, open it with the block below (skill is the phase title, started the time of that first write; gate is passed when the gate ran clean and skipped under --skip-checks); if it already exists, leave the block alone except to update finished and to set gate to the worst value among the sections (skipped over passed).
---
skill: Comply
workflow: legal
phase: 3
project: <project>
started: <ISO timestamp>
finished: <ISO timestamp>
agent: <the agent you run in, or "unknown">
gate: <passed|skipped>
---
Open your ## Cookie Consent section with one italic line, *<skill name> · <ISO timestamp> · gate: <passed|skipped>* (your skill name is legal-cookie-consent).
End your section with ### Decisions and ### Open questions (one level under your ## Cookie Consent heading, so the section stays one block), in this shape:
### Decisions
- <what was chosen> — <why> — <what was rejected>
### Open questions
- <what the next phase or a reviewer must settle>
1---2name: legal-cookie-consent3description: Design a cookie consent implementation — cookie audit and categories, opt-in or opt-out rules per jurisdiction, banner and preference-center spec, consent records, re-consent triggers and CMP setup. Use when the user is building or fixing a cookie banner or consent manager and needs to know how it must behave. Not for writing the cookie policy text; see /legal-cookie-policy.4metadata:5 source: https://skillmd.com/skills/bromso/legal-cookie-consent6 argument-hint: "[project] [--skip-checks]"7 workflow: legal8 phase: 39 artifact: 03-comply.md10---1112# Cookie Consent1314Design a cookie consent implementation for "$ARGUMENTS". Conduct a cookie audit, categorize cookies, design consent mechanisms by jurisdiction, and create an implementation checklist.1516> **Note:** AI-generated legal content does not constitute legal advice. Consult a qualified attorney.1718**Arguments.** `$ARGUMENTS` may contain the project name and optional flags. Take the first token as `<project>` and treat `--skip-checks` as a flag; never include flags in file paths. All paths below use `<project>`. If `--skip-checks` is present, skip the prerequisite check and, **before writing any artifact**, append one line to `.singularskills/log.jsonl`: `{"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"skipped","artifact":"03-comply.md","note":"<reason or \"none given\">"}`.1920## Prerequisites2122**Part of a workflow.** This skill is phase 3 (Comply) of the Legal Lifecycle workflow (`legal`); cross-domain workflows run it too. First check `.singularskills/log.jsonl` for an open run for this project: a `run-started` line with `"project":"<project>"` and no later `run-finished` line for the same `workflow` and `project`. If one exists, the conductor is running you: continue here. Otherwise, if the user asked to start, run, continue or resume a process or workflow rather than this one step, do not continue here: invoke the `workflow` skill with the workflow the user asked for, or `legal` when they named none, followed by `<project>`; it runs this phase in order, asks before it writes and records the run. Otherwise continue here: a later phase runs on its own, behind its gate.2324Run this skill's gate before writing: `sh <this skill's folder>/scripts/gate.sh <project> <project root>`, where `<project root>` is the folder that contains `.singularskills/` (use `.` when you are already there). If it exits non-zero, stop and tell the user what it printed, unless `--skip-checks` was given (see Arguments). On a refusal, before you stop, append this line to `.singularskills/log.jsonl` (create the folder and file if missing): `{"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"refused","artifact":"03-comply.md","note":"<what the gate printed>"}`. Once the gate has passed, or under `--skip-checks` once you have appended the `skipped` line, append this line before you start work: `{"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"started","artifact":"03-comply.md","note":""}`.2526Check that `.singularskills/legal/<project>/00-assess.md` exists. If it does not exist, stop and tell the user:2728> "Run an Assess skill first (e.g. `/legal-risk-assessment <project>`) to generate the prerequisite assessment artifact."2930## Process31321. **Read inputs:**33 - Read `.singularskills/legal/<project>/00-assess.md` for risk, jurisdiction, and data practice context34 - Read any existing cookie policy or draft artifacts in `.singularskills/legal/<project>/` for additional context35362. **Conduct cookie audit:**37 - Scan site for all cookies and similar tracking technologies (local storage, session storage, pixels, fingerprinting)38 - Document each cookie/tracker: name, provider, purpose, type (first-party vs. third-party), duration (session vs. persistent with expiry)39 - Identify all third-party services that set cookies (analytics, advertising, social media, CDN, etc.)40413. **Categorize cookies:**42 - **Strictly necessary** — essential for site functionality, no consent required (session management, authentication, security, load balancing, cookie consent preferences)43 - **Functional/Preferences** — enable enhanced functionality and personalization (language preference, region selection, user interface customization)44 - **Analytics/Performance** — collect information about site usage (page views, bounce rates, traffic sources, performance monitoring)45 - **Advertising/Marketing** — track visitors across websites for advertising purposes (ad targeting, retargeting, campaign measurement, social media sharing)46474. **Design consent mechanism by jurisdiction:**48 - **EU (ePrivacy Directive + GDPR):** opt-in required for non-essential cookies, granular category control, no cookie walls (or limited use per EDPB guidance), prior consent before cookies are set49 - **UK (UK GDPR + PECR):** similar to EU post-Brexit, opt-in for non-essential, ICO enforcement guidance50 - **US (varies by state):** California — opt-out for sale/sharing via cookies; Colorado, Connecticut, Virginia — opt-out mechanisms; no federal cookie law51 - **Other jurisdictions** — document requirements for any additional applicable jurisdictions52535. **Consent banner design:**54 - **First layer:** clear and prominent banner with Accept All, Reject All, and Customize/Manage Preferences buttons; brief explanation of cookie use55 - **Second layer (preference center):** category toggles with descriptions, list of cookies per category, ability to accept/reject per category, save preferences button56 - **Design requirements:** no dark patterns, equal prominence for accept and reject, no pre-ticked boxes, accessible design (WCAG AA), mobile-responsive57586. **Consent storage:**59 - How consent choices are recorded (consent cookie, server-side storage)60 - What information to store (timestamp, version of consent text, categories accepted/rejected, method of consent)61 - How to prove consent was obtained (audit trail)62 - Consent ID for record-keeping63647. **Re-consent triggers:**65 - New cookies or tracking technologies added66 - Change in cookie purposes or categories67 - Privacy policy or cookie policy updates68 - Time-based re-consent (recommended: 6-12 months)69 - Change in applicable regulations70718. **Implementation checklist:**72 - CMP (Consent Management Platform) selection criteria and recommendations73 - Tag manager configuration (Google Tag Manager, etc.) for consent-based firing74 - Consent-before-load enforcement (no non-essential cookies until consent obtained)75 - Server-side consent checking for backend tracking76 - Testing procedures (verify no cookies set before consent, verify categories respected)77 - Integration with analytics and advertising platforms78 - Documentation and training for content and marketing teams79809. **Write the artifact** — append to `.singularskills/legal/<project>/03-comply.md` under a `## Cookie Consent` section. Create the file with a `# Comply — <project>` heading if it does not exist; if a `## Cookie Consent` section already exists, replace only that section. The section contains:8182 - **Cookie Audit Results** — complete inventory of cookies and trackers83 - **Cookie Categories** — categorization with justification84 - **Jurisdictional Requirements** — consent rules per applicable jurisdiction85 - **Banner Design Specification** — first and second layer requirements86 - **Consent Storage and Proof** — recording and audit trail design87 - **Re-Consent Policy** — triggers and timelines88 - **Implementation Checklist** — step-by-step technical implementation plan89 - **Compliance Gaps** — identified gaps with remediation recommendations9091## Output9293The cookie consent implementation appended to `.singularskills/legal/<project>/03-comply.md`. Present a summary to the user highlighting:94- Total number of cookies/trackers identified95- Breakdown by category (necessary, functional, analytics, advertising)96- Jurisdictions addressed and consent model per jurisdiction97- Key implementation steps and CMP recommendations98- Compliance gaps requiring attention99100**Record the run.** After you have written your section, append this line to `.singularskills/log.jsonl` (the `started` line of Prerequisites, with `"event":"finished"`): `{"ts":"<ISO timestamp>","skill":"legal-cookie-consent","workflow":"legal","phase":3,"project":"<project>","event":"finished","artifact":"03-comply.md","note":""}`.101102This artifact is shared by every skill of phase 3 (Comply). The frontmatter is written once, by whoever creates the file: if you create it, open it with the block below (`skill` is the phase title, `started` the time of that first write; `gate` is `passed` when the gate ran clean and `skipped` under `--skip-checks`); if it already exists, leave the block alone except to update `finished` and to set `gate` to the worst value among the sections (`skipped` over `passed`).103104```yaml105---106skill: Comply107workflow: legal108phase: 3109project: <project>110started: <ISO timestamp>111finished: <ISO timestamp>112agent: <the agent you run in, or "unknown">113gate: <passed|skipped>114---115```116117Open your `## Cookie Consent` section with one italic line, `*<skill name> · <ISO timestamp> · gate: <passed|skipped>*` (your skill name is `legal-cookie-consent`).118119End your section with `### Decisions` and `### Open questions` (one level under your `## Cookie Consent` heading, so the section stays one block), in this shape:120121```markdown122### Decisions123- <what was chosen> — <why> — <what was rejected>124125### Open questions126- <what the next phase or a reviewer must settle>127```