Cookie Lifetime Audit logo

Cookie Lifetime Audit

Community
mukul975
cookie-lifetime-audit

Auditing cookie lifetimes against regulatory recommendations and browser policies. Covers CNIL 13-month maximum recommendation, session vs persistent classification, third-party cookie phase-out impact, and Safari ITP duration caps.

Overview

Publishermukul975
RepositoryPrivacy-Data-Protection-Skills
Skill namecookie-lifetime-audit
Stars
279
Forks
59
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mukul975 on GitHub. Read the source before you install it.

Installation

Install the Cookie Lifetime Audit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mukul975/Privacy-Data-Protection-Skills.git /tmp/Privacy-Data-Protection-Skills
mkdir -p .claude/skills
cp -r /tmp/Privacy-Data-Protection-Skills/plugins/cookie-consent-skills/skills/cookie-lifetime-audit .claude/skills/cookie-lifetime-audit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cookie Lifetime Audit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cookie Lifetime Audit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cookie Lifetime Audit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Auditing Cookie Lifetimes

Overview

Cookie lifetime is a critical compliance factor often overlooked in consent implementations. The CNIL recommends a maximum cookie lifetime of 13 months from the point of collection, after which consent must be renewed. The CJEU in Planet49 (Case C-673/17) established that cookie duration must be disclosed to users before consent is obtained. Additionally, browser-enforced restrictions — Safari's Intelligent Tracking Prevention (ITP), Firefox's Enhanced Tracking Protection (ETP), and Chrome's third-party cookie deprecation — impose technical limits on cookie lifetimes that may conflict with server-set durations. A cookie lifetime audit identifies cookies exceeding regulatory or technical limits and ensures accurate duration disclosure.

Cookie Duration Classification

Session vs. Persistent Cookies

TypeDurationBehaviorConsent Implications
Session cookieNo Expires or Max-Age attributeDeleted when browser closesStill requires consent if non-essential under ePrivacy Art. 5(3)
Persistent cookieHas Expires or Max-AgeSurvives browser restartRequires consent; duration must be disclosed (Planet49)
Server-refreshedReset on each visit via Set-CookieEffectively indefinite if user visits regularlyDuration is from last visit, not first set — must disclose rolling nature

Duration Categories

CategoryDuration RangeExamplesRegulatory Concern
Short-lived< 24 hoursSession IDs, CSRF tokensLow — typically strictly necessary
Medium-lived24 hours - 30 daysA/B test assignments, session replayMedium — review necessity
Long-lived30 days - 13 monthsAnalytics IDs, preference cookiesHigh — must justify duration
Excessive> 13 monthsLegacy tracking cookies, _ga (2 years)Very high — CNIL non-compliant duration

CNIL 13-Month Recommendation

Regulatory Basis

CNIL's Recommendation on Cookies (1 October 2020, following Deliberation 2020-091 of 17 September 2020) states:

"The duration of validity of the consent of the user to the deposit of trackers should not exceed thirteen months. At the end of this period, the consent of the user should be collected again."

