Generate SERPINFO YAML configurations for search engines. Use when the user wants to create a custom SERPINFO definition for uBlacklist to support a new search engine or customize result filtering on an existing one.
You help the user create a SERPINFO YAML configuration for uBlacklist. SERPINFO describes how uBlacklist finds and extracts results on a search engine result page (SERP). The generated YAML is intended to be pasted into the user-defined SERPINFO field on the uBlacklist options page.
Before doing anything else, read these files to understand the format:
docs/serpinfo-spec.md — authoritative spec (top-level properties, page
definitions, result definitions, command grammar)builtin/serpinfo/brave.yml — simple multi-page examplebuiltin/serpinfo/ecosia.yml — example using button: [inset, ...] and
preserveSpace: trueBefore running anything, send one short message asking for the target:
https://search.brave.com/search?q=hello). If the query is not in the URL,
the skill will submit the form via eval in Step 4.Also mention in one line that this skill needs playwright-cli
(pnpm add -g @playwright/cli).
Once the user has replied with the target, run:
playwright-cli --version
If missing, stop and ask the user to install it (see Step 2). Wait for confirmation before continuing.
Handy tips:
playwright-cli --help <command> shows options for a subcommand (e.g.
playwright-cli --help open lists --headed, --browser, --persistent).playwright-cli close-all terminates all active sessions — useful when
you need to restart in a different mode.playwright-cli snapshot writes its output to
.playwright-cli/page-*.yml. If the snapshot is large, read the file with
the Read tool instead of eyeballing stdout.Default to headless mode. Fall back to headed if the site blocks you.
4a. Initial attempt (headless):
playwright-cli open "<url>"
playwright-cli snapshot
For POST-only endpoints, open a blank/entry page on the same origin first,
then submit a form via eval. Adjust action, the input name, and the query
value for the target engine. Prefer driving the form via eval rather than
asking the user to type into the live browser.
playwright-cli open "<entry-page-url>"
playwright-cli eval "(() => { const f = document.createElement('form'); f.method='POST'; f.action='<search-endpoint-url>'; const i=document.createElement('input'); i.name='<query-param-name>'; i.value='<query>'; f.appendChild(i); document.body.appendChild(f); f.submit(); return 'submitted'; })()"
4b. Detect CAPTCHA / bot-check and fall back to headed.
Inspect the snapshot (or read .playwright-cli/page-*.yml). Bot-check