web-debug
Skill1 starsChanged 6 months agoMITView on GitHub
Use when something in a browser is wrong — a page errors on load, JS doesn't initialise, layout breaks, charts don't render, clicks do nothing. Routes by reproducibility: static file → Playwright headless; interactive / visual → Browser Use control-browser (main agent only). Trigger phrases: page broken, chart not rendering, console error, layout off, click does nothing, debug this page, why isn't X showing up.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- sentimony/skillstheir own version, first seen Nov 1, 2026
- amosblomqvist/pi-configtheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- amosblomqvist/pi-config★ 1.1ksame name
- sentimony/skills★ 7same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- academic-evaluationSkill
- academic-writingSkill
- agent-orchestrationSkill
- agents-md-writerSkill
- algorithmic-artSkill
- brand-guidelinesSkill
- codebase-architectureSkill
- code-reviewSkill
- commit-workflowSkill
- context-checkpointSkill
- doc-coauthoringSkill
- docxSkill
- etl-runnerSkill
- eval-runnerSkill
- feature-devSkill
- frontend-designSkill
- hpc-deucalionSkill
- internal-commsSkill
- langchainSkill
- langfuseSkill
- langgraphSkill
- llm-observability-stackSkill
- mcp-builderSkill
- neo4j-verifySkill
- pdfSkill
- pptxSkill
- project-conventionsSkill
- python-best-practicesSkill
- react-namingSkill
- security-hooksSkill
- service-verifySkill
- skill-creatorSkill
- skill-inspectorSkill
- slack-gif-creatorSkill
- sprint-contractSkill
- theme-factorySkill
- uml-modelingSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 69
When the page is a React app (most cases in this workspace), the generic browser probe above still applies, plus:
- Distinctive: line 72
Check React DevTools (browser extension): before console.logging state — DevTools shows the current state and props of every component in …
- Very specific: line 88
Write a Playwright probe to tmp/, run it, and read the output.
- Distinctive: line 97
If you need to click or type, use the browser tool calls.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Single skill, two backends. The split exists because of the browser-use plugin restriction: control-browser and the node_repl MCP are main-agent-only (enforced at the tool level — subagents don't have the tool even if they read this skill). Playwright, by contrast, any agent can run via Bash.
When to Use
- A page errors on load, shows a blank screen, or fails to render charts/SVGs.
- A click does nothing, or a control that should be there is missing.
- Console errors or failed network requests need investigation.
- Layout is broken in a way the user has screenshotted.
When NOT to Use
- Aesthetic / design issues without functional breakage →
frontend-designorweb-frontendagent. - Verifying that a working app stays working →
webapp-testing. - Black-box user-flow validation (planning P0-P3, action→observation) →
web-gui-tester. - Backend or non-browser bugs → diagnose in the project's own tooling.
Hard Rules
- Read the error before guessing the cause — console errors are the first signal; DOM checks (
locator(...).count()) confirm rendering. - Screenshot before AND after a fix to keep evidence, because the user can re-trigger the bug faster than you can describe it.
- Wait for
networkidle(orload+ fixed timeout) before inspecting on dynamic apps, otherwise you see the pre-JS state. - Put probe scripts under
<project>/tmp/— they are scratch, not deliverables. Do not leave.pyfiles in the project root. - Document environment failure modes (CDN unreachable, chart library absent) instead of "fixing" them by inlining code — the bug is in the environment, not the page.
- If you cannot use
control-browser(subagent context), fall back to Playwright — never block waiting for a tool you do not have. - Report the final state to whoever delegated (user or subagent) — what you ran, what you saw, what you changed, what remains.
Examples
Routing decision (use this before doing anything else):
| Symptom | Use |
Static .html file, reproducible, no auth | Playwright headless — fast, scriptable, screenshots |
| Needs eyes / interaction / auth / multi-tab / extensions | Browser Use control-browser in the main agent |
| Server-backed app (needs lifecycle) | Playwright + webapp-testing for with_server.py |
Inline probe (write to <project>/tmp/probe.py, do not commit):
from playwright.sync_api import sync_playwright
errors = []
failed_requests = []
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.on("pageerror", lambda e: errors.append(("pageerror", str(e))))
page.on("console", lambda m: m.type == "error" and errors.append(("console", m.text)))
page.on("requestfailed", lambda r: failed_requests.append((r.url, r.failure)))
page.goto("file://<abs-path>", wait_until="networkidle", timeout=30000)
page.wait_for_timeout(500)
print("title:", page.title())
print("canvases:", page.locator("canvas").count())
print("svgs:", page.locator("svg").count())
print("errors:", errors)
print("failed_requests:", failed_requests[:10])
browser.close()Loop: run → read errors → fix one thing → re-run.
React-specific debugging
When the page is a React app (most cases in this workspace), the generic browser probe above still applies, plus:
- Read the error before guessing the cause — React's error messages are precise: "Objects are not valid as a React child", "Each child in a list should have a unique key prop", "Cannot read properties of undefined". The fix is usually one stack frame above where the message points.
- Check React DevTools (browser extension) before console.logging state — DevTools shows the current state and props of every component in the tree without modifying code.
console.loginuseEffectto trace lifecycle — a one-lineuseEffect(() => { console.log('mount', props) }, [])at the top of a component shows when it mounts and with what props. Remove the log when done.- Strict Mode (dev only) intentionally double-invokes effects — if you see effects fire twice in dev, that is by design, not a bug. Effects must be idempotent.
- Wrap fallible components in an Error Boundary — a single top-level
<ErrorBoundary>around<App />turns an uncaught render error into a visible fallback instead of a blank page. - Common React error patterns:
- "Each child in a list should have a unique key prop" → add
key={item.id}in the.map(). - "Cannot read property 'X' of undefined" → usually a state initial value that is
undefinedbefore the first render. UseuseState(() => initialValue)or a non-null default. - "Too many re-renders" → a state update inside the render body. Move it into an effect or an event handler.
- "Objects are not valid as a React child" → you are rendering an object directly. Render a property:
obj.namenotobj.
- "Each child in a list should have a unique key prop" → add
- Loader/action errors in React Router — module 21+ projects use loaders. If a loader throws, the route's
errorElementrenders. Check the network tab for the failing request, then the loader'sthrow new Response(...)call. - State changes that do not re-render — the value being mutated instead of replaced. React detects reference changes, not deep equality. Use a new array/object, not
.push()or property assignment.
For naming, structure, and conventions when reading the code under debug, load react-naming.
Playwright loop (most common case)
Write a Playwright probe to tmp/, run it, and read the output. Report findings; do not "fix" by guessing.
Browser Use loop (interactive case)
control-browser is the skill; it bootstraps a fresh node kernel each call and uses domSnapshot() as the primary read. You must be in the main agent. Workflow:
- Pick a tab (
agent.browsers.list()). domSnapshot()— read what's there, not screenshot (cheaper).- Screenshot only when vision matters.
- If you need to click or type, use the browser tool calls; reload between fixes.
Pointers
webapp-testing— Playwright withscripts/with_server.pyfor apps that need a live backend.web-gui-tester— black-box methodology: planning P0-P3, action→observation with code+visual cross-validation, final report. Use when validating user flows end-to-end, not when debugging one page.frontend-design— load when the issue is aesthetic, not functional.
Failure modes worth knowing
- CDN unreachable from the test environment →
requestfailedfor jsdelivr / cdn.datatables / googleapis. The page appears empty even though the HTML is fine. Document this; do not "fix" by inlining libraries. - Charts render but to zero size → usually a flex/grid issue with a parent.
locator("canvas").bounding_box()to confirm. wait_until="networkidle"times out → either CDN hangs or a script has a long-running poll. Fall back towait_until="load"+ a fixedwait_for_timeout.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

