Agent Skills › lobehub/lobehub › debug-frontend-with-browser

debug-frontend-with-browser

GitHub

用于定位前端间歇性UI、状态陈旧及导航等浏览器端Bug。通过边界追踪和回归诊断,在隔离环境中复现症状并对比状态,找出数据出错的首个边界,提供修复指导。

.agents/skills/debug-frontend-with-browser/SKILL.md lobehub/lobehub

Trigger Scenarios

前端界面出现间歇性错误 状态陈旧或数据不同步 导航或渲染顺序异常 仅浏览器环境下的特定缺陷

Install

npx skills add lobehub/lobehub --skill debug-frontend-with-browser -g -y
More Options

Non-standard path

npx skills add https://github.com/lobehub/lobehub/tree/canary/.agents/skills/debug-frontend-with-browser -g -y

Use without installing

npx skills use lobehub/lobehub@debug-frontend-with-browser

指定 Agent (Claude Code)

npx skills add lobehub/lobehub --skill debug-frontend-with-browser -a claude-code -g -y

安装 repo 全部 skill

npx skills add lobehub/lobehub --all -g -y

预览 repo 内 skill

npx skills add lobehub/lobehub --list

SKILL.md

Frontmatter
{
    "name": "debug-frontend-with-browser",
    "description": "Use for intermittent UI, stale state, ordering, navigation or browser-only bugs. Extends acceptance with boundary tracing and regression diagnosis."
}

Debug Frontend with Browser

Find the first boundary where correct data becomes incorrect. This skill extends acceptance; it does not define a separate test workflow.

Mandatory foundation

Before any browser, Electron, network, cache, or application interaction:

  1. Read ../acceptance/SKILL.md and the project's PROCESS.md in full.
  2. Follow its target grounding, living logs, project adapter, environment and auth checks, approval gate, evidence rules, publication, and teardown.
  3. Enter this diagnostic workflow only after acceptance has established the approved execution surface. If its environment or auth gate is blocked, stop there instead of inventing another execution path.
  4. Use the isolated environment and fixture strategy selected by the project adapter. Never use the user's signed-in production browser or Electron client as a fixture container or test sandbox.
  5. Treat an explicit production investigation as read-only unless the user separately authorizes an exact live mutation and the project adapter permits it. This skill never grants production-mutation authority.
  6. Never read secret files or print credentials, tokens, private content, or full live objects. Return structural projections only.

If acceptance is unavailable, say so and stop before touching a live surface.

Responsibility boundary

acceptance owns This skill adds
Environment isolation and service lifecycle Falsifiable symptom and event timeline
Authentication and fixture seeding Boundary-by-boundary state comparison
Browser/Electron driver setup Safe minimal fixture extraction
Approval and mutation authority Pure-function replay and commit A/B
Evidence, report, publication, teardown Earliest-boundary fix guidance

Do not duplicate or weaken acceptance rules here. When the two skills appear to conflict, acceptance and the project layer control execution.

Diagnostic workflow

1. Make the symptom falsifiable

Write one expected invariant and one observed violation. Record:

  • the triggering action;
  • state before, during, and after it;
  • whether navigation, remount, refresh, tab switching, or waiting changes it;
  • stable identifiers required to follow the same entity across layers.

For timing or ordering defects, define the expected and observed event timelines before reading implementation code.

2. Reproduce on the approved isolated surface

  • Reproduce once without recording to prove the path.
  • For an intermittent defect, repeat the same controlled action and record the hit rate.
  • Verify the intended action through a new ID, request, or state transition.
  • Use a GIF or video for flicker and other time-based behavior.
  • Re-snapshot after navigation or a major render because element references expire.

Use the surface and capture method chosen by acceptance; do not relaunch or reattach to the user's resident application.

3. Find the first broken boundary

Compare the same entity IDs at each layer and mark each boundary correct or incorrect.

Boundary Inspect What it distinguishes
DOM / visible row Text, order, recording Symptom only
Renderer input Component props, virtual-list data Renderer vs upstream input
Derived state Selectors, parsed/display items Derivation vs raw state
Raw client state Store records, SWR state, persisted cache Cache vs transformation
Network / server Structural response and persisted row Client vs server
Pure transformation Exact parser/normalizer input Runtime vs deterministic logic

Important:

  • DOM absence is not state absence in a virtualized list.
  • Retained tabs can own multiple React roots and stores; qualify them by stable IDs and the visible route.
  • For cache defects, distinguish in-memory fetch cache, Zustand state, persisted cache, and server state instead of calling all of them "the cache."
  • Stop expanding the search when a pure local function reproduces the exact invalid output.

