Logo Performance

Performance

Cộng đồng
yonatangross
performance

Performance optimization patterns covering Core Web Vitals, React render optimization, lazy loading, image optimization, backend profiling, LLM inference, and sustainability UX. Use when improving page speed, debugging slow renders, optimizing bundles, reducing image payload, profiling backend, deploying LLMs efficiently, or reducing digital carbon footprint.

Tổng quan

Nhà phát hànhyonatangross
Kho mãorchestkit
Tên kỹ năngperformance
Sao
298
Bản fork
35
Tệp đi kèm
43
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 43 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được yonatangross công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Performance trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/performance
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/yonatangross/orchestkit.git /tmp/orchestkit
mkdir -p .claude/skills
cp -r /tmp/orchestkit/plugins/ork/skills/performance .claude/skills/performance
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Performance trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Performance ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Performance với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Performance

Comprehensive performance optimization patterns for frontend, backend, and LLM inference.

Quick Reference

CategoryRulesImpactWhen to Use
Core Web Vitals4CRITICALLCP, INP, CLS optimization with 2026 thresholds
Render Optimization3HIGHReact Compiler, memoization, virtualization
Lazy Loading3HIGHCode splitting, route splitting, preloading
Image Optimization2HIGHAVIF/WebP formats, responsive images
Profiling & Backend3MEDIUMReact DevTools, py-spy, bundle analysis
LLM Inference3MEDIUMvLLM, quantization, speculative decoding
Caching2HIGHRedis cache-aside, prompt caching, HTTP cache headers
Query & Data Fetching2HIGHTanStack Query prefetching, optimistic updates, rollback
Sustainability1MEDIUMPage weight budgets, lazy loading, optimized formats, dark mode

Total: 23 rules across 9 categories

Core Web Vitals

Google's Core Web Vitals with 2026 stricter thresholds.

RuleFileKey Pattern
LCP Optimizationrules/cwv-lcp.mdPreload hero, SSR, fetchpriority="high"
INP Optimizationrules/cwv-inp.mdscheduler.yield, useTransition, requestIdleCallback
INP Advancedrules/cwv-inp-advanced.mdLayout thrashing, third-party scripts, rAF patterns
CLS Preventionrules/cwv-cls.mdExplicit dimensions, aspect-ratio, font-display

2026 Thresholds

MetricCurrent Good2026 Good
LCP<= 2.5s<= 2.0s
INP<= 200ms<= 150ms
CLS<= 0.1<= 0.08

Render Optimization

React render performance patterns for React 19+.

RuleFileKey Pattern
React Compilerrules/render-compiler.mdAuto-memoization, "Memo" badge verification
Manual Memoizationrules/render-memo.mduseMemo/useCallback escape hatches, state colocation
Virtualizationrules/render-virtual.mdTanStack Virtual for 100+ item lists

Lazy Loading

Code splitting and lazy loading with React.lazy and Suspense.

RuleFileKey Pattern
React.lazy + Suspenserules/loading-lazy.mdComponent lazy loading, error boundaries
Route Splittingrules/loading-splitting.mdReact Router 7.x, Vite manual chunks
Preloadingrules/loading-preload.mdPrefetch on hover, modulepreload hints

Image Optimization

Production image optimization for modern web applications.

RuleFileKey Pattern
Format Selectionrules/images-formats.mdAVIF/WebP, quality 75-85, picture element
Responsive Imagesrules/images-responsive.mdsizes prop, art direction, CDN loaders

Next.js Image component usage and the v16 image config defaults are first-party territory; see "Upstream coverage (do not restate)" below.

Profiling & Backend

Profiling tools and backend optimization patterns.

RuleFileKey Pattern
React Profilingrules/profiling-react.mdDevTools Profiler, flamegraph, render counts
Backend Profilingrules/profiling-backend.mdpy-spy, cProfile, memory_profiler, flame graphs
Bundle Analysisrules/profiling-bundle.mdvite-bundle-visualizer, tree shaking, performance budgets

LLM Inference

High-performance LLM inference with vLLM, quantization, and speculative decoding.

RuleFileKey Pattern
vLLM Deploymentrules/inference-vllm.mdPagedAttention, continuous batching, tensor parallelism
Quantizationrules/inference-quantization.mdAWQ, GPTQ, FP8, INT8 method selection
Speculative Decodingrules/inference-speculative.mdN-gram, draft model, 1.5-2.5x throughput

Caching

Backend Redis caching and LLM prompt caching for cost savings and performance.

RuleFileKey Pattern
Redis & Backendrules/caching-redis.mdCache-aside, write-through, invalidation, stampede prevention
HTTP & Promptrules/caching-http.mdHTTP cache headers, LLM prompt caching, semantic caching

Query & Data Fetching

TanStack Query v5 patterns for prefetching and optimistic updates.

RuleFileKey Pattern
Prefetchingrules/query-prefetching.mdHover prefetch, route loaders, queryOptions, Suspense
Optimistic Updatesrules/query-optimistic.mdOptimistic mutations, rollback, cache invalidation

Sustainability

Digital sustainability patterns for reducing carbon footprint and energy usage.

RuleFileKey Pattern
Sustainability UXrules/sustainability-ux.mdPage weight budgets, AVIF/WebP, lazy loading, dark mode

Local Profiling Target

When profiling a local app (Lighthouse, Core Web Vitals, bundle analysis), use Portless named URLs for stable, self-documenting targets:

bash
# Discover services
portless list
# app → app.localhost (port 3000)

# Profile with agent-browser (preferred for visual metrics)
agent-browser open "https://app.localhost"
agent-browser profiler start
agent-browser wait --load networkidle
agent-browser profiler stop /tmp/profile.json

# Lighthouse via agent-browser
agent-browser open "https://app.localhost"
agent-browser screenshot /tmp/perf-baseline.png

# Or direct Lighthouse CLI
npx lighthouse https://app.localhost --output=json --output-path=/tmp/lighthouse.json

Named URLs are stable across restarts and self-documenting in performance reports. Install Portless with npm i -g portless.

Quick Start Example

tsx
// 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
    />
  );
}

Key Decisions

DecisionRecommendation
MemoizationLet React Compiler handle it (2026 default)
Lists 100+ itemsUse TanStack Virtual
Image formatAVIF with WebP fallback (30-50% smaller)
LCP contentSSR/SSG, never client-side fetch
Code splittingPer-route for most apps, per-component for heavy widgets
Prefetch strategyOn hover for nav links, viewport for content
QuantizationAWQ for 4-bit, FP8 for H100/H200
Bundle budgetHard fail in CI to prevent regression

Common Mistakes

  1. Client-side fetching LCP content (delays render)
  2. Images without explicit dimensions (causes CLS)
  3. Lazy loading LCP images (delays largest paint)
  4. Heavy computation in event handlers (blocks INP)
  5. Layout-shifting animations (use transform instead)
  6. Lazy loading tiny components < 5KB (overhead > savings)
  7. Missing error boundaries on lazy components
  8. Using GPTQ without calibration data
  9. Not benchmarking actual workload patterns
  10. Only measuring in lab environment (need RUM)

Related Skills

  • ork:react-server-components-framework - Server-first rendering
  • ork:vite-advanced - Build optimization
  • browser-tools - Visual profiling with agent-browser + Portless
  • caching - Cache strategies for responses
  • ork:monitoring-observability - Production monitoring and alerting
  • ork:database-patterns - Query and index optimization
  • ork:llm-integration - Local inference with Ollama

Capability Details

lcp-optimization

Keywords: LCP, largest-contentful-paint, hero, preload, priority, SSR Solves:

  • Optimize hero image loading
  • Server-render critical content
  • Preload and prioritize LCP resources

inp-optimization

Keywords: INP, interaction, responsiveness, long-task, transition, yield Solves:

  • Break up long tasks with scheduler.yield
  • Defer non-urgent updates with useTransition
  • Optimize event handler performance

cls-prevention

Keywords: CLS, layout-shift, dimensions, aspect-ratio, font-display Solves:

  • Reserve space for dynamic content
  • Prevent font flash and image pop-in
  • Use transform for animations

react-compiler

Keywords: react-compiler, auto-memo, memoization, React 19 Solves:

  • Enable automatic memoization
  • Identify when manual memoization needed
  • Verify compiler is working

virtualization

Keywords: virtual, TanStack, large-list, scroll, overscan Solves:

  • Render 100+ item lists efficiently
  • Dynamic height virtualization
  • Window scrolling patterns

lazy-loading

Keywords: React.lazy, Suspense, code-splitting, dynamic-import Solves:

  • Route-based code splitting
  • Component lazy loading with error boundaries
  • Prefetch on hover and viewport

image-optimization

Keywords: next/image, AVIF, WebP, responsive, blur-placeholder Solves:

  • Next.js Image component patterns
  • Format selection and quality settings
  • Responsive sizing and CDN configuration

profiling

Keywords: profiler, flame-graph, py-spy, DevTools, bundle-analyzer Solves:

  • Profile React renders and backend code
  • Generate and interpret flame graphs
  • Analyze and optimize bundle size

inp-advanced

Keywords: INP, scheduler-yield, layout-thrashing, third-party-scripts, requestAnimationFrame Solves:

  • Break long tasks with scheduler.yield()
  • Audit and defer blocking third-party scripts
  • Avoid synchronous layout thrashing in event handlers
  • Optimize form submissions, dropdowns, accordions, filters

sustainability

Keywords: sustainability, carbon-footprint, page-weight, green-ux, dark-mode, lazy-loading Solves:

  • Enforce page weight budgets (< 1MB)
  • Eliminate auto-playing videos and heavy decorative animations
  • Serve optimized image formats (AVIF/WebP)
  • Implement cursor-based pagination to prevent over-fetching

llm-inference

Keywords: vllm, quantization, speculative-decoding, inference, throughput Solves:

  • Deploy LLMs with vLLM for production
  • Choose quantization method for hardware
  • Accelerate generation with speculative decoding

Upstream coverage (do not restate)

These topics used to be restated in this skill's references, checklists, and examples. They are owned by first-party sources now; consult those instead of re-adding tutorials here. The ork-specific floors and scars that survived the cut live in references/ork-delta.md.

TopicFirst-party source
Core Web Vitals mechanics, audit checklists, before/after examplesskill: web-perf / cloudflare:web-perf (Chrome DevTools MCP); https://web.dev/vitals/
Real User Monitoring with the web-vitals libraryskill: web-perf; https://github.com/GoogleChrome/web-vitals
Next.js Image component, v16 image config defaults, image CDN loadersskills: vercel:nextjs + vercel:next-upgrade; https://nextjs.org/docs/app/api-reference/components/image
Image format selection and optimization checklistsskill: vercel:nextjs; https://web.dev/learn/images
React Compiler migration, memoization escape hatches, state colocationskill: vercel-react-best-practices; https://react.dev/learn/react-compiler
React DevTools Profiler workflow, render auditsskill: vercel-react-best-practices; https://react.dev/reference/react/Profiler
TanStack Virtual list/grid virtualization patternshttps://tanstack.com/virtual/latest/docs/introduction
Route-based code splitting (React Router, Vite manual chunks)https://reactrouter.com/ and https://vite.dev/guide/build
Generic profiling workflows (Lighthouse, py-spy, bundle analyzers)skill: web-perf; https://github.com/benfred/py-spy
Redis and HTTP caching strategy patternsskill: upstash-redis-js; https://redis.io/docs/latest/
vLLM deployment, quantization, speculative decoding, edge inferencehttps://docs.vllm.ai/
Full-stack performance audit walkthroughhttps://developer.chrome.com/docs/lighthouse/; ork delta in references/ork-delta.md + examples/orchestkit-performance-wins.md

References

Load on demand with Read("references/<file>"):

FileContent
ork-delta.mdOrchestKit floors, scars, and house decisions for this skill
cc-prompt-cache-guide.mdCC 2.1.72 prompt cache optimization, stable-first prompt structure
database-optimization.mdPostgres indexing and N+1 fixes backing the recorded audit wins

Real production before/after evidence (cache hierarchy, cost math): examples/orchestkit-performance-wins.md.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Performance làm được gì?

Performance optimization patterns covering Core Web Vitals, React render optimization, lazy loading, image optimization, backend profiling, LLM inference, and sustainability UX. Use when improving page speed, debugging slow renders, optimizing bundles, reducing image payload, profiling backend, deploying LLMs efficiently, or reducing digital carbon footprint.

Vì sao nên dùng Performance trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Performance là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Performance trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/performance. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Performance?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Performance với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Performance với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Performance có miễn phí không?

Có. Kỹ năng này được yonatangross phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