Install
openclaw skills install @nucliweb/webperf-resourcesIntelligent network quality analysis with adaptive loading strategies. Detects connection type (2g/3g/4g), bandwidth, RTT, and save-data mode, then automatically triggers appropriate optimization workflows. Includes decision trees that recommend image compression for slow connections, critical CSS inlining for high RTT, and save-data optimizations (disable autoplay, reduce quality). Features connection-aware performance budgets (500KB for 2g, 1.5MB for 3g, 3MB for 4g+) and adaptive loading implementation guides. Cross-skill integration with Loading (TTFB impact), Media (responsive images), and Core Web Vitals (connection impact on LCP/INP). Use when the user asks about slow connections, mobile optimization, save-data support, or adaptive loading strategies. Compatible with Chrome DevTools MCP.
openclaw skills install @nucliweb/webperf-resourcesJavaScript snippets for measuring web performance in Chrome DevTools. Execute with mcp__chrome-devtools__evaluate_script, capture output with mcp__chrome-devtools__get_console_message.
scripts/Network-Bandwidth-Connection-Quality.js — Network Bandwidth & Connection QualityDescriptions and thresholds: references/snippets.md
When the user asks about network performance, connection quality, or adaptive loading:
When implementing adaptive loading or the user asks "how to optimize for slow connections":
When the user asks about save-data or data-saving features:
When the user asks "optimize for mobile" or "slow connection users":
Use this decision tree to automatically run follow-up snippets based on results:
If effectiveType is "slow-2g" or "2g" → Very slow connection, recommend:
If effectiveType is "3g" → Moderate connection, recommend:
If effectiveType is "4g" or better → Good connection, recommend:
If save-data is enabled → User explicitly wants to save data, recommend:
If RTT > 300ms → High latency, recommend:
If downlink < 1 Mbps → Very limited bandwidth, recommend:
If downlink > 10 Mbps → Good bandwidth, consider:
These triggers recommend using snippets from other skills:
If slow connection detected (2g/3g) → Use webperf-loading skill:
If high RTT detected (>200ms) → Use webperf-loading skill:
Based on Network Information API results, implement these strategies:
For slow-2g / 2g (< 50 Kbps):
// Detected by effectiveType: "slow-2g" or "2g"
Strategies:
- Serve low-res images (quality: 30-40)
- Disable autoplay videos
- Remove all prefetch hints
- Inline all critical CSS
- Defer all non-critical JavaScript
- Use system fonts (no webfonts)
- Aggressive lazy loading (load on scroll + buffer)
For 3g (50-700 Kbps):
// Detected by effectiveType: "3g"
Strategies:
- Serve medium-res images (quality: 60-70)
- Disable autoplay videos
- Limited prefetch (critical only)
- Inline critical CSS only
- Defer non-critical JavaScript
- Preload 1-2 critical fonts
- Standard lazy loading
For 4g+ (> 700 Kbps):
// Detected by effectiveType: "4g"
Strategies:
- Serve high-res images (quality: 80-90)
- Allow autoplay videos (muted)
- Strategic prefetch for navigation
- Standard CSS loading
- Standard JavaScript loading
- Preload critical fonts
- Standard lazy loading
For save-data mode:
// Detected by navigator.connection.saveData === true
Strategies:
- Override connection type, treat as worse than actual
- Show "Load high quality" toggle
- Disable autoplay entirely
- Minimal images, minimal quality
- No prefetch, no preload (except critical)
Adjust performance budgets based on connection quality:
slow-2g / 2g:
3g:
4g+:
Scenario: User on 3G reports slow page load
Scenario: User with save-data enabled complains about data usage
Scenario: International users report slow LCP
Scenario: Mobile users in rural areas
Be aware of API limitations and fallbacks:
API not available:
API values are estimates:
Privacy considerations:
To test adaptive loading implementations:
Test matrix:
references/snippets.md — Descriptions and thresholds for each scriptreferences/schema.md — Return value schema for interpreting script outputExecute via
mcp__chrome-devtools__evaluate_script→ read withmcp__chrome-devtools__get_console_message.