Debugs a web front end in a headless browser: starts the dev server and a page check in one command, reads console errors, uncaught exceptions and failed requests as JSON, runs Playwright step files, and takes screenshots only for layout. Not for fetching documentation pages; use web_fetch.
Ships in web-debug. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Find and fix front-end defects by looking at the running page, not by guessing
from source. The driver is scripts/web-check.mjs (relative to this skill's
base_dir; Node 22 or later, nothing to install). It prints one JSON object and
exits non-zero when the page failed to load or a step threw.
Start the server and the check in one command. The driver starts
--serve as a child, waits for --ready, and stops the whole process
group when it exits, so nothing is left running:
node <base_dir>/scripts/web-check.mjs http://127.0.0.1:5173/settings \
--serve "npm run dev -- --port 5173 --strictPort" --ready http://127.0.0.1:5173/ \
--wait-for "Settings" --strict
Run it from the package that has Playwright (or pass --project <dir>) so
the project's own Playwright drives the browser; --serve runs in the
current directory. Several servers go in one --serve string joined with
&. The driver waits for the page URL and for every --ready URL
(repeatable; name each backend the page calls), then for the page to
render text. --wait-for <text> waits for text the page shows once its
data loaded. blank: true means nothing rendered: read console and
exceptions for a render error before raising --timeout.
Read the JSON before anything else: exceptions (message, url, line),
console (errors and warnings, deduplicated with counts), failedRequests
(method, url without its query string, status or network error), error.
An exception's url and line point at the source module.
Fix the code, then rerun the same command. The fix is done when the
symptom is gone from the JSON (with --strict, exit 0).
Put clicks, typing and measurements in a step file in the workspace, so the same check reruns as acceptance:
// checks/settings.mjs
export default async (page, shot) => {
await page.getByRole("button", { name: "Save" }).click();
await shot("after-save");
return { saved: await page.getByText("Saved").isVisible() };
};
--steps checks/settings.mjs runs it after load; its return value appears in
stepResults. page is Playwright's own Page when the project has
Playwright. Without it the driver falls back to a built-in client whose page
has only evaluate, click(selector), fill(selector, value),
waitForSelector, waitForTimeout, goto, title, url and screenshot,
with no auto-waiting.
State the app reads before it boots goes in --local-storage KEY=VALUE
(repeatable) or --init script.js. --text [selector] returns the rendered
text of a region.
Take one only when layout, rendering or visual state is the question; the
JSON answers errors and requests. --shot captures the page after load and
shot(name) inside a step; files land in .web-check/ (it ignores itself)
or --out <dir>. For layout work check both --viewport 1440x900,390x844.
Read each PNG with read before claiming anything about it: a screenshot you
did not read is not evidence. On a route without image input, describe it
with the vision tool instead.
--serve over a backgrounded shell job.error says why. Inside a sandbox a full
Chrome fails on its process singleton; install the headless shell with
npx playwright install --only-shell chromium and rerun.A fresh browser per call, so page state does not survive between commands; do multi-step work inside one step file. The server lives for one command. Headless only.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/web-debug:web-debugfrom web-debug
npx claudepluginhub panstudio/pancode --plugin web-debug