This 13-month maximum applies to:

  • The consent cookie itself (the cookie that records the user's consent choice)
  • Non-essential tracking cookies (the cookies enabled by consent)

Impact on Common Cookies

Cookies Exceeding CNIL 13-Month Limit:

CookieDefault DurationSet ByCNIL CompliantRemediation
_ga2 years (730 days)Google AnalyticsNo — exceeds 13 monthsSet cookie_expires to 34128000 (395 days / ~13 months)
_ga_XXXXXXX2 yearsGA4No — exceeds 13 monthsSet cookie_expires to 34128000
IDE13 monthsDoubleClickBorderline compliantMonitor — at the limit
fr90 daysMeta/FacebookYesNo action needed
_gcl_au90 daysGoogle AdsYesNo action needed
hjSessionUser*1 yearHotjarYes — under 13 monthsNo action needed
NID6 monthsGoogle SearchYesNo action needed

GA4 Cookie Lifetime Configuration for Pinnacle E-Commerce Ltd

Override default GA4 cookie duration to comply with CNIL:

gtag.js implementation:

javascript
gtag('config', 'G-PINNACLE123', {
  'cookie_expires': 34128000,     // 395 days (~13 months) in seconds
  'cookie_update': true,           // Refresh cookie on each visit
  'cookie_domain': '.pinnacle-ecommerce.com',
  'cookie_flags': 'SameSite=Lax;Secure'
});

GTM implementation: In the GA4 Configuration tag, set the field:

  • Field name: cookie_expires
  • Value: 34128000

Browser-Enforced Lifetime Restrictions

Safari Intelligent Tracking Prevention (ITP)

Safari imposes strict cookie lifetime caps:

Cookie TypeITP RuleEffective Lifetime
Client-side JavaScript cookie (document.cookie)Capped at 7 days7 days maximum
Client-side JS cookie with link decoration (e.g., ?gclid=)Capped at 24 hours24 hours
Server-set cookie (Set-Cookie header), first-partyNo capAs set by server
Server-set cookie, classified as trackingCapped at 7 days7 days
Third-party cookieBlocked entirely0 (cannot be set)
LocalStorageCapped at 7 days7 days

Impact on Pinnacle E-Commerce Ltd:

  • GA4 _ga cookie set via JavaScript: Effective lifetime is 7 days on Safari, not 2 years
  • Server-side tagging (via data.pinnacle-ecommerce.com) sets _ga via Set-Cookie header: Full configured lifetime applies
  • Google Ads click IDs in URL parameters: _gcl_au cookie capped at 24 hours on Safari

Firefox Enhanced Tracking Protection (ETP)

SettingDefault (Standard)Strict
Third-party tracking cookiesBlockedBlocked
Cross-site tracking cookiesBlockedBlocked
First-party tracking cookiesAllowedLimited to 7 days (if tracker classified)
Fingerprinting scriptsBlockedBlocked
Cryptomining scriptsBlockedBlocked

Chrome Third-Party Cookie Changes

As of 2025, Chrome has moved toward a user-choice model for third-party cookies rather than full deprecation:

PhaseStatusImpact
Privacy Sandbox APIs availableActiveTopics API, Attribution Reporting API available
Third-party cookie user controlsActiveUsers can block third-party cookies in settings
IP Protection (Gnatcatcher)In developmentMay affect IP-based tracking

Cookie Lifetime Audit Process

Step 1: Extract Current Cookie Lifetimes

For each cookie on pinnacle-ecommerce.com, record:

Cookie NameDomainSet ByDeclared DurationActual Max-Age/ExpiresRefreshed on VisitCategory
_ga.pinnacle-ecommerce.comJavaScript2 yearsMax-Age=63072000YesAnalytics
_ga_PINNACLE.pinnacle-ecommerce.comJavaScript2 yearsMax-Age=63072000YesAnalytics
_gid.pinnacle-ecommerce.comJavaScript24 hoursMax-Age=86400YesAnalytics
_fbp.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
_fbc.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
_gcl_au.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
session_id.pinnacle-ecommerce.comServerSessionNo Max-AgeN/ANecessary
csrf_token.pinnacle-ecommerce.comServerSessionNo Max-AgeN/ANecessary
locale.pinnacle-ecommerce.comServer1 yearMax-Age=31536000NoFunctionality
consent_state.pinnacle-ecommerce.comJavaScript6 monthsMax-Age=15768000NoNecessary

Step 2: Compare Against Limits

CookieServer-Set DurationCNIL 13-Month LimitSafari ITP LimitCompliantAction Required
_ga2 yearsExceeds7 days (JS)NoReduce to 13 months; move to server-side
_ga_PINNACLE2 yearsExceeds7 days (JS)NoReduce to 13 months; move to server-side
_gid24 hoursWithin7 days (JS)YesNone
_fbp90 daysWithin7 days (JS)PartialMove to server-side for Safari
locale1 yearWithinNo cap (server)YesNone
consent_state6 monthsWithin7 days (JS)PartialMove to server-side; aligns with CNIL 6-month reconsent

Step 3: Verify Disclosure Accuracy

Compare actual cookie lifetimes with durations stated in the cookie policy:

CookiePolicy StatesActual DurationAccurate
_ga"up to 2 years"2 yearsYes — but update to reflect 13-month override
_fbp"3 months"90 daysYes
locale"12 months"1 yearYes
_gid"24 hours"24 hoursYes

Step 4: Generate Remediation Plan

For Pinnacle E-Commerce Ltd:

  1. Immediate: Override GA4 cookie duration to 13 months (cookie_expires: 34128000)
  2. Short-term: Implement server-side tagging for _ga, _fbp cookies to bypass Safari ITP 7-day cap
  3. Medium-term: Implement automatic consent recollection at 6 months (CNIL reconsent cycle)
  4. Ongoing: Add cookie lifetime checks to CI/CD pipeline — flag any new cookie with duration > 13 months

Key Legal and Technical References

  • CNIL Deliberation No. 2020-091 (17 September 2020) — 13-month maximum cookie lifetime recommendation
  • CNIL Recommendation on Cookies (1 October 2020) — Practical implementation of lifetime limits
  • CJEU Case C-673/17 (Planet49), para. 81 — Cookie duration must be disclosed before consent
  • ePrivacy Directive 2002/58/EC, Article 5(3) — Consent required for non-essential cookie storage
  • Apple WebKit ITP Documentation — Safari cookie lifetime restrictions
  • Mozilla ETP Documentation — Firefox tracking protection policies
  • Google Privacy Sandbox Timeline — Chrome third-party cookie deprecation status
  • GDPR Article 5(1)(e) — Storage limitation principle applicable to cookie-stored personal data

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cookie Lifetime Audit AI skill do?

Auditing cookie lifetimes against regulatory recommendations and browser policies. Covers CNIL 13-month maximum recommendation, session vs persistent classification, third-party cookie phase-out impact, and Safari ITP duration caps.

Why use Cookie Lifetime Audit on TypingMind?

Because you install it once and use it with any model. Cookie Lifetime Audit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cookie Lifetime Audit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mukul975/Privacy-Data-Protection-Skills/tree/main/plugins/cookie-consent-skills/skills/cookie-lifetime-audit. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cookie Lifetime Audit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cookie Lifetime Audit?

As many as you like. As long as a model supports skills, you can use Cookie Lifetime Audit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cookie Lifetime Audit AI skill free?

Yes. It is published on GitHub by mukul975 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