跳到正文
Skillpedia
安全75k · #2788

cookie-consent

它能做什么

这项技能检查网站是否在设置可选 Cookie(例如分析或广告代码)之前征得同意。适合必须遵守欧盟等地区隐私规则的网站所有者。

适用场景

  • ✓当你的网站为欧盟访客设置分析或广告 Cookie 时。
  • ✓当追踪脚本在访客同意之前就已加载时。
  • ✓当你需要提供让访客更改或撤回选择的方式时。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/cookie-consent/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/cookie-consent/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在我的网站上添加 Cookie 横幅,使分析代码在访客点击同意之前不会运行。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查非必要脚本在访客接受该类别之前是否保持阻止,并添加以后更改偏好的方式,通常通过同意管理工具实现。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Show a cookie consent notice

GDPR violations can result in fines up to €20 million or 4% of global annual turnover. Regulators across the EU have actively fined organizations for deploying tracking cookies without valid consent.

Quick Reference

  • GDPR requires consent before setting non-essential cookies (analytics, advertising, personalization)
  • Essential/strictly necessary cookies (session, security, login) do not require consent
  • Consent must be freely given, specific, informed, and unambiguous — pre-ticked boxes are invalid
  • Users must be able to withdraw consent as easily as they gave it
  • Scripts and pixels must not load until the user has actively accepted their category
  • Non-essential trackers must stay blocked until consent and after revocation

Check

Check whether the site displays a cookie consent notice before setting non-essential cookies. Verify that analytics, advertising, and tracking scripts do not load until the user has actively accepted. Check whether users can reject non-essential cookies without losing access to content.

Fix

Implement a cookie consent management platform (CMP) that blocks non-essential scripts until consent is granted. Configure analytics and tracking tags to initialize only after explicit consent. Provide a mechanism for users to change their consent preferences at any time.

Explain

Explain what GDPR requires for cookie consent, the difference between essential and non-essential cookies, why pre-ticked boxes are invalid consent, and what a technically compliant consent implementation looks like.

Code Review

Review server config, headers, forms, and integration points related to Show a cookie consent notice. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response. Check that tracker initialization is gated on consent and that a persistent "change cookie settings" path exists after the banner is gone.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/privacy/cookie-consent

常见问题

哪些 Cookie 不需要同意?

严格必要的 Cookie,例如用于会话、安全和登录的 Cookie。

默认勾选的选项可以算作同意吗?

不可以。这项技能说明,默认勾选的选框不是有效的同意。

GDPR 罚款有多高?

这项技能指出,罚款可达 2000 万欧元或全球年营业额的 4%。

详情

作者的原始描述

Use when reviewing a website for GDPR/CCPA compliance, specifically whether cookie consent is obtained before non-essential cookies are set.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2788
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能