performance-audit
Performance Audit Skill
Analyze web page performance using Web Vitals and network timing metrics.
When to Use
This skill activates when:
- User asks about page performance or speed
- User wants to optimize load times
- User mentions slow page, slow API, or poor user experience
- User needs Core Web Vitals metrics
- User asks about backend bottlenecks or TTFB
- User asks about SEO performance factors
Capabilities
Web Vitals Analysis
browser-devtools-cli o11y get-web-vitals
browser-devtools-cli --json o11y get-web-vitals
browser-devtools-cli --json o11y get-web-vitals --wait-ms 3000
browser-devtools-cli --json o11y get-web-vitals --include-debug
Network Performance
browser-devtools-cli --json o11y get-http-requests
browser-devtools-cli --json o11y get-http-requests --resource-type script
browser-devtools-cli --json o11y get-http-requests --resource-type stylesheet
browser-devtools-cli --json o11y get-http-requests --status '{"min":400}'
Visual Analysis
browser-devtools-cli content take-screenshot --name "above-fold"
browser-devtools-cli content take-screenshot --name "full-page" --full-page
Performance Thresholds
| Metric | Good | Needs Work | Poor |
|---|---|---|---|
| LCP | ≤2.5s | 2.5-4s | >4s |
| INP | ≤200ms | 200-500ms | >500ms |
| CLS | ≤0.1 | 0.1-0.25 | >0.25 |
| TTFB | ≤800ms | 800-1800ms | >1800ms |
| FCP | ≤1.8s | 1.8-3s | >3s |
Audit Workflow
SESSION="--session-id perf-audit"
# 1. Navigate to page
browser-devtools-cli $SESSION navigation go-to --url "https://example.com"
# 2. Wait for page to settle
browser-devtools-cli $SESSION sync wait-for-network-idle
# 3. Get Web Vitals
browser-devtools-cli $SESSION --json o11y get-web-vitals --wait-ms 2000
# 4. Analyze network requests
browser-devtools-cli $SESSION --json o11y get-http-requests
# 5. Check for console errors
browser-devtools-cli $SESSION --json o11y get-console-messages --type warning
# 6. Take screenshot for reference
browser-devtools-cli $SESSION content take-screenshot --name "performance-audit"
# 7. Cleanup
browser-devtools-cli session delete perf-audit
Detailed Analysis
Check Large Resources
# Filter by type (one at a time: document, stylesheet, image, script, xhr, fetch, etc.)
browser-devtools-cli --json o11y get-http-requests --resource-type script
browser-devtools-cli --json o11y get-http-requests --resource-type stylesheet
browser-devtools-cli --json o11y get-http-requests --resource-type image
Check Slow Requests
browser-devtools-cli --json o11y get-http-requests
# Look for requests with high timing values
Backend Performance (node-devtools-cli)
When TTFB or API latency suggests backend bottlenecks, inspect the Node.js process:
# Connect to API/server process
node-devtools-cli --session-id perf debug connect --pid 12345
# Tracepoint on slow handler to capture call context
node-devtools-cli --session-id perf debug put-tracepoint \
--url-pattern "routes/heavy.ts" \
--line-number 30
Common Issues
- Large unoptimized images
- Render-blocking CSS/JS
- Too many HTTP requests
- Slow server response (TTFB)
- Layout shifts from dynamic content
- Uncompressed resources
- Missing caching headers
- Third-party scripts blocking main thread
Best Practices
- Run multiple times for consistent results
- Wait for network idle before measuring
- Use --wait-ms for LCP/CLS to settle
- Check network requests for slow/large resources
- Take screenshots at different load stages
- Test on different network conditions (throttle if needed)
- Compare before/after for optimization validation
More from serkan-ozal/browser-devtools-skills
react-debugging
Debug React applications by inspecting components, props, and the component tree. Use when the user is debugging React apps, wants to inspect component props/state, find which component renders an element, or understand the React component hierarchy.
42browser-testing
Automated browser testing, interaction automation, and form testing. Use when the user needs to test web pages, automate browser interactions, fill forms, test validation, run multi-step wizards, or test login/signup flows.
39visual-testing
Visual testing, UI verification, and design comparison using screenshots and Figma integration. Use when the user wants to verify UI appearance, compare with Figma designs, test responsive layouts, check for visual regressions, or validate design implementation.
37browser-devtools-cli
Automates browser interactions using Playwright for web testing, debugging, and automation. Use when the user needs to navigate websites, take screenshots, fill forms, click elements, extract page content (HTML/text), audit accessibility (ARIA/AX tree), measure Web Vitals performance, monitor console logs and HTTP requests, mock API responses, execute JavaScript in browser, inspect React components, compare UI with Figma designs, or perform non-blocking debugging with tracepoints, logpoints, and exception monitoring.
36debugging
Debug web and Node.js applications using console inspection, network analysis, and non-blocking code debugging. Use when the user reports bugs, wants to debug JavaScript (browser or backend), inspect network requests, troubleshoot page/API issues, trace function calls, or monitor exceptions.
30api-testing
Test API integrations by mocking responses, intercepting requests, and monitoring network traffic. Use when the user wants to mock backend APIs, simulate errors, test offline behavior, intercept requests, or add authentication headers.
28