Skip to content
Back to skills

Verify In Browser

ASecurity

Visually verify an edit by serving the site checkout locally, screenshotting it with the preinstalled headless Chromium, and reading the screenshot. Use after visual changes (layout, color, images) or when the owner asks you to check how something looks.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentspythongoshellbashnodedebugging

Security analysis

A100/100

Scanned September 20, 2026

npx -y skills add vibhasjain/agent-keyboard --skill verify-in-browser --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Verify In Browser?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Verify In Browser
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vibhasjain-verify-in-browser/badge)](https://www.skillsdirectory.com/skills/vibhasjain-verify-in-browser)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: verify-in-browser
description: Visually verify an edit by serving the site checkout locally, screenshotting it with the preinstalled headless Chromium, and reading the screenshot. Use after visual changes (layout, color, images) or when the owner asks you to check how something looks.
---

# verify-in-browser

Playwright + a headless Chromium shell are preinstalled in this image
(`PLAYWRIGHT_BROWSERS_PATH=/ms-playwright`). The pattern:

```bash
# 1. serve the checkout (from the repo root — your cwd); the trap guarantees
#    the server dies even if the screenshot command fails
python3 -m http.server 4173 &
SERVER_PID=$!
trap 'kill $SERVER_PID 2>/dev/null' EXIT

# 2. screenshot the page you changed (mobile-ish viewport; adjust as needed).
#    NODE_PATH exposes the Playwright package installed globally in the image.
AK_PAGE_URL="http://localhost:4173/index.html" AK_SCREENSHOT="/tmp/verify.png" \
NODE_PATH="$(npm root -g)" node <<'NODE'
const { chromium } = require('playwright')
;(async () => {
  const browser = await chromium.launch({
    headless: true,
    args: process.env.AK_CDP_PORT ? ['--remote-debugging-port=' + process.env.AK_CDP_PORT] : [],
  })
  try {
    const page = await browser.newPage({ viewport: { width: 390, height: 844 } })
    await page.goto(process.env.AK_PAGE_URL, { waitUntil: 'networkidle' })
    await page.screenshot({ path: process.env.AK_SCREENSHOT, fullPage: true })
  } finally {
    await browser.close()
  }
})().catch((error) => { console.error(error); process.exit(1) })
NODE
```

Then use the Read tool on `/tmp/verify.png` to inspect the render, and describe
what you saw in your reply ("verified — the hero is amber now").

Rules:

- **Run the whole block as ONE command** so the trap can do its job — the trap
  kills the server when that shell exits, even if the screenshot fails. Never
  leave background processes running: RAM on this machine is shared with other
  jobs. (Orphaned `http.server`s have leaked before — check with
  `ls /proc/*/exe` if in doubt and kill strays.)
- Screenshots go to `/tmp`, never into the repo (don't commit them).
- Static sites only need `http.server`; if the site has a build step, build
  first (check the repo's README) and serve the build output directory.
- A desktop check uses `--viewport-size=1280,800`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.