4. Build the smallest safe fixture

Create the fixture through the isolated environment's supported seed path. Keep only fields required by the suspected boundary, such as:

  • id, type or role, parent linkage, and timestamps;
  • cache key and lifecycle state;
  • branch or group metadata;
  • entity identifiers that affect selection or grouping.

Store reusable inputs through the project's fixture layout. Do not copy private production content into fixtures or tracked files.

5. Attribute with the same fixture

Do not infer causality from PR timing or filenames.

  1. Run the same fixture against the suspected revision and its real parent.
  2. Compare the same observable boundary, not two different screenshots.
  3. Verify the commit parent, PR file list, merge time, and deployment timing.
  4. Separate the revision that introduced the latent bug from the data event that first exposed it.

6. Fix the earliest incorrect boundary

  • Change the layer that first produces invalid state.
  • Preserve unrelated branch, optimistic-update, and cache semantics.
  • Add a behavior-level regression test with the sanitized minimal fixture.
  • Add a JSDoc comment when the fix protects a non-obvious invariant.
  • Do not substitute timeouts, refreshes, DOM sorting, or downstream filters for a source-state fix.

7. Return to the acceptance workflow for verification

After diagnosis or a fix, resume the parent acceptance workflow. It owns the focused checks, isolated visual replay, evidence inspection, structured report, publication, and cleanup. Do not publish a separate browser-debugging verdict.

Diagnostic supplements

Read references/pitfalls.md when the suspected boundary involves retained React roots, virtualized data, optimistic reconciliation, stale client caches, pure replay, or regression attribution.

Version History

  • e0d4b61 Current 2026-09-23 09:52

    将依赖的上游技能从 agent-testing 重构为 acceptance,收敛测试能力;优化CLI安装逻辑,确保技能文件纳入版本控制以便审查。

  • 29fe043 2026-08-20 18:33

Same Skill Collection

.agents/skills/add-model-provider/SKILL.md
.agents/skills/add-provider-doc/SKILL.md
.agents/skills/add-setting-env/SKILL.md
.agents/skills/agent-runtime-hooks/SKILL.md
.agents/skills/agent-signal/SKILL.md
.agents/skills/agent-testing-bot/SKILL.md
.agents/skills/agent-tracing/SKILL.md
.agents/skills/agent-work/SKILL.md
.agents/skills/alint-ruleset/SKILL.md
.agents/skills/builtin-tool/SKILL.md
.agents/skills/chat-sdk/SKILL.md
.agents/skills/cleanup-git-worktrees/SKILL.md
.agents/skills/cli/SKILL.md
.agents/skills/compose-atoms/SKILL.md
.agents/skills/data-fetching-architecture/SKILL.md
.agents/skills/db-migrations/SKILL.md
.agents/skills/debug-package/SKILL.md
.agents/skills/deep-review/SKILL.md
.agents/skills/design-prototype/SKILL.md
.agents/skills/desktop-security-update/SKILL.md
.agents/skills/desktop/SKILL.md
.agents/skills/docs-changelog/SKILL.md
.agents/skills/drizzle/SKILL.md
.agents/skills/full-text-search/SKILL.md
.agents/skills/heterogeneous-agent/SKILL.md
.agents/skills/hotkey/SKILL.md
.agents/skills/i18n/SKILL.md
.agents/skills/linear/SKILL.md
.agents/skills/llm-generation/SKILL.md
.agents/skills/modal/SKILL.md
.agents/skills/model-bank-metadata/SKILL.md
.agents/skills/product-design/SKILL.md
.agents/skills/project-overview/SKILL.md
.agents/skills/react/SKILL.md
.agents/skills/response-compliance/SKILL.md
.agents/skills/run-eval-harbor/SKILL.md
.agents/skills/skills-audit/SKILL.md
.agents/skills/source-layout/SKILL.md
.agents/skills/spa-routes/SKILL.md
.agents/skills/split-large-file/SKILL.md
.agents/skills/split-micro-app/SKILL.md
.agents/skills/store-data-structures/SKILL.md
.agents/skills/testing-heterogeneous-agents/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/trpc-router/SKILL.md
.agents/skills/typescript/SKILL.md
.agents/skills/upstash-workflow/SKILL.md
.agents/skills/ux-audit/SKILL.md
.agents/skills/ux/SKILL.md

Metadata

Files
0
Version
aace12f
Hash
c4e5a7fc
Indexed
2026-08-20 18:33

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-24 15:04
浙ICP备14020137号-1