Skip to content
AI & Agents
Skill

/page-prep

Detects and removes overlays that block a webpage (cookie and GDPR consent banners, modals, newsletter popups, paywalls, login walls) with the web CLI, using Consent-O-Matic rules for known consent platforms plus DOM heuristics. Use before screenshotting, scraping, or automating

From plugin
skills
333183 skills5 MCP

Claude Code

$ npx -y skills add adobe/skills --skill page-prep --agent claude-code

SKILL.md

page-prep.SKILL.md
name: page-prep
license: Apache-2.0
compatibility: Requires Node 22+ and playwright-cli on PATH; uses the web CLI (plugins/web/cli)
description: >-
  Detects and removes overlays that block a webpage (cookie and GDPR consent
  banners, modals, newsletter popups, paywalls, login walls) with the web CLI,
  using Consent-O-Matic rules for known consent platforms plus DOM heuristics. Use
  before screenshotting, scraping, or automating a page that shows or may show such
  overlays, or when the user asks to dismiss cookie banners or popups.
metadata:
  version: "1.0.0"

Page Prep

Detect and remove overlays (cookie banners, GDPR consent, modals, paywalls, login walls) before screenshots, scraping, or browser automation, with `web page overlays`.

Requirements

Node 22+ and `playwright-cli` >= 0.1.20 on PATH (`playwright-cli --version`). Locate the `web` CLI once:

# <skill-dir> is the directory containing this SKILL.md
WEB=$(command -v web || echo "node <skill-dir>/../../cli/dist/web.mjs")

then run `$WEB …`; it prints exactly one JSON document on stdout, so `$WEB … > file.json` is safe. Fallback when published: `npx -y @adobe/web-cli`. Use an absolute `<skill-dir>`; don't `cd` into it.

**Sessions.** If `WEB_SESSION` or `PLAYWRIGHT_CLI_SESSION` is set, do not pass `--session`: every `web` command uses that browser and leaves it open. Otherwise either run one-shot (`$WEB page tree "$URL"` opens and closes its own browser) or start a browser and reuse the generated name: `S=$($WEB browser open "$URL" | jq -r .session)` then `--session "$S"`. Never invent a fixed session name.

When to Use

Before screenshotting, scraping, or automating a page that shows or may show overlays, or when the user asks to dismiss cookie banners or popups.

Command

$WEB page overlays "$URL"                         # detect only
$WEB page overlays --session "$S" --dismiss         # thorough (default)
$WEB page overlays --session "$S" --dismiss --mode quick
$WEB page overlays --session "$S" --refresh-db      # refresh the pattern database first

Overlays are dismissed in the page of an open session, so open one first:

S=$($WEB browser open "$URL" | jq -r .session)
$WEB page overlays --session "$S" --dismiss
$WEB page tree --session "$S"                       # or reduce / collect / langs
$WEB browser close --session "$S"

Saving the hide rules (recipe)

Detecting overlays on every page costs seconds. Record them once, then reuse them:

$WEB page overlays "$URL" --save-recipe          # writes the hide rules to ./recipe.json
S=$($WEB browser open "$URL" | jq -r .session)   # starts with the overlays hidden

`--save-recipe` writes to `--recipe <file>` (default `./recipe.json`), replacing its `overlays` entries and keeping the other types (`probe`). Later browsers launched by any `web` command load that file from `--recipe`, `$WEB_RECIPE` or `./recipe.json`, and inject the rules as CSS before the page renders. A recipe holds one site: use one file per site. Saving launches its browser with the recipe's `probe` entries but not its `overlays`, so it still reaches a protected site and still sees the overlays. It refuses a `--session` that was launched with overlay rules (they are hidden, so nothing would be detected): record in a fresh browser. The rules cover whatever was detected on that page, heuristic matches included, so record on a representative page.

Mode

