plugins/web/skills/page-prep/SKILL.md
Prepare any webpage for clean interaction by detecting and removing disruptive overlays (cookie banners, GDPR consent, modals, popups, newsletter signups, paywalls, login walls). Uses a cached database of 300+ known CMPs (Consent-O-Matic + EasyList) combined with heuristic DOM scanning. Injects a self-contained script via playwright-cli. ALWAYS use this skill before taking screenshots, scraping content, or automating interaction on any webpage that might have overlays blocking the view or preventing interaction. Triggers on: page prep, clean page, remove overlays, dismiss cookie banner, page blocked, overlay cleanup, consent banner, prepare page, unblock page, clear popups, cookie popup.
npx skillsauth add adobe/skills page-prepInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect and remove overlays (cookie banners, GDPR consent, modals, paywalls,
login walls) before screenshots, scraping, or browser automation.
Uses playwright-cli as the browser layer. Node 22+ required. No npm
dependencies. Run playwright-cli --help for the command reference.
The mode parameter controls dismiss strategy and verification depth.
Default is thorough. Callers can request quick mode in natural language
("use page-prep in quick mode") or the agent infers from context.
| Mode | Dismiss | Verification | Use case |
|------|---------|--------------|----------|
| thorough (default) | Click-first, hide as fallback | DOM check + viewport screenshot | Persistent sessions, interactive work |
| quick | Hide-only (CSS injection) | DOM check only | Ephemeral sessions, repeated evaluations |
if [[ -n "${CLAUDE_SKILL_DIR:-}" ]]; then
PAGE_PREP_DIR="${CLAUDE_SKILL_DIR}/scripts"
else
PAGE_PREP_DIR="$(dirname "$(command -v overlay-db.js 2>/dev/null || \
find ~/.claude -path "*/page-prep/scripts/overlay-db.js" -type f 2>/dev/null | head -1)")"
fi
Store in PAGE_PREP_DIR and prefix all commands below with
node "$PAGE_PREP_DIR/overlay-db.js".
Resolve PAGE_PREP_DIR using the block above. Verify the path is non-empty
before continuing.
node "$PAGE_PREP_DIR/overlay-db.js" refresh
Updates the local overlay database. Skips if cache < 7 days old; use --force to refresh now.
BUNDLE="$(node "$PAGE_PREP_DIR/overlay-db.js" bundle)"
Evaluate $BUNDLE in the active page via playwright-cli eval. Returns a detection report.
playwright-cli eval "$(node "$PAGE_PREP_DIR/overlay-db.js" bundle)"
Parse the detection report. Each overlay has a source field: "cmp-match" or "heuristic".
dismiss recipe. Use it directly.dismiss: null): compose a dismiss sequence — try Escape key,
then close buttons, then element removal (see Agent Fallback).Combine hide and dismiss recipes for all detected overlays into a single
manifest (see Recipe Manifest Format). Include the global scroll_fix if
scroll_locked is true.
Thorough mode (default) — click-first:
dismiss.steps sequentially.
Clicking sets consent cookies that persist across all tabs — overlay
will not reappear.dismiss: null): run the Agent Fallback
sequence (see below).scroll_fix if scroll_locked is true.hide.js rule).Quick mode — hide-only:
hide.js rules in one playwright-cli eval call.scroll_fix if scroll_locked is true.Find remaining position:fixed blockers the script didn't catch:
playwright-cli eval "JSON.stringify([...document.querySelectorAll('*')].filter(el => { var s = getComputedStyle(el); var r = el.getBoundingClientRect(); return s.position === 'fixed' && parseInt(s.zIndex, 10) > 1000 && (el.offsetWidth > 100 || el.offsetHeight > 100) && r.right > 0 && r.bottom > 0 && r.left < window.innerWidth && r.top < window.innerHeight; }).map(el => { var s = getComputedStyle(el); return { tag: el.tagName, id: el.id, cls: (el.className || '').slice(0, 50), z: s.zIndex, w: el.offsetWidth, h: el.offsetHeight }; }))"
This returns position:fixed elements with z-index > 1000, non-trivial
dimensions, and within the visible viewport — off-screen elements (e.g.
slide-in panels in their closed state) are excluded by the getBoundingClientRect()
bounds check. Ignore legitimate elements (navigation bars, toolbars) and
remove the rest:
document.querySelector('<selector>')?.remove().In quick mode, stop here. In thorough mode, continue to Step 9b.
playwright-cli -s <session> screenshot --filename .playwright-cli/page-prep-check.png
Then use the Read tool on .playwright-cli/page-prep-check.png to view it.
Note: --filename must be a path within the project root or .playwright-cli/ —
/tmp/ paths are not allowed. Do not pass the path as a positional argument;
that is interpreted as a CSS selector, not a file path.For multi-step sessions where new overlays may appear (SPAs, lazy-loaded banners), inject the watch mode snippet after cleanup (see Watch Mode).
See references/formats.md for the Detection Report and Recipe Manifest JSON schemas.
When dismiss is null, attempt in order:
[aria-label*="close" i], [aria-label*="dismiss" i], .close,
button:has(svg), button[class*="close"].document.querySelector('<selector>')?.remove().Consult known patterns for CMP-specific dismiss patterns when the above three steps fail.
Inject after cleanup for pages that load overlays dynamically (SPAs, lazy banners). See references/watch-mode.md for the full snippet.
Two modes: hide (default) auto-removes newly detected overlays via MutationObserver;
dismiss queues them in window.__pagePrep.pending() for agent processing.
Call window.__pagePrep.stop() when the session is done.
refresh --force if detection misses a known CMP — the database may be stale.node "$PAGE_PREP_DIR/overlay-db.js" status to check cache age and entry count.node "$PAGE_PREP_DIR/overlay-db.js" lookup <cmp-name> to check if a CMP is in
the database before injecting.tools
Use the run-workflow MCP to discover, compose, execute, publish, and save Adobe Firefly workflows. TRIGGER when: user asks what actions are available, what the MCP can do, how to process images/video/3D via workflow, wants to build/run/save/publish a workflow, OR pastes any workflow/batch/execution ID. BARE ID (UUID/workflowId/batchId) = INSPECT ONLY — call inspect_run, NEVER run_workflow_submit. ALWAYS call list_actions first for capability/discovery questions. DO NOT TRIGGER for direct Firefly API calls without MCP (use firefly-api-specs).
tools
Run predefined featured workflows via run-workflow MCP. TRIGGER when user names a featured workflow (retargeting, banners at scale, localization, packaging, banner advertising, etc.) or asks to run a known marketing/production workflow. Requires run-workflow MCP. ALWAYS call get_featured_workflow before compose_workflow. DO NOT TRIGGER for custom one-off workflows with no named template — use run-workflow skill.
tools
Migrate an Adobe Commerce App Builder project from the Integration Starter Kit or Checkout Starter Kit to the new App Management approach. Run from the root of the App Builder project to be migrated. Pass --auto to skip confirmation prompts (suitable for CI or batch use) — auto mode prints a summary of all Q&A questions answered with their defaults. Pass --doc-scan-only to scan README.md and env.dist for outdated content without modifying any files. Use when the user wants to migrate an App Builder project from the Integration Starter Kit or Checkout Starter Kit to the App Management approach, or mentions upgrading their Adobe Commerce extension architecture.
development
Add or modify webhook interceptors in an Adobe Commerce app. Use when the user wants to intercept Commerce operations to validate input, append data, or modify behavior — before or after execution. Requires a base app initialized with commerce-app-init.