dvy1987/agent-loom / .agents/skills/browser-testing-with-devtools
browser-testing-with-devtools
VerifiedTest and debug browser UIs using Chrome DevTools MCP — DOM inspection, console errors, network requests, performance traces, and visual verification. Load when building or debugging anything that renders in a browser, verifying a UI fix, profiling Core Web Vitals in a real page, or the user asks for browser testing with DevTools. Requires chrome-devtools MCP configured. Not for backend-only or CLI work. Pairs with frontend-design and performance-optimization.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.3 KB |
| references/examples.md | markdown | 2.3 KB |
references/examples.md
View on GitHub# Browser Testing with DevTools — Full Worked Examples
Skill: `browser-testing-with-devtools` | addyosmani patterns, security-scanned SAFE.
---
## Example 1 — Console error on submit
**Input:** "Save profile fails silently"
**Steps:** Open `/settings`, fill form, click Save.
**Evidence:** Console `422` on `PUT /api/profile`; network response `{"email":["invalid"]}`.
**Fix:** Surface field error in UI; re-verify inline message and 200 on valid email.
---
## Example 2 — Performance trace
**Input:** "Modal feels laggy"
**Trace:** 180ms INP — long task in `useEffect` sorting 4k rows on open.
**Fix:** Virtualize list; re-trace INP under 80ms.
---
## Example 3 — Visual regression
**Input:** "Header overlaps content on mobile"
**Screenshot:** 390px viewport — fixed header z-index covers first paragraph.
**Fix:** Add `scroll-padding-top`; before/after screenshots attached to PR.
---
See `SKILL.md` for hard rules and verification checklist.
---
## Example 4 — Extended pass (L3 enrichment)
## Example 5 — Anti-skip (rationalization defense)
**Input:** Agent tries to skip a gate
| Excuse | Reality |
|---|---|
| "The code looks correct" | Runtime DOM, CSS cascade, and race conditions disagree. |
| "Unit tests cover it" | JSDOM does not run full layout, fonts, or real network. |
| "I'll check the browser later" | Later never comes; verify before marking done. |
| "MCP is too heavy" | One screenshot + console read often saves hours of guesswork. |
| "It's just a CSS tweak" | Tweaks cause CLS and overflow bugs visible only live. |
## Example 6 — Step-by-step execution
**Input:** "Run `browser-testing-with-devtools` on [concrete task]"
**Agent actions:**
1. Define what to verify
2. Navigate and observe
3. Diagnose
4. Fix in code, re-verify
5. Report
## Example 7 — Gotcha application
**Apply:**
- Stale service worker caches mask fixes — hard refresh or disable SW when debugging.
- Flaky tests from animation timing — wait for stable selectors.
- `--autoConnect` exposes personal cookies and history.
- Executing arbitrary JS in page can mutate production-like data.
-
## Verification checklist (L3)
- [ ] Examples align with SKILL.md hard rules
- [ ] Anti-skip or rationalization pattern shown
- [ ] Output shape matches Impact Report
- [ ] User can trace from input → durable artifact or chat outcome
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |