MCP HubMCP Hub
SKILL·8EA8CF

high-perf-browser

wondelai
업데이트됨 15 days ago
5 조회
2,020
206
2,020
GitHub에서 보기
디자인design

정보

이 스킬은 네트워크 프로토콜, 리소스 로딩, 브라우저 렌더링 내부 구조를 다루어 웹 성능을 최적화하는 체계적인 프레임워크를 제공합니다. 페이지 로딩 속도 진단, 코어 웹 바이탈 최적화, HTTP/2, 캐싱 전략, 중요 경로 최적화 등의 기법 구현 시 활용하세요. 서버 설정, 성능 예산 관리, 번들 크기 축소를 통해 더 빠른 애플리케이션을 구축하는 방법을 다룹니다.

빠른 설치

Claude Code

추천
기본
npx skills add wondelai/skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/wondelai/skills
Git 클론대체
git clone https://github.com/wondelai/skills.git ~/.claude/skills/high-perf-browser

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

High Performance Browser Networking Framework

A systematic approach to web performance grounded in how browsers, protocols, and networks actually work. Apply these principles when building frontend applications, setting performance budgets, configuring servers, or diagnosing slow page loads.

Core Principle

Latency, not bandwidth, is the bottleneck. Most web performance problems stem from too many round trips, not too little throughput. A 5x bandwidth increase yields diminishing returns; a 5x latency reduction transforms the user experience.

The foundation: Every request passes through DNS resolution, TCP handshake, TLS negotiation, and HTTP exchange before a single byte of content arrives — each step adding round-trip latency. High-performance applications minimize round trips, parallelize requests, and eliminate unnecessary network hops. Understanding the protocol stack is the prerequisite for meaningful optimization.

Scoring

Goal: 10/10. Score by how many of the eight Quick Diagnostic rows pass, weighted toward the field metrics: 9-10 = all eight pass (the four field-metric rows in the green plus content-hashing, HTTP/2+, minimized render-blocking, and compression); 5-6 = the four field-metric rows pass but one or more transport/caching/compression rows fail; <=3 = any field-metric row is in the red. Always report the score, which diagnostic rows failed, and the specific fix for each.

The High Performance Browser Networking Framework

Six domains for building fast, resilient web applications:

1. Network Fundamentals

Core concept: Every HTTP request pays a latency tax — DNS lookup, TCP three-way handshake, TLS negotiation — before any application data flows. Reducing or eliminating these round trips is the single highest-leverage optimization.

Why it works: Light travels at a finite speed: a New York–London packet takes ~28ms one way regardless of bandwidth. These physics-level constraints cannot be solved with bigger pipes — only with fewer trips.

Key insights:

  • TCP three-way handshake adds one full RTT before data transfer begins
  • TCP slow start limits initial throughput to ~14KB (10 segments) in the first round trip — keep critical resources under this threshold
  • Upgrade to TLS 1.3: it halves the handshake round trips of TLS 1.2 and enables 0-RTT resumption for returning visitors
  • Head-of-line blocking in TCP means one lost packet stalls all streams on that connection
  • Bandwidth-delay product caps in-flight data; high-latency links underutilize bandwidth

Code applications:

ContextPatternExample
Connection warmupPre-establish connections to critical origins<link rel="preconnect" href="https://cdn.example.com">
DNS prefetchResolve third-party domains early (saves 20-120ms)<link rel="dns-prefetch" href="https://analytics.example.com">
TLS optimizationTLS 1.3 + session resumptionssl_protocols TLSv1.3; with session tickets
Connection reuseKeep-alive avoids repeated handshakesConnection: keep-alive (default in HTTP/1.1+)

See references/network-fundamentals.md when tuning servers or diagnosing handshake latency — the full TLS 1.2-vs-1.3 RTT derivation, slow-start doubling table, initcwnd/BDP math, OCSP-stapling Nginx config, and the DNS cache hierarchy.

2. HTTP Protocol Evolution

Core concept: HTTP evolved from a simple request-response protocol into a multiplexed, binary system. Choosing the right protocol version and configuring it properly eliminates entire categories of performance problems.

Why it works: HTTP/1.1 forces workarounds (domain sharding, sprites, concatenation) because it cannot multiplex. HTTP/2 multiplexes but inherits TCP head-of-line blocking; HTTP/3 (QUIC over UDP) eliminates it. Each generation removes a bottleneck — and makes the previous generation's workarounds counterproductive.

Key insights:

  • HTTP/1.1 allows one outstanding request per TCP connection; browsers open 6 per host as a workaround
  • HTTP/2 multiplexes unlimited streams over one connection — domain sharding becomes counterproductive
  • HPACK header compression in HTTP/2 cuts repetitive header overhead by 85-95%
  • HTTP/3 (QUIC) eliminates TCP head-of-line blocking and enables 0-RTT resumption and connection migration
  • Prefer 103 Early Hints over HTTP/2 Server Push (which over-pushes and is widely deprecated)
  • Connection coalescing lets one HTTP/2 connection serve multiple hostnames sharing a certificate

