Render and view webpages using a headless browser (Playwright) to fetch JS-rendered HTML, extract visible text, and optionally save full-page screenshots. Use when a user asks to “无头浏览器打开/查看网页”, needs the rendered DOM instead of raw curl HTML, or wants a screenshot of a page.
Render and view webpages using a headless browser (Playwright) to fetch JS-rendered HTML, extract visible text, and optionally save full-page screenshots.
SKILL.md: skill definition + usage notesscripts/render_url_playwright.mjs: renderer CLIpackage.json / package-lock.json: Playwright dependency (not vendored)This folder is the “skill package”. Installing it means your coding tool/agent runner can discover the
SKILL.mdinside it (commonly by placing the directory into askills/folder, or by using the tool’s “install from Git” feature).
From this repo root, set SKILLS_DIR to whatever skills folder your tool scans (e.g. ~/.codex/skills, ~/.claude/skills, ~/.config/opencode/skills, etc):
SKILLS_DIR=~/.codex/skills
mkdir -p "$SKILLS_DIR"
rm -rf "$SKILLS_DIR/headless-web-viewer"
cp -R agent/skills/headless-web-viewer "$SKILLS_DIR/headless-web-viewer"
cd "$SKILLS_DIR/headless-web-viewer"
npm ci
SKILLS_DIR=~/.codex/skills
mkdir -p "$SKILLS_DIR"
rm -rf "$SKILLS_DIR/headless-web-viewer"
ln -s "$(pwd)/agent/skills/headless-web-viewer" "$SKILLS_DIR/headless-web-viewer"
cd "$SKILLS_DIR/headless-web-viewer"
npm ci
Prereqs for openskills:
npx openskills ... (it will download and run).npm i -g openskills (or pnpm add -g openskills).Use openskills install with this repo’s GitHub URL (or any Git URL), then select which skill(s) to install:
npx openskills install <git-url>
Example (this repo; note: use a cloneable repo URL, not a GitHub .../tree/... subdirectory link):
npx openskills install https://github.com/okwinds/miscellany
When prompted, select headless-web-viewer (repo path: agent/skills/headless-web-viewer).
Common options:
-g: install globally-u: install into .agent/skills/ (portable across tools/projects)-y: skip prompts, install all detected skillsVerify / read back:
npx openskills list
npx openskills read headless-web-viewer
Many coding tools can install/load skills directly from a GitHub/Git URL. If yours supports it, point it at this repo and select/target agent/skills/headless-web-viewer. If it doesn’t, use copy/symlink or openskills install.
Restart / open a new session so your tool re-scans skills, then ask in natural language (e.g. “open this URL headlessly and extract visible text”).
From the installed skill directory:
node ./scripts/render_url_playwright.mjs 'https://example.com' \
--out-html /tmp/page.html \
--out-text /tmp/page.txt \
--out-screenshot /tmp/page.png
Pipe-friendly text output:
node ./scripts/render_url_playwright.mjs 'https://example.com' --print text
This skill needs Playwright available at runtime.
playwright-core and use system Chrome/Edge via --channel chrome|msedgeplaywright and run npx playwright installInstall in this skill directory:
cd /path/to/headless-web-viewer
npm ci
networkidle, retry with --wait-until domcontentloaded.--user-agent and/or --channel chrome.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer