Performance optimization patterns covering Core Web Vitals, React render optimization, lazy loading, image optimization, backend profiling, and LLM inference. Use when improving page speed, debugging slow renders, optimizing bundles, reducing image payload, profiling backend, or deploying LLMs efficiently.
Optimizes web and LLM performance across Core Web Vitals, React rendering, image loading, backend profiling, and inference speed.
/plugin marketplace add yonatangross/orchestkit/plugin install orkl@orchestkitThis skill inherits all available tools. When active, it can use any tool Claude has access to.
checklists/cwv-checklist.mdchecklists/image-checklist.mdchecklists/inference-optimization.mdchecklists/performance-audit-checklist.mdchecklists/render-audit.mdexamples/cwv-examples.mdexamples/image-examples.mdexamples/orchestkit-performance-wins.mdmetadata.jsonreferences/caching-strategies.mdreferences/cdn-setup.mdreferences/core-web-vitals.mdreferences/database-optimization.mdreferences/devtools-profiler-workflow.mdreferences/edge-deployment.mdreferences/frontend-performance.mdreferences/memoization-escape-hatches.mdreferences/profiling.mdreferences/quantization-guide.mdreferences/react-compiler-migration.mdComprehensive performance optimization patterns for frontend, backend, and LLM inference.
| Category | Rules | Impact | When to Use |
|---|---|---|---|
| Core Web Vitals | 3 | CRITICAL | LCP, INP, CLS optimization with 2026 thresholds |
| Render Optimization | 3 | HIGH | React Compiler, memoization, virtualization |
| Lazy Loading | 3 | HIGH | Code splitting, route splitting, preloading |
| Image Optimization | 3 | HIGH | Next.js Image, AVIF/WebP, responsive images |
| Profiling & Backend | 3 | MEDIUM | React DevTools, py-spy, bundle analysis |
| LLM Inference | 3 | MEDIUM | vLLM, quantization, speculative decoding |
| Caching | 2 | HIGH | Redis cache-aside, prompt caching, HTTP cache headers |
| Query & Data Fetching | 2 | HIGH | TanStack Query prefetching, optimistic updates, rollback |
Total: 22 rules across 8 categories
Google's Core Web Vitals with 2026 stricter thresholds.
| Rule | File | Key Pattern |
|---|---|---|
| LCP Optimization | rules/cwv-lcp.md | Preload hero, SSR, fetchpriority="high" |
| INP Optimization | rules/cwv-inp.md | scheduler.yield, useTransition, requestIdleCallback |
| CLS Prevention | rules/cwv-cls.md | Explicit dimensions, aspect-ratio, font-display |
| Metric | Current Good | 2026 Good |
|---|---|---|
| LCP | <= 2.5s | <= 2.0s |
| INP | <= 200ms | <= 150ms |
| CLS | <= 0.1 | <= 0.08 |
React render performance patterns for React 19+.
| Rule | File | Key Pattern |
|---|---|---|
| React Compiler | rules/render-compiler.md | Auto-memoization, "Memo" badge verification |
| Manual Memoization | rules/render-memo.md | useMemo/useCallback escape hatches, state colocation |
| Virtualization | rules/render-virtual.md | TanStack Virtual for 100+ item lists |
Code splitting and lazy loading with React.lazy and Suspense.
| Rule | File | Key Pattern |
|---|---|---|
| React.lazy + Suspense | rules/loading-lazy.md | Component lazy loading, error boundaries |
| Route Splitting | rules/loading-splitting.md | React Router 7.x, Vite manual chunks |
| Preloading | rules/loading-preload.md | Prefetch on hover, modulepreload hints |
Production image optimization for modern web applications.
| Rule | File | Key Pattern |
|---|---|---|
| Next.js Image | rules/images-nextjs.md | Image component, priority, blur placeholder |
| Format Selection | rules/images-formats.md | AVIF/WebP, quality 75-85, picture element |
| Responsive Images | rules/images-responsive.md | sizes prop, art direction, CDN loaders |
Profiling tools and backend optimization patterns.
| Rule | File | Key Pattern |
|---|---|---|
| React Profiling | rules/profiling-react.md | DevTools Profiler, flamegraph, render counts |
| Backend Profiling | rules/profiling-backend.md | py-spy, cProfile, memory_profiler, flame graphs |
| Bundle Analysis | rules/profiling-bundle.md | vite-bundle-visualizer, tree shaking, performance budgets |
High-performance LLM inference with vLLM, quantization, and speculative decoding.
| Rule | File | Key Pattern |
|---|---|---|
| vLLM Deployment | rules/inference-vllm.md | PagedAttention, continuous batching, tensor parallelism |
| Quantization | rules/inference-quantization.md | AWQ, GPTQ, FP8, INT8 method selection |
| Speculative Decoding | rules/inference-speculative.md | N-gram, draft model, 1.5-2.5x throughput |
Backend Redis caching and LLM prompt caching for cost savings and performance.
| Rule | File | Key Pattern |
|---|---|---|
| Redis & Backend | rules/caching-redis.md | Cache-aside, write-through, invalidation, stampede prevention |
| HTTP & Prompt | rules/caching-http.md | HTTP cache headers, LLM prompt caching, semantic caching |
TanStack Query v5 patterns for prefetching and optimistic updates.
| Rule | File | Key Pattern |
|---|---|---|
| Prefetching | rules/query-prefetching.md | Hover prefetch, route loaders, queryOptions, Suspense |
| Optimistic Updates | rules/query-optimistic.md | Optimistic mutations, rollback, cache invalidation |
// LCP: Priority hero image with SSR
import Image from 'next/image';
export default async function Page() {
const data = await fetchHeroData();
return (
<Image
src={data.heroImage}
alt="Hero"
priority
placeholder="blur"
sizes="100vw"
fill
/>
);
}
| Decision | Recommendation |
|---|---|
| Memoization | Let React Compiler handle it (2026 default) |
| Lists 100+ items | Use TanStack Virtual |
| Image format | AVIF with WebP fallback (30-50% smaller) |
| LCP content | SSR/SSG, never client-side fetch |
| Code splitting | Per-route for most apps, per-component for heavy widgets |
| Prefetch strategy | On hover for nav links, viewport for content |
| Quantization | AWQ for 4-bit, FP8 for H100/H200 |
| Bundle budget | Hard fail in CI to prevent regression |
ork:react-server-components-framework - Server-first renderingork:vite-advanced - Build optimizationcaching - Cache strategies for responsesork:monitoring-observability - Production monitoring and alertingork:database-patterns - Query and index optimizationork:llm-integration - Local inference with OllamaKeywords: LCP, largest-contentful-paint, hero, preload, priority, SSR Solves:
Keywords: INP, interaction, responsiveness, long-task, transition, yield Solves:
Keywords: CLS, layout-shift, dimensions, aspect-ratio, font-display Solves:
Keywords: react-compiler, auto-memo, memoization, React 19 Solves:
Keywords: virtual, TanStack, large-list, scroll, overscan Solves:
Keywords: React.lazy, Suspense, code-splitting, dynamic-import Solves:
Keywords: next/image, AVIF, WebP, responsive, blur-placeholder Solves:
Keywords: profiler, flame-graph, py-spy, DevTools, bundle-analyzer Solves:
Keywords: vllm, quantization, speculative-decoding, inference, throughput Solves:
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.