lw-cookie-consent-integration

lw-cookie-consent-integration is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 116 tokens per session (2,574 once invoked), scanned A, original, MIT.

A guide to integrating LW Cookie with a WordPress site's cookie-consent settings, script blocking, Google Consent Mode, scanner, command-line tools, and public interfaces. Cookie consent records whether visitors allow optional categories such as analytics or marketing.

In plain words
What is it for?
Use it to read consent, block or enable scripts and embeds, manage settings through supported interfaces, or connect WordPress code to consent events.
Why use it?
It prevents direct writes to internal settings, scripts running before consent, and assumptions that a technical setting alone makes a site legally compliant.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to read consent, block or enable scripts and embeds, manage settings through supported interfaces, or connect WordPress code to consent events.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/lw-cookie-consent-integration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Lonsdale201/wp-agent-skills --skill lw-cookie-consent-integration
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lw-cookie-consent-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/lw-cookie-consent-integration/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/lw-cookie-consent-integration)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/lw-cookie-consent-integration"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/lw-cookie-consent-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lw-cookie-consent-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/lw-cookie-consent-integration"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/lw-cookie-consent-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00116 $0.02574
Opus 5.5 $0.00046 $0.01030
Sonnet 5.5 $0.00023 $0.00515
Haiku 4.5 $0.00012 $0.00257

Measured 2mo ago against content hash efc58977840d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lw-cookie-consent-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

lw-plugins/lw-cookie-consent-integration/SKILL.md · 215 lines

How it starts

The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use LW Cookie's public hooks, browser API, REST routes, CLI, and abilities. Do not patch the plugin or infer legal compliance from a technical setting. Consent requirements depend on the site's processing, jurisdiction, vendor behavior, and legal basis.

Binding requirements and storage

Read the plugin header rather than old README badges:

Contract Version 1.8.3
WordPress 6.6 or newer
PHP 8.2 or newer
Main option lw_cookie_options
Categories necessary, functional, analytics, marketing
Site Manager namespace lw-cookie/*
Public shortcode [lw_cookie_declaration]

necessary is always required. The three optional categories default to denied until consent is saved.

Do not write lw_cookie_options directly. The admin REST settings controller and the 1.8.3 lw-cookie/set-options ability both use the sanitized partial-update path for field types, enums, colors, IDs, multilingual locks, and declared-cookie rows.

$categories = apply_filters( 'lw_cookie_consent_categories', [] );
$has_choice = apply_filters( 'lw_cookie_has_consent', false );
$analytics  = apply_filters( 'lw_cookie_is_category_allowed', false, 'analytics' );
$consent_id = apply_filters( 'lw_cookie_consent_id', null );

Pass both documented arguments to lw_cookie_is_category_allowed. Treat an unknown category as denied.

These filters read the visitor's consent cookie. Do not let a full-page cache share consent-dependent HTML between visitors. A cache-safe integration renders the blocked form for everyone and lets the browser restore content after consent.

Browser API and event

Use the global API after the plugin's frontend assets load:

window.LWCookie.openPreferences();
window.LWCookie.acceptCategory( 'marketing' );

const state = window.LWCookie.getConsent();
const analyticsAllowed = window.LWCookie.isAllowed( 'analytics' );

window.addEventListener( 'lwCookieConsent', ( event ) => {
	const categories = event.detail.categories;
	const action = event.detail.action;
} );

Read the full file on GitHub · 215 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 215 lines · 116 tokens per session scan A efc58977840d

Subscribe to this mod's changes

lw-cookie-consent-integration is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (26 stars, last pushed 9d ago), licensed MIT. It adds 116 tokens to every session and 2,574 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

lw-cookie-consent-integration compared with skills from other repositories

lw-cookie-consent-integration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
lw-cookie-consent-integrationLonsdale201/wp-agent-skillsSkill269d agoMITA116Claude Code, Codex
azure-health-data-servicesMicrosoftDocs/Agent-SkillsSkill82421d agoCC-BY-4.0A125Claude Code
wp-plugin-developmentfernandotellado/ai-skillsSkill443d agoGPL-3.0A141Claude Code, Codex
wp-plugin-performancefernandotellado/ai-skillsSkill443d agoGPL-3.0A55Claude Code, Codex
compliance-rgigreen-code-initiative/ai-green-skillsSkill26mo agononeB20Claude Code, Codex
data-manager-api-troubleshootinggoogle/skillsSkill25ktodayApache-2.0A179Claude Code, Codex
data-manager-api-setupgoogle/skillsSkill25ktodayApache-2.0A118Claude Code, Codex