Skip to content
Agentmart
Submit a tool

browser-testing

VERIFY your changes work.

Skill by benchflow-ai

IndexedApache-2.0★ 1,870
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/benchflow-ai-browser-testing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

VERIFY your changes work. Measure CLS, detect theme flicker, test visual stability, check performance. Use BEFORE and AFTER making changes to confirm fixes. Includes ready-to-run scripts: measure-cls.ts, detect-flicker.ts

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/browser-testing

What's inside

Skill name
browser-testing
Description
VERIFY your changes work. Measure CLS, detect theme flicker, test visual stability, check performance. Use BEFORE and AFTER making changes to confirm fixes. Includes ready-to-run scripts: measure-cls.ts, detect-flicker.ts
License
Apache-2.0
Instructions
196 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network

Files (4)

  • SKILL.md
  • detect-flicker.ts
  • measure-cls.ts
  • measure.ts

SKILL.md (first lines)

# Performance Measurement with Playwright CDP

Diagnose performance issues by measuring actual load times and network activity.

**Playwright is pre-installed.** Just use the measurement script.

## Quick Start

A `measure.ts` script is included in this skill's directory. Find it and run:

```bash
# Measure a page (outputs JSON with waterfall data)
npx ts-node <path-to-this-skill>/measure.ts http://localhost:3000

# Measure an API endpoint
npx ts-node <path-to-this-skill>/measure.ts http://localhost:3000/api/products
```

The script is in the same directory as this SKILL.md file.

## Understanding the Output

The script outputs JSON with:

```json
{
  "url": "http://localhost:3000",
  "totalMs": 1523,
  "requests": [
    { "url": "http://localhost:3000/", "ms": 45.2 },
    { "url": "http://localhost:3000/api/products", "ms": 512.3 },
    { "url": "http://localhost:3000/api/featured", "ms": 301.1 }
  ],
  "metrics": {
    "JSHeapUsedSize": 4521984,
    "LayoutCount": 12,
    "ScriptDuration": 0.234
  }
}
```

### Reading the Waterfall

The `requests` array shows network timing. Look for **sequential patterns**:

```
BAD (sequential - each waits for previous):
  /api/products    |████████|                        512ms
  /api/featured             |██████|                 301ms  (starts AFTER products)
  /api/categories                  |████|            201ms  (starts AFTER featured)
  Total: 1014ms

GOOD (parallel - all start together):
  /api/products    |████████|                        512ms
  /api/featured    |██████|                          301ms  (starts SAME TIME)
  /api/categories  |████|                            201ms  (starts SAME TIME)
  Total: 512ms (just the slowest one)
```

### Key Metrics

| Metric | What it means | Red flag |
|--------|---------------|----------|
| `totalMs` | Total page load time | > 1000ms |
| `JSHeapUsedSize` | Memory used by JS | Growing over time |
| `LayoutCount` | Layout recalculations | > 50 per page |
| `ScriptDuration` | Time in JS execution | > 0.5s |

## What to Look For

| Symptom | Likely Cause | Fix |
|---------|--------------|-----|
| Requests in sequence | Sequential `await` statements | Use `Promise.all()` |
| Same URL requested twice | Fetch before cache check | Check cache first |
| Long time before response starts | Blocking operation before sending | Make it async/non-blocking |
| High LayoutCount | Components re-rendering | Add `React.memo`, `useMemo` |

## Measuring API Endpoints Directly

For quick API timing without browser overhead:

```typescript
async function measureAPI(url: string) {
  const start = Date.now();
  const response = await fetch(url);
  const elapsed = Date.now() - start;
  return { url, time_ms: elapsed, status: response.status };
}

// Example
const endpoints = [
  'http://localhost:3000/api/products',
  'http://localhost:3000/api/products?cache=false',
  'http://localhost:3000/api/checkout',
];

for (const endpoint of endpoints) {
  const result = await measureAPI(endpoint);
  console.log(`${endpoint}: ${result.time_ms}ms`);
}
```

## How the Measurement Script Works

The script uses Chrome DevTools Protocol (CDP) to intercept browser internals:

1. **Network.requestWillBeSent** - Event fired when request starts, we record timestamp
2. **Network.responseReceived** - Event fired when response arrives, we calculate duration
3. **Performance.getMetrics** - Returns Chrome's internal counters (memory, layout, script time)

This gives you the same data as Chrome DevTools Network tab, but programmatically.

## Visual Stability Measurement

### Measure CLS (Cumulative Layout Shift)

```bash
npx ts-node <path-to-this-skill>/measure-cls.ts http://localhost:3000
```

From benchflow-ai/skillsbench, Apache-2.0.

More from benchflow-ai/skillsbench

Signals

Stars
1,870
Forks
372
Open issues
50
Last commit (this folder)
Jan 23, 2026 (9 months ago)
Last release
Jun 14, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from benchflow-ai

Cite this page

browser-testing skill. Agent Mart. https://agentmart.dev/skills/benchflow-ai-browser-testing (last updated 2026-10-24)