Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

performance-optimization性能优化

Agent Skill

performance-optimization 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

16,747

周安装

523

GitHub Stars

公开资料未说明

下载量

5,291
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:performance-optimization(性能优化)
来源仓库:https://github.com/yonatangross/orchestkit
仓库路径:skills/performance-optimization
安装命令:
npx skills add yonatangross/orchestkit --skill "performance-optimization"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add yonatangross/orchestkit --skill "performance-optimization"

简介

performance-optimization 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 它支持基于关键词、任务场景或来源线索进行信息检索与筛选。
  • 通过 npx skills add yonatangross/orchestkit --skill "performance-optimization" 安装使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
Performance Optimization
description
Use when application is slow, bundle is too large, or investigating performance issues. Performance optimization covers profiling, React concurrent features, bundle analysis, and optimization patterns.
tags
[performance, optimization, profiling, caching]
context
fork
version
1.2.0
category
Quality & Optimization
agents
[backend-system-architect, frontend-ui-developer, code-quality-reviewer]
keywords
[performance, optimization, speed, latency, throughput, caching, profiling, bundle, Core Web Vitals, react-19, virtualization, code-splitting, tree-shaking]
author
OrchestKit
user-invocable
false

Performance Optimization Skill

Comprehensive frameworks for analyzing and optimizing application performance across the entire stack.

Overview

  • Application feels slow or unresponsive
  • Database queries taking too long
  • Frontend bundle size too large
  • API response times exceed targets
  • Core Web Vitals need improvement
  • Preparing for scale or high traffic

Performance Targets

Core Web Vitals (Frontend)

MetricGoodNeeds Work
LCP (Largest Contentful Paint)< 2.5s< 4s
INP (Interaction to Next Paint)< 200ms< 500ms
CLS (Cumulative Layout Shift)< 0.1< 0.25
TTFB (Time to First Byte)< 200ms< 600ms

Backend Targets

OperationTarget
Simple reads< 100ms
Complex queries< 500ms
Write operations< 200ms
Index lookups< 10ms

Bottleneck Categories

CategorySymptomsTools
NetworkHigh TTFB, slow loadingNetwork tab, WebPageTest
DatabaseSlow queries, pool exhaustionEXPLAIN ANALYZE, pg_stat_statements
CPUHigh usage, slow computeProfiler, flame graphs
MemoryLeaks, GC pausesHeap snapshots
RenderingLayout thrashingReact DevTools, Performance tab

Protocol References

Database Optimization

See: references/database-optimization.md

Key topics covered:

  • N+1 query detection and fixes with SQLAlchemy selectinload
  • Index selection strategies (B-tree, GIN, HNSW, Hash)
  • EXPLAIN ANALYZE interpretation
  • Connection pooling configuration
  • Cursor vs offset pagination

Caching Strategies

See: references/caching-strategies.md

Key topics covered:

  • Multi-level cache hierarchy (L1-L4)
  • Cache-aside and write-through patterns
  • Cache invalidation strategies (TTL, event-based, tag-based)
  • Redis patterns (strings, hashes, lists, sets)
  • Cache stampede prevention
  • HTTP caching headers and ETags

Core Web Vitals

See: references/core-web-vitals.md

Key topics covered:

  • LCP optimization (images, SSR, critical CSS)
  • INP optimization (debounce, Web Workers, task splitting)
  • CLS optimization (image dimensions, font loading)
  • Measuring with web-vitals library
  • Lighthouse auditing

Frontend Performance

See: references/frontend-performance.md

Key topics covered:

  • Code splitting with React.lazy()
  • Tree shaking and import optimization
  • Image optimization (WebP, AVIF, lazy loading)
  • Memoization (memo, useMemo, useCallback)
  • List virtualization with @tanstack/react-virtual
  • Bundle analysis tools

Profiling Tools

See: references/profiling.md

Key topics covered:

  • Python profiling (cProfile, py-spy, memory_profiler)
  • Chrome DevTools Performance and Memory tabs
  • React DevTools Profiler
  • PostgreSQL query profiling (pg_stat_statements)
  • Flame graph interpretation
  • Load testing with k6 and Locust

Quick Diagnostics

Database

-- Find slow queries (PostgreSQL)
SELECT query, calls, mean_time / 1000 as mean_seconds
FROM pg_stat_statements ORDER BY total_time DESC LIMIT 10;

-- Verify index usage
EXPLAIN ANALYZE SELECT * FROM orders WHERE user_id = 123;

Frontend

# Lighthouse audit
lighthouse http://localhost:3000 --output=json

# Bundle analysis
npx vite-bundle-visualizer  # Vite
ANALYZE=true npm run build  # Next.js

Backend

# Profile running FastAPI server
py-spy record --pid $(pgrep -f uvicorn) --output profile.svg

Monitoring Checklist

Before Launch

  • [ ] Lighthouse score > 90
  • [ ] Core Web Vitals pass
  • [ ] Bundle size within budget
  • [ ] Database queries profiled
  • [ ] Compression enabled
  • [ ] CDN configured