Code applications:

ContextPatternExample
HTTP/2 migrationRemove HTTP/1.1 workaroundsUndo domain sharding, sprites, file concatenation
103 Early HintsSend preload hints before the full response103 with Link: </style.css>; rel=preload
QUIC/HTTP/3Advertise HTTP/3 on CDN or originAlt-Svc: h3=":443" header
Stream prioritizationSignal resource importanceCSS and fonts highest priority; images lower

See references/http-protocols.md when picking or migrating a protocol version — side-by-side HTTP/1.1-vs-2-vs-3 comparison, the step-by-step de-sharding migration, and why Server Push lost to 103 Early Hints.

3. Resource Loading and Critical Rendering Path

Core concept: The browser must build the DOM, CSSOM, and render tree before painting pixels: HTML → DOM → CSSOM → Render Tree → Layout → Paint → Composite. Any resource that blocks this pipeline delays first paint.

Why it works: CSS is render-blocking (no paint until CSSOM is ready) while JavaScript is parser-blocking (<script> halts DOM construction until it downloads and executes) — so each needs a different optimization strategy. Every blocking resource adds latency directly to time-to-first-paint.

Key insights:

  • async downloads in parallel and executes immediately (use for independent scripts); defer downloads in parallel but executes after DOM parsing (use for most scripts)
  • <link rel="preload"> fetches critical resources at high priority now; rel="prefetch" fetches likely next-navigation resources at low priority
  • Inline above-the-fold CSS and async-load the rest to eliminate the render-blocking CSS request
  • Fonts can block text rendering for up to 3s — use font-display: swap

Code applications:

ContextPatternExample
Critical CSSInline above-the-fold styles in <head><style>/* critical */</style> + async full CSS
Script loadingdefer by default; async for independents<script src="app.js" defer></script>
Resource hintsPreload critical fonts, hero images<link rel="preload" href="font.woff2" as="font" crossorigin>
Image optimizationLazy-load below-fold; modern formats<img loading="lazy" src="photo.avif" srcset="...">

See references/resource-loading.md when shaving first paint — the exact async/defer/module execution order, the full resource-hint decision tree, and the image/font (font-display, srcset, AVIF) playbook.

4. Caching Strategies

Core concept: The fastest network request is one that never happens. Layer caches — browser memory, disk, service worker, CDN, origin — to eliminate round trips for repeat visitors.

Why it works: Cache-Control headers tell the browser and intermediaries exactly how long a response stays valid; content-hashed URLs make aggressive immutable caching safe. Each cache hit eliminates a full network round trip.

Key insights:

  • Cache-Control: no-cache still caches but revalidates every time; no-store never caches — don't confuse them
  • ETag / Last-Modified enable conditional requests (304 Not Modified) that skip the body transfer
  • Service workers provide a programmable cache layer that works offline (cache-first shell, network-first dynamic content)
  • Misconfigured Vary headers cause CDN cache pollution — serve the wrong encoding or format to the wrong client

Code applications:

ContextPatternExample
Static assetsImmutable cache + hash bustingstyle.a1b2c3.css with Cache-Control: max-age=31536000, immutable
HTML documentsRevalidate on every requestCache-Control: no-cache with ETag
API responsesShort TTL + background refreshCache-Control: max-age=60, stale-while-revalidate=3600
CDN configCache at edge with correct VaryVary: Accept-Encoding, Accept

See references/caching-strategies.md when designing a cache policy — the full browser/SW/CDN/origin hierarchy, copy-paste service-worker cache-first vs network-first recipes, and the Vary pitfalls that pollute a CDN.

5. Core Web Vitals Optimization

Core concept: Core Web Vitals — LCP, INP, CLS — are Google's user-centric metrics covering loading, interactivity, and visual stability. They impact search ranking and reflect real user experience.

Why it works: A fast TTFB means nothing if the hero image still loads late (LCP) or main-thread JavaScript blocks interactions (INP) — so server-side timing can look green while users wait. Optimize the perceived milestones, not the byte-delivery clock.

Key insights (numeric pass/fail thresholds live in the Quick Diagnostic):

  • LCP — optimize the largest visible element (hero image, heading block, video poster)
  • INP — keep the main thread free; break long tasks so every interaction (not only the first) stays responsive
  • CLS — reserve space for dynamic content before it loads
  • TTFB and FCP (< 1.8s) are upstream gates: they bound every downstream milestone, so fix them first
  • Measure with Real User Monitoring (RUM) in production — lab/synthetic tests miss real-device and network variance

Code applications:

ContextPatternExample
LCPPreload LCP element; raise its priority<img src="hero.webp" fetchpriority="high">
INPBreak long tasks; yield to main threadscheduler.yield() or setTimeout chunking
CLSReserve space for async content<img width="800" height="600"> or CSS aspect-ratio
Performance budgetFail CI when a vital regresses past its Quick Diagnostic thresholdLighthouse CI assertions on LCP/INP/CLS

