browser-debugging
Skill0 starsChanged 2 months agoMITView on GitHub
A systematic frontend debugging workflow — reproduce first, isolate second, bisect third, verify with DevTools evidence. Covers the classic trapdoors: stale closures, z-index cascades, hydration mismatches, event listener leaks. Use when something is broken and guessing isn't working.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- domucchi/pi-setuptheir own version, first seen Jul 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- domucchi/pi-setup★ 0same 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 repository11 other files it gives its agents.
- api-contract-designSkill
- component-reviewSkill
- css-architectureSkill
- frontend-testing-strategySkill
- nextjs-performanceSkill
- performance-budgetSkill
- react-hooks-disciplineSkill
- state-managementSkill
- typescript-strictnessSkill
- vue3-compositionSkill
- web-a11ySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Double effects in dev StrictMode: don't "fix" by removing StrictMode.
≈ “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
Frontend debugging: evidence over vibes
The loop
Reproduce → isolate → hypothesis → experiment → verify. One variable at a time; write down what you ruled out. If you can't reproduce it, you're not debugging — you're gambling.
- Reproduce reliably: exact URL/state/steps, same viewport, throttled CPU/network if intermittent. Save it as a test when possible.
- Isolate the layer: is it data (network), logic (JS), paint (CSS), or integration (build/env)? DevTools first — console, Network, Elements, Performance — before touching code.
- Bisect: git history (
git bisect) for regressions; component tree (comment out halves) for render bugs; feature flags for config.
Network first (it usually is)
- Filter to the failing request; check status, payload, and timing. A 200 with wrong body is a data bug, not an HTTP bug.
- Reproduce the request in isolation (curl/HTTP file) — separates backend from frontend.
- Watch for the classics: CORS preflight failing, cookie not sent (SameSite), stale SW cache, duplicated requests from double effects.
Render/UI bugs
- Element pick → Computed styles: which rule won, and why (specificity/layers).
@layerorder and inherited vs set properties explain 80% of "my CSS doesn't apply". - Z-index: it's not a number war, it's stacking contexts — find the ancestor creating a context (transform/filter/opacity/will-change) before touching z-values.
- Layout shift: Performance panel → Experience track highlights the shifting element.
- "Works in dev, broken in prod": check minified behavior differences, env config, CDN caching of stale HTML/assets.
Reactivity bugs (the big three)
- Stale closure: a callback captured old state/props. Evidence: value is right in render, wrong in handler. Fix: include the dep, or latest-value ref.
- Double effects in dev StrictMode: don't "fix" by removing StrictMode; make the effect idempotent (proper cleanup) — prod runs once, dev twice by design.
- Hydration mismatch (Next/SSR): server and client rendered different trees. Usual causes:
Date.now()/Math.random()/locale-dependent formatting during render, browser-only APIs. Fix: compute in effects, orsuppressHydrationWarningonly where truly cosmetic.
Leaks & jank
- Memory: Allocation instrumentation on the suspect flow; look for detached DOM held by closures, listeners never removed, timers without cleanup.
- Jank: Performance recording → long tasks → what's blocking (layout thrash from read/write interleaving? giant sync DOM update?).
Verification
The bug is fixed when the failing behavior is covered by a regression test or a checklist entry, not when it "looks right on my machine". Write the test while the repro is fresh.
Definition of done (agent checklist)
- Root cause identified with DevTools evidence, not pattern-matching
- One-variable-at-a-time changes; ruled-out causes noted
- Regression test or documented checklist added
- Similar code paths audited for the same bug class
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.