Ongoing

  • [ ] Performance monitoring active
  • [ ] Alerting for degradation
  • [ ] Lighthouse CI in pipeline
  • [ ] Weekly query analysis
  • [ ] Real User Monitoring (RUM)

Real-World Examples

Hybrid Search Optimization

Problem: Retrieval pass rate was 87.2%, needed >90%

Solution: Increased RRF fetch multiplier from 2x to 3x, added metadata boosting

Results:

  • Pass rate: 87.2% -> 91.6% (+5.1%)
  • MRR: 0.723 -> 0.777 (+7.4%)
  • Query time: 85ms -> 5ms (HNSW index)

LLM Response Caching

Problem: LLM costs projected at $35k/year

Solution: Multi-level cache hierarchy (Claude prompt cache + Redis semantic cache)

Results:

  • Baseline: $35k/year -> With caching: $2-5k/year
  • Cost reduction: 85-95%
  • Latency: 2000ms -> 5-10ms (semantic cache hit)

Vector Index Selection

Problem: Vector searches taking 85ms, needed <10ms

Solution: Switched from IVFFlat to HNSW index

Results:

  • Query time: 85ms -> 5ms (17x faster)
  • Trade-off: Slower indexing (8s vs 2s) for faster queries

Templates Reference

TemplatePurpose
database-optimization.tsN+1 fixes, pagination, pooling
caching-patterns.tsRedis cache-aside, memoization
frontend-optimization.tsxReact memo, virtualization, code splitting
api-optimization.tsCompression, ETags, field selection
performance-metrics.tsPrometheus metrics, performance budget

Extended Thinking Triggers

Use Opus 4.5 extended thinking for:

  • Complex debugging - Multiple potential causes
  • Architecture decisions - Caching strategy selection
  • Trade-off analysis - Memory vs CPU vs latency
  • Root cause analysis - Performance regression investigation

Related Skills

  • caching-strategies - Detailed Redis caching patterns and cache invalidation
  • database-schema-designer - Indexing strategies and query optimization fundamentals
  • observability-monitoring - Performance monitoring and alerting integration
  • devops-deployment - CDN configuration and infrastructure optimization

Key Decisions

DecisionChoiceRationale
Pagination strategyCursor-based for large datasetsStable performance regardless of offset, handles concurrent inserts
Vector index typeHNSW over IVFFlat17x faster queries, worth slower indexing for read-heavy workloads
Cache hierarchyMulti-level (L1-L4)Optimizes hit rates, reduces load on expensive operations
Bundle splittingRoute-based code splittingReduces initial load, enables parallel downloads

Skill Version: 1.2.0 Last Updated: 2026-01-15 Maintained by: AI Agent Hub Team

Changelog

v1.2.0 (2026-01-15)

  • Refactored to reference-based structure
  • Moved detailed content to references/ directory
  • Reduced SKILL.md from 1079 to ~290 lines

v1.1.0 (2025-12-25)

  • Added comprehensive Frontend Bundle Analysis section
  • Added React 19 performance patterns
  • Added TanStack Virtual list virtualization

v1.0.0 (2025-12-14)

  • Initial skill with database optimization, caching, and profiling

Capability Details

database-optimization

Keywords: slow query, n+1, query optimization, explain analyze, index, postgres performance Solves:

  • How do I optimize slow database queries?
  • Fix N+1 query problems with eager loading
  • Use EXPLAIN ANALYZE to diagnose queries
  • Add missing indexes for performance

caching-strategies

Keywords: cache, redis, cdn, cache-aside, write-through, semantic cache Solves:

  • How do I implement multi-level caching?
  • Cache-aside vs write-through patterns
  • Semantic cache for LLM responses
  • Cache invalidation strategies

frontend-performance

Keywords: bundle size, lazy load, code splitting, tree shaking, lighthouse, web vitals Solves:

  • How do I reduce frontend bundle size?
  • Implement code splitting with React.lazy()
  • Optimize Lighthouse scores
  • Fix Core Web Vitals issues

core-web-vitals

Keywords: lcp, inp, cls, core web vitals, ttfb, fid Solves:

  • How do I improve Core Web Vitals?
  • Optimize LCP (Largest Contentful Paint)
  • Fix CLS (Cumulative Layout Shift)
  • Improve INP (Interaction to Next Paint)

profiling

Keywords: profile, flame graph, py-spy, chrome devtools, memory leak, cpu bottleneck Solves:

  • How do I profile my Python backend?
  • Generate flame graphs with py-spy
  • Profile React components with DevTools
  • Find memory leaks in frontend

bundle-analysis

Keywords: bundle analyzer, vite visualizer, webpack bundle, tree shaking Solves:

  • How do I analyze bundle size?
  • Use Vite bundle visualizer
  • Identify large dependencies
  • Optimize bundle with tree shaking

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

windsurf

30.63%
按下载量换算1,621

trae

21.53%
按下载量换算1,139

Claude Code

16.77%
按下载量换算887

Antigravity

12.85%
按下载量换算680

Gemini CLI

7.36%
按下载量换算389

OpenCode

3.95%
按下载量换算209

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills