Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计异常

playwright-network-analyzerPlaywright network 分析器

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

294

周安装

12

GitHub Stars

1

下载量

94
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:playwright-network-analyzer(Playwright network 分析器)
来源仓库:https://github.com/dawiddutoit/custom-claude
仓库路径:skills/playwright-network-analyzer
安装命令:
npx skills add https://github.com/dawiddutoit/custom-claude --skill playwright-network-analyzer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill playwright-network-analyzer

简介

用于辅助测试设计、自动化测试和回归验证。

  • 适合编写单元测试、端到端测试或根据失败日志定位问题。
  • 使用时需确认项目测试框架、运行命令和夹具数据。
  • 涉及浏览器或外部服务时,应区分本地模拟与生产环境。
  • playwright-network-analyzer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Playwright Network Analyzer

Quick Start

Analyze network traffic during a user login flow:

You: "Analyze network requests during login to example.com with user@test.com"

Claude invokes playwright-network-analyzer skill:
1. Navigates to example.com/login
2. Clears previous network requests
3. Fills login form and submits
4. Captures all network requests
5. Generates report showing:
   - 2 failed API calls (401, 500)
   - 3 slow requests (>1s)
   - Total: 15 requests (8 API, 7 static)

Table of Contents

  1. When to Use This Skill
  2. What This Skill Does
  3. Workflow Steps
  4. Analysis Categories
  5. Supporting Files
  6. Expected Outcomes
  7. Requirements
  8. Utility Scripts
  9. Red Flags to Avoid

When to Use This Skill

Explicit Triggers

  • "Analyze network requests during [workflow]"
  • "Check API calls on [page/feature]"
  • "Monitor network traffic while [action]"
  • "Debug API errors in [feature]"
  • "Performance analysis for [user flow]"
  • "Show me network activity when [scenario]"

Implicit Triggers

  • Investigating why a feature fails intermittently
  • Checking if API endpoints return expected status codes
  • Validating third-party integrations (analytics, CDNs)
  • Verifying authentication flows
  • Debugging CORS or network errors

Debugging Triggers

  • "Why is this page slow?"
  • "Is the API call working?"
  • "Are there failed requests?"
  • "What endpoints are being called?"

What This Skill Does

  1. Automated Network Monitoring - Captures all HTTP requests during browser workflows
  2. Request Categorization - Separates API calls from static resources (images, CSS, JS)
  3. Error Detection - Identifies failed requests (4xx, 5xx status codes)
  4. Performance Analysis - Flags slow requests (>1s response time)
  5. Pattern Recognition - Detects repeated requests, missing resources, CORS issues
  6. Structured Reporting - Generates categorized reports with actionable insights

Workflow Steps

Step 1: Navigate to Application

Use browser_navigate to load the target page:

Navigate to: https://app.example.com/dashboard
Wait for page load completion

Step 2: Clear Previous Network Requests

Call browser_network_requests to establish baseline:

Action: Read and clear existing requests
Purpose: Start with clean slate for accurate analysis

Step 3: Execute User Workflow

Perform the user actions to monitor:

Examples:
- Click login button → Fill form → Submit
- Navigate to products → Add to cart → Checkout
- Upload file → Wait for processing → Download result
- Search → Filter results → Click item

Use these tools as needed:

  • browser_click - Click buttons, links, elements
  • browser_fill_form - Enter form data
  • browser_type - Type text into inputs
  • browser_wait_for - Wait for elements or text

Step 4: Capture All Network Requests

Call browser_network_requests after workflow completes:

Options:
- includeStatic: true/false (include images, CSS, JS)
- urlPattern: filter by URL substring
- limit: max requests to return

Step 5: Filter and Categorize

Use the analysis script to process requests:

python scripts/analyze_network.py requests.json \
  --threshold 1000 \
  --report report.md

Categories:

  • Failed Requests - 4xx (client errors), 5xx (server errors)
  • API Calls - Endpoints returning JSON/XML (exclude static resources)
  • Slow Requests - Response time >1s (configurable threshold)
  • Static Resources - Images, CSS, JS, fonts
  • Redirects - 3xx status codes

Step 6: Generate Report

Create structured analysis with:

Summary Section:

  • Total requests
  • API vs static breakdown
  • Error count
  • Slow request count

Failed Requests:

❌ POST /api/auth/login - 401 Unauthorized (250ms)
❌ GET /api/users/profile - 500 Internal Server Error (1.2s)

Slow Requests (>1s):

🐌 GET /api/products?limit=100 - 200 OK (2.3s)
🐌 GET /api/reports/export - 200 OK (5.1s)

API Calls:

✅ POST /api/auth/login - 200 OK (250ms)
✅ GET /api/dashboard - 200 OK (450ms)

Step 7: Identify Potential Issues

Common patterns to flag:

  • Same endpoint called multiple times (N+1 queries)
  • Missing resources (404s for CSS/JS/images)
  • CORS errors (check console messages)
  • Slow endpoints (candidates for optimization)
  • Unauthenticated API calls (401s suggesting auth issues)
  • Server errors (500s indicating backend problems)

Supporting Files

scripts/analyze_network.py

