랭킹으로 돌아가기

nucliweb/webperf-snippets

JavaScriptwebperf-snippets.nucliweb.net

⚡️ 💾 Web Performance Snippets

performanceperformance-analysisperformance-metricssnippetswebperfwebperformancewebvitals
스타 성장
스타
1.4k
포크
86
주간 성장
이슈
8
5001k
2022년 5월2023년 9월2025년 2월2026년 7월
아티팩트npmnpm install webperf-snippets
README

WebPerf Snippets

A curated collection of JavaScript snippets to measure and debug Web Performance directly in your browser's DevTools console.

CI Release Snippets License Star History

WebPerf Snippets

Start here

What you can measure

Category What it includes
Core Web Vitals LCP, CLS, INP - the metrics that impact SEO and user experience
Loading TTFB, resource hints, scripts, fonts, images, render-blocking resources
Interaction Long Animation Frames, event timing, responsiveness

How to use

Option 1: Run in browser console

  1. Copy any snippet from webperf-snippets.nucliweb.net
  2. Open DevTools (F12 or Cmd+Option+I / Ctrl+Shift+I)
  3. Go to the Console tab
  4. Paste and press Enter

Option 2: Save as DevTools Snippet

Save frequently used snippets for quick access:

  1. Open DevTools → Sources tab → Snippets panel
  2. Click + New snippet
  3. Name it (e.g., "LCP")
  4. Paste the code
  5. Right-click → Run (or Cmd+Enter / Ctrl+Enter)

Video tutorial

https://github.com/nucliweb/webperf-snippets/assets/1307927/2987a2ca-3eef-4b73-8f6b-7b1e06b50040

Agent Skills for AI Coding Assistants

WebPerf Snippets can be used as Agent Skills with AI coding assistants like Claude Code, Cursor, OpenCode, Gemini CLI, and more for automated performance analysis.

Installation

Option 1: Using skills CLI (recommended)

npx skills add nucliweb/webperf-snippets

Installs directly from GitHub repository to ~/.claude/skills/.

Option 2: Install locally (project-specific)

git clone https://github.com/nucliweb/webperf-snippets.git
cd webperf-snippets
npm run install-skills

This installs skills to .claude/skills/ in your project directory.

Option 3: Install globally (for contributors)

git clone https://github.com/nucliweb/webperf-snippets.git
cd webperf-snippets
npm run install-global

This installs skills to ~/.claude/skills/ for use across any project.

Available Skills

Skill Snippets Description
webperf 49 Main entry point for all web performance analysis
webperf-core-web-vitals 7 LCP, CLS, INP measurements with detailed breakdowns
webperf-loading 29 TTFB, FCP, script/font analysis, resource hints, service workers
webperf-interaction 8 Long tasks, animation frames, scroll jank, INP debugging
webperf-media 3 Image/video audits, lazy loading validation, SVG analysis
webperf-resources 1 Network bandwidth, connection quality, adaptive loading

Intelligent Workflows & Decision Trees

Skills include built-in workflows and decision trees that enable autonomous performance analysis:

Workflows - Predefined sequences for common scenarios:

  • Complete loading audit (6 snippets)
  • Server performance investigation (4 snippets)
  • Font loading optimization (3 snippets)
  • Script performance deep dive (6 snippets)
  • And more...

Decision Trees - Conditional logic based on results:

  • If TTFB > 600ms → automatically run TTFB-Sub-Parts.js
  • If FCP > 1.8s → run render-blocking resource analysis
  • If many third-party scripts detected → analyze timing and impact
  • And 15+ more intelligent triggers

Example interaction:

User: "Analyze loading performance"

Agent:
1. Runs TTFB.js → detects 750ms (slow)
2. Follows decision tree → runs TTFB-Sub-Parts.js
3. Identifies DNS + server time issues
4. Runs Service-Worker-Analysis.js
5. Provides consolidated report with specific fixes

Usage

Skills activate automatically when matched:

Audit this page for Core Web Vitals
Analyze loading performance
Check for image optimization issues
Debug slow LCP
Why is my TTFB so high?

Skills are compatible with Chrome DevTools MCP for automated browser-based performance auditing.

Supported agents: Claude Code, Cursor, OpenCode, Gemini CLI, VS Code extensions, and many more.

CLI

The repository includes a headless CLI (cli/) that runs WebPerf Snippets via Playwright — useful for CI pipelines and performance budgeting without copy-pasting into DevTools.

npx webperf-snippets https://web.dev --budget-lcp 2500 --budget-cls 0.1

See cli/README.md for installation, usage, and CI integration. The CLI is published to npm as webperf-snippets via a tag-based release workflow — pushing a cli-v* tag triggers the publish pipeline.

Documentation

Visit webperf-snippets.nucliweb.net for the full documentation with all snippets.

Resources

Star History

Star History Chart
관련 저장소
gin-gonic/gin

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

GoGo ModulesMIT Licenseservermiddleware
gin-gonic.com
88.9k8.7k
gofiber/fiber

⚡️ Express inspired web framework written in Go

GoGo ModulesMIT Licensegogolang
gofiber.io
40k2k
fastify/fastify

Fast and low overhead web framework, for Node.js

JavaScriptnpmMIT Licensewebframeworkperformance
fastify.dev
36.8k2.8k
solidjs/solid

A declarative, efficient, and flexible JavaScript library for building user interfaces.

TypeScriptnpmMIT Licensejavascriptperformance
solidjs.com
35.8k1.1k
lovell/sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.

JavaScriptnpmApache License 2.0javascriptwebp
sharp.pixelplumbing.com
32.5k1.4k
grafana/k6

A modern load testing tool, using Go and JavaScript

GoGo ModulesGNU Affero General Public License v3.0golangload-testing
grafana.com/oss/k6/
31.1k1.6k
locustio/locust

Write scalable load tests in plain Python 🚗💨

PythonPyPIMIT Licenselocustpython
locust.cloud
28k3.2k
bvaughn/react-virtualized

React components for efficiently rendering large lists and tabular data

JavaScriptnpmMIT Licensereactreact-components
bvaughn.github.io/react-virtualized/
27.1k3k
fmtlib/fmt

A modern formatting library

C++MIT Licenseformattingprintf
fmt.dev
23.7k2.9k
gofr-dev/gofr

An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.

GoGo ModulesApache License 2.0gogolang
gofr.dev
21.1k1.8k
Atlas-OS/Atlas

🚀 An open and lightweight modification to Windows, designed to optimize performance, privacy and usability.

BatchfileGNU General Public License v3.0windowsperformance
atlasos.net
21.1k737
avajs/ava

Node.js test runner that lets you develop with confidence 🚀

JavaScriptnpmMIT Licensetest-runnerava
20.8k1.5k