debug-frontend-with-browser

Diagnose frontend rendering and state defects by tracing the first broken data boundary.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill debug-frontend-with-browser-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-frontend-with-browser
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/apps/qwk-in-lobe/.agents/skills/debug-frontend-with-browser
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill debug-frontend-with-browser-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Intermittent frontend bugs—stale state, wrong ordering, refresh-dependent rendering, optimistic-update failures—are hard to localize because the visible symptom rarely matches the layer that actually broke. This Skill provides a disciplined diagnostic workflow that finds the first boundary where correct data becomes incorrect, instead of guessing from screenshots or PR timing. ## Core Features & Use Cases - Boundary-by-boundary tracing: Compare the same entity across DOM, component props, derived state, raw client state (Zustand/SWR), network responses, and pure transformation functions to pinpoint the exact failing layer. - Safe fixture replay and regression attribution: Build minimal sanitized fixtures, replay them against a suspected commit and its real parent, and separate the revision that introduced a latent bug from the data event that exposed it. - Acceptance-gated execution: Runs only inside the isolated, approved environment established by the parent acceptance skill, with read-only production handling and no credential or private-content exposure. - Use Case: A virtualized chat list shows a stale message after navigation. Use this Skill to compare raw store records, derived items, and virtual-list IDs, discover that a mutation updated Zustand but not the SWR cache, and fix the earliest incorrect boundary with a regression test. ## Quick Start Use the debug-frontend-with-browser skill to diagnose why the message list shows stale items after navigating back, tracing each state boundary until you find the first incorrect one.

Frequently Asked Questions about debug-frontend-with-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug stale state in a React app after navigation?

Trace the same entity ID across each boundary: DOM, component props, derived selectors, raw store state, and network response. Record the timeline from mutation through optimistic update, cache invalidation, unmount, remount hydration, and revalidation to find where stale data first appears.

How to find which layer causes a frontend rendering bug?

Compare the same entity at each boundary and mark each correct or incorrect: DOM row, renderer input, derived state, raw client state, network response, and pure transformation. Stop expanding the search once a pure local function reproduces the exact invalid output.

Why does a virtualized list show wrong or missing items?

DOM absence is not state absence in a virtualized list, since offscreen rows are recycled while data persists. Compare raw records, derived records, virtual-list IDs, and visible rows separately to distinguish a data defect from a rendering artifact.

Can this skill debug issues directly in a production browser?

No. It requires the isolated environment and fixtures established by the parent acceptance skill, and never uses the user's signed-in production browser as a test sandbox. Production investigation is read-only unless the user explicitly authorizes a specific live mutation.

How do I identify which commit introduced a frontend regression?

Run the same minimal fixture against the suspected revision and its real parent, comparing the same observable boundary. Verify the commit parent, PR file list, and deployment timing, and separate the revision that introduced the latent bug from the data event that exposed it.

Why does a bug disappear after refresh but come back later?

Refresh resets the React root, optimistic buffers, in-memory caches, and revalidation timing, so a correct final frame can hide an earlier stale frame. Reinspect the underlying store and cache state after refresh rather than trusting the visual result.