webperf-snippets

Tested JavaScript snippets that measure and debug web performance. Your AI agent runs them for you, or you run them yourself in DevTools: the same code every ti

What is webperf-snippets?

Tested JavaScript snippets that measure and debug web performance. Your AI agent runs them for you, or you run them yourself in DevTools: the same code every time.

Overview of webperf-snippets

What it is

WebPerf Snippets is a collection of tested JavaScript snippets that measure and debug web performance. The same code can be run by an AI agent (via CLI or Agent Skills) or manually in the DevTools console. Every snippet returns a structured object following a single contract defined in snippets/SCHEMA.md.

Key features

  • Tested JavaScript snippets for web performance measurement and debugging.
  • Can be run by AI agents (via CLI, Agent Skills) or manually in DevTools console.
  • All snippets return structured data following a single contract.
  • Packaged as Agent Skills for Claude Code, Cursor, OpenCode, Gemini CLI, and VS Code extensions, with decision trees and workflows.
  • CLI runs snippets headlessly with Playwright, supports CI integration with budgets and Markdown output.
  • DevTools extension (beta) runs snippets on the inspected page without pasting.
  • 56 snippets across categories: Core Web Vitals, Loading, Interaction, Media, Resources, DevTools Overrides.

Use cases

AI agents audit URLs for performance issues (e.g., slow LCP, high TTFB, image optimization). CI gates pull requests on performance budgets using the CLI. Developers debug performance manually in DevTools by pasting snippets or using the extension.

Getting started

bash npx webperf-snippets https://example.com --json npx skills add nucliweb/webperf-snippets

License and pricing

MIT license, open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/nucliwebwebperf-snippets.svg)](https://yunodb.com/tools/nucliwebwebperf-snippets?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/nucliwebwebperf-snippets?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/nucliwebwebperf-snippets.svg" alt="Featured on YunoDB" height="20"></a>