See references/core-web-vitals.md when a metric is in the red — per-metric debugging workflows (what to inspect for a bad LCP/INP/CLS), the lab-vs-RUM tooling map, and per-vital optimization checklists.

6. Real-Time Communication

Core concept: When data must flow continuously, the transport choice — WebSocket, SSE, or long polling — determines latency, resource usage, and scalability.

Why it works: HTTP's request-response model adds overhead to every real-time update. WebSocket offers full-duplex with ~2-byte framing; SSE offers simpler server-to-client push over plain HTTP. Match the transport to the data flow direction and frequency instead of defaulting to the most powerful option.

Key insights:

  • WebSocket: bidirectional (chat, gaming, collaborative editing); SSE: server-to-client only, auto-reconnects, proxy-friendly, simpler
  • Long polling is a fallback only — high overhead from repeated HTTP requests
  • Each WebSocket is a separate TCP connection that bypasses HTTP/2 multiplexing
  • Send heartbeat/ping frames — mobile networks silently drop idle connections
  • Reconnect with exponential backoff and queue messages while disconnected

Code applications:

ContextPatternExample
Chat / collaborationWebSocket + heartbeat + reconnectionnew WebSocket('wss://...') with ping every 30s
Live feeds / notificationsSSE for server-to-client streamingnew EventSource('/api/updates')
Connection resilienceExponential backoff on reconnect1s, 2s, 4s, 8s... capped at 30s
ScalingPub/sub broker behind WebSocket serversRedis Pub/Sub or NATS

See references/real-time-communication.md when building a live feature — the WebSocket connect/heartbeat/reconnect lifecycle, the SSE EventSource pattern, and how to scale fan-out behind a pub/sub broker.

Common Mistakes

MistakeWhy It FailsFix
Adding bandwidth to fix slow pagesLatency is the bottleneck, not throughputReduce round trips: preconnect, cache, CDN
Loading all JS upfrontParser-blocking scripts delay paint and interactivityCode-split; defer; lazy-load non-critical modules
No resource hintsBrowser discovers critical resources too latepreconnect + preload for above-fold criticals
Missing Cache-Control / no-store everywhereEvery visit re-downloads everythingProper max-age + content hashing
Ignoring CLSLayout shifts destroy trust and rankingExplicit dimensions on images, embeds, ads
WebSocket for everythingNeedless complexity when SSE/polling sufficesMatch transport to data flow; SSE for server push
Domain sharding on HTTP/2Defeats multiplexing; extra TCP connectionsConsolidate origins; let HTTP/2 multiplex
No compressionText resources transfer at full sizeEnable Brotli (preferred) or Gzip on server/CDN

Quick Diagnostic

QuestionIf NoAction
Is TTFB under 800ms?Server or network too slowCDN, server caching, check backend
Is LCP under 2.5s?Largest element loads too latePreload LCP resource; fetchpriority="high"
Is INP under 200ms?Main thread blockedBreak long tasks; defer non-critical JS
Is CLS under 0.1?Elements shift after renderExplicit dimensions; reserve space
Are static assets content-hashed and cached?Repeat visitors re-downloadHashed filenames + Cache-Control: immutable
Is HTTP/2 or HTTP/3 enabled?No multiplexing or header compressionEnable HTTP/2 on server; HTTP/3 via CDN
Are render-blocking resources minimized?CSS and sync JS delay first paintInline critical CSS; defer scripts; prune unused CSS
Is compression enabled (Brotli/Gzip)?Uncompressed text transfersEnable Brotli on server/CDN; Gzip fallback

Further Reading

Based on Ilya Grigorik's comprehensive guide to browser networking and web performance:

About the Author

Ilya Grigorik is a web performance engineer who spent over a decade at Google working on Chrome, web platform performance, and HTTP standards, and co-chaired the W3C Web Performance Working Group. His book High Performance Browser Networking (O'Reilly, 2013) is widely regarded as the definitive reference on how browsers interact with the network.

GitHub 저장소

wondelai/skills
경로: plugins/systems-architecture/skills/high-perf-browser
0
agent-skillsai-skillsbusinessclaude-codeclaude-code-marketplaceclaude-code-plugin
FAQ

자주 묻는 질문

high-perf-browser Skill이란 무엇인가요?

high-perf-browser은(는) wondelai이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 high-perf-browser 관련 작업을 수행할 수 있게 합니다.

high-perf-browser은(는) 어떻게 설치하나요?

이 페이지의 설치 명령을 사용하세요. high-perf-browser을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.

high-perf-browser은(는) 어떤 카테고리에 속하나요?

high-perf-browser은(는) 디자인 카테고리에 속합니다.

high-perf-browser은(는) 무료로 사용할 수 있나요?

네. high-perf-browser은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.

연관 스킬

executing-plans
디자인

executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.

스킬 보기
requesting-code-review
디자인

이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.

스킬 보기
connect-mcp-server
디자인

이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.

스킬 보기
web-cli-teleport
디자인

이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.

스킬 보기