| Mode | Dismiss | Use case | |------|---------|----------| | `thorough` (default) | Clicks the CMP's dismiss steps, hides overlays that have none | Persistent sessions, interactive work | | `quick` | Hides every overlay with CSS injection, no clicks | Ephemeral sessions, repeated evaluations |

Scroll lock is fixed in both modes. Use `quick` when the session is thrown away and consent choices never need to persist.

Reading the JSON

Detection: `{ overlays: [{ id, type, selector, ... }], scrollLocked, scrollFix, url, session, durationMs }`

With `--dismiss` also: `applied: [{ id, strategy: hide|dismiss, ok }]` and `residual: [{ tag, id, role, ... }]`.

Each overlay has `source`: `"cmp-match"` or `"heuristic"`. Field details and the dismiss/hide schema: [references/formats.md](references/formats.md).

  • **cmp-match**: `dismiss` is null (no safe save sequence; treat like heuristic)

or a list of click/wait steps that open the platform's options and save them without changing any toggle, which usually means non-essential cookies are rejected. Steps are alternatives for different platform versions: a click whose selector matches nothing is skipped. `hide` holds CSS rules for the banner.

  • **heuristic** (`dismiss: null`): the CLI hides it.
  • `applied[].strategy`: `dismiss` = clicked through the CMP's steps; `hide` = CSS

hidden (no safe steps, or clicks left it in place). `ok: false` means it failed.

  • `residual[]`: visible `position:fixed` elements covering at least half the viewport,

or with z-index > 1000 and non-trivial size. **Check it is empty.** Ignore legitimate elements (navigation bars, toolbars; `role` is `banner`/`landmark` for site headers); for the rest, run the Agent Fallback below and re-run `--dismiss` to confirm.

Agent Fallback (residual or `dismiss: null` overlays)

Via the escape hatch on the same browser, in order:

1. **Escape key**: `playwright-cli -s s1 press Escape`; check if the overlay is gone. 2. **Close buttons**: click the first matching `[aria-label*="close" i]`, `[aria-label*="dismiss" i]`, `.close`, `button:has(svg)`, `button[class*="close"]`. 3. **Element removal**: `$WEB browser eval "document.querySelector('<selector>')?.remove()" --session "$S"`.

For `thorough` mode also take a viewport screenshot (`$WEB browser screenshot --session "$S"`, no `--full-page`), view it, and confirm no overlay, banner, modal or backdrop dimming remains. At most 2 retries, then report what is left without blocking.

Consult [known patterns](references/kn

Read more
@adobe
Ships withskills

Skills that teach AI coding agents to work with Adobe products. A skill is a folder with a SKILL.md that an agent loads when a task calls for it (agentskills.io).

333183 skills5 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
333
Star history of adobe/skills on GitHub, a chart by star-history.com

Other skills on skills.

aa-conversion-funnel-analysis

aa-conversion-funnel-a…

Analyzes a multi-step conversion funnel to find where visitors drop off and which steps have the worst leakage. Use this skill…

@adobe@adobeInstall Skill
aa-executive-briefing

aa-executive-briefing

Generates a concise, executive-ready performance summary covering key metrics, trends, and what's driving movement. Use this…

@adobe@adobeInstall Skill
aa-kpi-pulse

aa-kpi-pulse

Produces a compact KPI digest showing how key metrics changed over a period and what's driving the movement. Use this skill when…

@adobe@adobeInstall Skill
aa-top-movers-watchlist

aa-top-movers-watchlis…

Identifies which items (pages, campaigns, products, channels, regions) had the biggest increases or decreases for a key metric…

@adobe@adobeInstall Skill
cja-dimension-analysis

cja-dimension-analysis

Comprehensive dimension analysis and reporting for CJA. Use this skill whenever the user wants to analyze one or more dimensions…

@adobe@adobeInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw3w393k
@openclaw@openclawInstall Skill

Questions about page-prep.

Which coding agents can use page-prep?
page-prep installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.