headless-web-viewer

📁 okwinds/miscellany 📅 7 days ago
0
总安装量
2
周安装量
安装命令
npx skills add https://github.com/okwinds/miscellany --skill headless-web-viewer

Agent 安装分布

amp 2
opencode 2
kimi-cli 2
codex 2
gemini-cli 2

Skill 文档

Headless Web Viewer

Run

Render + save artifacts

node agent/skills/headless-web-viewer/scripts/render_url_playwright.mjs '<URL>' \
  --out-html /tmp/page.html \
  --out-text /tmp/page.txt \
  --out-screenshot /tmp/page.png

Print to stdout (pipe-friendly)

node agent/skills/headless-web-viewer/scripts/render_url_playwright.mjs '<URL>' --print text

Dependencies

This skill requires Playwright in the environment where it runs.

Option A (recommended for global use, no browser download)

Install Playwright Core and use system Chrome:

npm i -D playwright-core

Run with --channel chrome.

Option B (bundled browsers)

npm i -D playwright
npx playwright install

Do not auto-install dependencies unless the user asks.

Tips

  • If a page hangs on networkidle, retry with --wait-until domcontentloaded.
  • If a page blocks headless Chromium, try setting --user-agent to a realistic UA.