universal-web-adaptation
FreeNo executable scriptsNot checkedUse 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…
by gabrielmoreira★ 23 GitHub starsAbout 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.jssrc\planner.jssrc\llm-planner.jssrc\site-profiles.jsscenarios\site-profiles.json
Core principle
Always try this order:
- Capability discovery — check if opencli already supports the site (
opencli list) - Auth cascade — classify: PUBLIC → COOKIE/SESSION → HEADER → LOGIN-GATED
- Generic adaptation — probe UI controls and try heuristic strategies
- Temporary scenario tuning — adjust runtime before assuming selectors are wrong
- Popup / opener / alternate-submit handling
- 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:
searchqueryfind搜索查找
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:
- fill visible search input + press Enter
- fill visible search input + click nearest likely submit
- if search is hidden, click likely opener then retry 1 and 2
- if click or Enter opens a popup, switch to the popup and continue there
- 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
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
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
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
by Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
by Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
by Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
by Anthropic