Python utility for processing network request JSON and generating categorized reports. Includes:

  • Request filtering by status code, URL pattern, timing
  • Categorization (API vs static, success vs error)
  • Markdown report generation
  • CSV export for spreadsheet analysis

Usage:

# Basic analysis
python scripts/analyze_network.py requests.json

# With custom threshold for "slow" (2 seconds)
python scripts/analyze_network.py requests.json --threshold 2000

# Filter to specific domain
python scripts/analyze_network.py requests.json --domain api.example.com

# Export to CSV
python scripts/analyze_network.py requests.json --csv output.csv

references/network_patterns.md

Common network issues and their signatures:

  • N+1 query detection patterns
  • CORS error identification
  • Authentication flow validation
  • CDN vs origin server patterns
  • API versioning issues

examples/example_analysis.md

Sample network analysis reports for:

  • Login flow (authentication, session creation)
  • E-commerce checkout (payment gateway integration)
  • File upload workflow (multipart, progress)
  • SPA navigation (lazy loading, route changes)

Expected Outcomes

Successful Analysis

✅ Network Analysis Complete

Workflow: Login to dashboard
Duration: 3.2s
Total Requests: 18

Summary:
  ✅ API Calls: 8 (7 successful, 1 failed)
  📦 Static Resources: 10 (all successful)
  🐌 Slow Requests: 2 (>1s)
  ❌ Failed Requests: 1

Failed Requests:
  ❌ POST /api/user/preferences - 500 Internal Server Error (1.1s)

Slow Requests:
  🐌 GET /api/dashboard/widgets - 200 OK (2.3s)
  🐌 GET /cdn/images/banner.png - 200 OK (1.5s)

Issues Identified:
  ⚠️ Preferences API failing (500 error)
  ⚠️ Dashboard widget endpoint slow (2.3s)
  ℹ️ Large image file from CDN (consider optimization)

Recommendations:
  1. Fix /api/user/preferences endpoint (server error)
  2. Optimize dashboard widget query (2.3s response)
  3. Compress banner.png or use responsive images

Analysis with Patterns

✅ Network Analysis Complete

Pattern Detected: N+1 Query Problem
  GET /api/products - 200 OK (150ms)
  GET /api/products/1/details - 200 OK (80ms)
  GET /api/products/2/details - 200 OK (85ms)
  GET /api/products/3/details - 200 OK (90ms)
  ... (12 more similar requests)

Recommendation: Use batch endpoint or include details in /api/products response

Integration Points

With Browser Automation Workflows

  • Invoke during existing Playwright automation
  • Add network monitoring to regression tests
  • Validate API contracts during E2E tests

With Performance Monitoring

  • Establish baseline request timings
  • Track performance regressions over time
  • Identify optimization opportunities

With API Testing

  • Verify expected endpoints are called
  • Check request/response payloads
  • Validate authentication flows

Expected Benefits

MetricBeforeAfter
Time to identify API issues15-30 min (manual)1-2 min (automated)
Network debugging accuracy~60% (guessing)~95% (data-driven)
Performance bottleneck discoveryAd-hocSystematic
Failed request detectionReactive (user reports)Proactive (automated)

Success Metrics

  • Coverage - Network requests captured during critical user flows
  • Detection Rate - % of API issues identified before user reports
  • Analysis Speed - Time from workflow execution to actionable report
  • Actionability - % of reports leading to specific fixes

Requirements

Tools

  • Playwright MCP server enabled (browser automation tools)
  • Python 3.8+ (for analysis script)
  • Browser with network monitoring capability

Environment

  • Active Playwright browser session
  • Network requests recording enabled (default)

Knowledge

  • Basic understanding of HTTP status codes
  • Familiarity with API vs static resource distinction
  • Understanding of web application architecture

Utility Scripts

scripts/analyze_network.py

Python utility for processing network request JSON and generating categorized reports.

Usage:

python scripts/analyze_network.py requests.json [--threshold 2000] [--domain api.example.com] [-o report.md] [--csv output.csv]

Features: JSON parsing, filtering, categorization (API/static, success/error, fast/slow), Markdown/CSV export, pattern detection (N+1 queries, CORS issues).

Red Flags to Avoid

  • Analyzing network requests without clearing previous data (baseline contamination)
  • Including static resources in API analysis (skews error rates)
  • Using arbitrary thresholds for "slow" without context (1s may be fast for some endpoints)
  • Ignoring successful redirects (3xx can be normal flow)
  • Not filtering by URL pattern when analyzing specific features
  • Forgetting to wait for async requests to complete
  • Analyzing network traffic without user workflow context
  • Reporting all issues as critical (prioritize by impact)
  • Not checking console messages for CORS/JS errors
  • Assuming correlation = causation (slow request ≠ always a problem)

Notes

  • Request timing includes network latency + server processing + response transfer (full lifecycle)
  • CORS errors require checking console messages (use read_console_messages tool)
  • Static filtering use includeStatic: false in browser_network_requests to focus on API calls
  • Rate limiting indicated by multiple failed requests to same endpoint (429 status)
  • Progressive enhancement start with basic categorization, add pattern detection as needed

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.95%
按下载量换算32

Claude

32.04%
按下载量换算30

Cursor

17.26%
按下载量换算16

Gemini CLI

8.61%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills