Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

universal-web-adaptation

FreeNo executable scriptsNot checked

Use this skill when asked to work with an unfamiliar public website and the goal is to make progress generically before writing site-specific rules. It…

gabrielmoreiraby gabrielmoreira★ 23 GitHub stars

About this skill

Universal web adaptation skill

Use this skill when the user wants a general solution across many websites, not a one-by-one manual integration first.

This skill is especially suitable for:

  • unfamiliar public websites
  • search-oriented workflows
  • result-page collection and lightweight summaries
  • deciding whether a site needs a dedicated profile or can stay generic

For the 99idea Playwright project, this skill should work together with:

  • src\run-demo.js
  • src\planner.js
  • src\llm-planner.js
  • src\site-profiles.js
  • scenarios\site-profiles.json

Core principle

Always try this order:

  1. Capability discovery — check if opencli already supports the site (opencli list)
  2. Auth cascade — classify: PUBLIC → COOKIE/SESSION → HEADER → LOGIN-GATED
  3. Generic adaptation — probe UI controls and try heuristic strategies
  4. Temporary scenario tuning — adjust runtime before assuming selectors are wrong
  5. Popup / opener / alternate-submit handling
  6. Site profile only if generic adaptation still fails

The goal is to minimize per-site handwork.

Execution path decision (inspired by opencli)

Before touching the DOM, first determine which execution layer to use:

if opencli has an adapter for this site:
    use opencli (zero LLM cost, deterministic)
elif the site has a public API:
    use fetch (structured data, no rendering)
elif the site renders server-side (SSR):
    use web_fetch or Playwright (metadata extraction)
else:
    use Browser Agent with login-state or mark blocked

This avoids wasting time on SPA shells that will never yield results via scraping.

What “generic adaptation” means

When facing a new site, do not immediately create a profile. First try to discover:

  • likely search inputs
  • likely opener buttons or icons
  • likely submit controls
  • whether Enter works
  • whether a click opens a popup or new tab
  • whether the site verifies best by URL, title, or visible text

Standard workflow

1. Probe the page

Collect candidates for:

  • inputs
  • buttons
  • anchors
  • role=button
  • role=search

Prefer candidates whose metadata includes:

  • search
  • query
  • find
  • 搜索
  • 查找

For each candidate, record:

  • visibility
  • enabled/editable status
  • approximate position
  • container context
  • whether duplicates exist in header/footer/overlay regions

2. Classify the site UI

Put the site into one of these buckets:

  • direct-search: visible input plus obvious submit
  • opener-search: search exists but must be opened first
  • popup-search: submit opens a new tab or popup
  • duplicate-controls: multiple matching controls require container qualification
  • hidden-disabled: search exists but is not immediately usable
  • SPA-shell: page returns JS-only content, no usable DOM without full rendering
  • login-gated
  • anti-bot / rate-limited

Auth cascade classification (from opencli)

Also classify the site's auth requirements:

  • PUBLIC: no auth needed, fetch/web_fetch works
  • COOKIE: requires browser session cookies (opencli Browser Bridge)
  • HEADER: requires custom auth headers (API key, Bearer token)
  • LOGIN-GATED: requires interactive login, not suitable for default regression

3. Try generic action strategies

Try these in order:

  1. fill visible search input + press Enter
  2. fill visible search input + click nearest likely submit
  3. if search is hidden, click likely opener then retry 1 and 2
  4. if click or Enter opens a popup, switch to the popup and continue there
  5. verify success by:
    • URL change
    • expected URL parameter
    • title change
    • visible result container text

Prefer URL verification whenever available.

4. Use temporary runtime tuning before giving up

If the page is heavy or slow:

  • use waitUntil: "domcontentloaded"
  • use postNavigationLoadState: "domcontentloaded"
  • add a settle delay

Do not assume selectors are wrong if the real problem is heavy page load behavior.

5. Decide whether to keep it generic or create a profile

Stay generic if:

  • the search flow works with robust heuristic selectors
  • the same logic is likely reusable across many sites

Create a dedicated profile only if:

  • the site needs exact selectors to avoid ambiguity
  • the site has duplicate controls in multiple containers
  • the site needs a stable popup-specific submit selector
  • the site has a unique opener pattern worth remembering

Failure classification rules

Strict mode violation

Meaning:

  • your selector is too broad
  • multiple header/footer/overlay controls match

Response:

  • add container-qualified selectors
  • prefer the visible and nearest control to the active search region

Timeout waiting for visible/editable

Meaning:

  • the control is hidden
  • disabled
  • off-screen
  • not opened yet

Response:

  • find and click the opener
  • retry with a container-specific visible control

Enter does nothing

Meaning:

  • the page requires a dedicated submit c
Full SKILL.md on GitHub

Install universal-web-adaptation in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the universal-web-adaptation skill do?

Use this skill when asked to work with an unfamiliar public website and the goal is to make progress generically before writing site-specific rules. It teaches Copilot how to probe controls, classify UI patterns, try multiple search and navigation strategies, follow popups, and only create a site profile when the generic approach is no longer sufficient.

How do I install the universal-web-adaptation skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the universal-web-adaptation skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare universal-web-adaptation with