Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计通过

performance性能

Agent Skill

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

总安装

353

周安装

15

GitHub Stars

26

下载量

124
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/outfitter-dev/agents --skill performance

简介

performance 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于性能优化策略研究、瓶颈分析方法或监控工具推荐等场景。
  • 通过关键词检索返回性能指标、调优技巧或基准测试案例。
  • 安装命令为 npx skills add https://github.com/outfitter-dev/agents --skill performance。
  • 使用前请确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。

SKILL.md

Performance Engineering

Evidence-based performance optimization → measure → profile → optimize → validate.

<when_to_use>

  • Profiling slow code paths or bottlenecks
  • Identifying memory leaks or excessive allocations
  • Optimizing latency-critical operations (P95, P99)
  • Benchmarking competing implementations
  • Database query optimization
  • Reducing CPU usage in hot paths
  • Improving throughput (RPS, ops/sec)

NOT for: premature optimization, optimization without measurement, guessing at bottlenecks

</when_to_use>

<iron_law>

NO OPTIMIZATION WITHOUT MEASUREMENT

Required workflow:

  1. Measure baseline performance with realistic workload
  2. Profile to identify actual bottleneck
  3. Optimize the bottleneck (not what you think is slow)
  4. Measure again to verify improvement
  5. Document gains and tradeoffs

Optimizing unmeasured code wastes time and introduces bugs.

</iron_law>

Load the maintain-tasks skill for stage tracking:

Stage 1: Establishing baseline

  • content: "Establish performance baseline with realistic workload"
  • activeForm: "Establishing performance baseline"

Stage 2: Profiling bottlenecks

  • content: "Profile code to identify actual bottlenecks"
  • activeForm: "Profiling code to identify bottlenecks"

Stage 3: Analyzing root cause

  • content: "Analyze profiling data to determine root cause"
  • activeForm: "Analyzing profiling data"

Stage 4: Implementing optimization

  • content: "Implement targeted optimization for identified bottleneck"
  • activeForm: "Implementing optimization"

Stage 5: Validating improvement

  • content: "Measure performance gains and verify no regressions"
  • activeForm: "Validating performance improvement"

Key Performance Indicators

Latency (response time):

  • P50 (median) — typical case
  • P95 — most users
  • P99 — tail latency
  • P99.9 — outliers
  • TTFB — time to first byte
  • TTLB — time to last byte

Throughput:

  • RPS — requests per second
  • ops/sec — operations per second
  • bytes/sec — data transfer rate
  • queries/sec — database throughput

Memory:

  • Heap usage — allocated memory
  • GC frequency — garbage collection pauses
  • GC duration — stop-the-world time
  • Allocation rate — memory churn
  • Resident set size (RSS) — total memory

CPU:

  • CPU time — total compute
  • Wall time — elapsed time
  • Hot paths — frequently executed code
  • Time complexity — algorithmic efficiency
  • CPU utilization — percentage used

Always measure:

  • Before optimization (baseline)
  • After optimization (improvement)
  • Under realistic load (not toy data)
  • Multiple runs (account for variance)

<profiling_tools>

TypeScript/Bun

Built-in timing:

console.time('operation')
// ... code to measure
console.timeEnd('operation')

// High precision
const start = Bun.nanoseconds()
// ... code to measure
const elapsed = Bun.nanoseconds() - start
console.log(`Took ${elapsed / 1_000_000}ms`)

Performance API:

const mark1 = performance.mark('start')
// ... code to measure
const mark2 = performance.mark('end')
performance.measure('operation', 'start', 'end')
const measure = performance.getEntriesByName('operation')[0]
console.log(`Duration: ${measure.duration}ms`)

Memory profiling:

  • Chrome DevTools → Memory tab → heap snapshots
  • Node.js --inspect flag + Chrome DevTools
  • process.memoryUsage() for RSS/heap tracking

CPU profiling:

  • Chrome DevTools → Performance tab → record session
  • Node.js --prof flag + node --prof-process
  • Flamegraphs for visualization

Rust

Benchmarking:

#[cfg(test)]
mod benches {
    use criterion::{black_box, criterion_group, criterion_main, Criterion};

    fn benchmark_function(c: &mut Criterion) {
        c.bench_function("my_function", |b| {
            b.iter(|| my_function(black_box(42)))
        });
    }

    criterion_group!(benches, benchmark_function);
    criterion_main!(benches);
}

Profiling:

  • cargo bench — criterion benchmarks
  • perf record + perf report — Linux profiling
  • cargo flamegraph — visual flamegraphs
  • cargo bloat — binary size analysis
  • valgrind --tool=callgrind — detailed profiling
  • heaptrack — memory profiling

Instrumentation:

use std::time::Instant;

let start = Instant::now();
// ... code to measure
let duration = start.elapsed();
println!("Took: {:?}", duration);

</profiling_tools>

<optimization_patterns>

Algorithm Improvements

Time complexity:

  • O(n²) → O(n log n) — sorting, searching
  • O(n) → O(log n) — binary search, trees
  • O(n) → O(1) — hash maps, memoization

Space-time tradeoffs:

  • Cache computed results (memoization)
  • Precompute expensive operations
  • Index data for faster lookup
  • Use hash maps for O(1) access

Memory Optimization

Reduce allocations:

// Bad: creates new array each iteration
for (const item of items) {
  const results = []
  results.push(process(item))
}

// Good: reuse array
const results = []
for (const item of items) {
  results.push(process(item))
}
// Bad: allocates String every time
fn format_user(name: &str) -> String {
    format!("User: {}", name)
}

// Good: reuses buffer
fn format_user(name: &str, buf: &mut String) {
    buf.clear();
    buf.push_str("User: ");
    buf.push_str(name);
}

Memory pooling:

  • Reuse expensive objects (connections, buffers)
  • Object pools for frequently allocated types
  • Arena allocators for batch allocations

Lazy evaluation:

  • Compute only when needed
  • Stream processing vs loading all data
  • Iterators over materialized collections

I/O Optimization

Batching:

  • Batch API calls (1 request vs 100)
  • Batch database writes (bulk insert)
  • Batch file operations (single write vs many)

Caching:

  • Cache expensive computations
  • Cache database queries (Redis, in-memory)
  • Cache API responses (HTTP caching)
  • Invalidate stale cache entries

Async I/O:

  • Non-blocking operations (async/await)
  • Concurrent requests (Promise.all, tokio::spawn)
  • Connection pooling (reuse connections)

Database Optimization

Query optimization:

  • Add indexes for common queries
  • Use EXPLAIN/EXPLAIN ANALYZE
  • Avoid N+1 queries (use joins or batch loading)
  • Select only needed columns
  • Filter at database level (WHERE vs client filter)

Schema design:

  • Normalize to reduce duplication
  • Denormalize for read-heavy workloads
  • Partition large tables
  • Use appropriate data types

Connection management:

  • Connection pooling (don't create per request)
  • Prepared statements (avoid SQL parsing)
  • Transaction batching (reduce round trips)

</optimization_patterns>

Loop: Measure → Profile → Analyze → Optimize → Validate

  1. Define performance goal — target metric (e.g., P95 < 100ms)
  2. Establish baseline — measure current performance under realistic load
  3. Profile systematically — identify actual bottleneck (not guesses)
  4. Analyze root cause — understand why code is slow
  5. Design optimization — plan targeted improvement
  6. Implement optimization — make focused change
  7. Measure improvement — verify gains, check for regressions
  8. Document results — record baseline, optimization, gains, tradeoffs

At each step:

  • Document measurements with methodology
  • Note profiling tool output
  • Track optimization attempts (what worked/failed)
  • Update performance documentation

Before declaring optimization complete:

Check gains:

  • ✓ Measured improvement meets target?
  • ✓ Improvement statistically significant?
  • ✓ Tested under realistic load?
  • ✓ Multiple runs confirm consistency?

Check regressions:

  • ✓ No degradation in other metrics?
  • ✓ Memory usage still acceptable?
  • ✓ Code complexity still manageable?
  • ✓ Tests still pass?

Check documentation:

  • ✓ Baseline measurements recorded?
  • ✓ Optimization approach explained?
  • ✓ Gains quantified with numbers?
  • ✓ Tradeoffs documented?

ALWAYS:

  • Measure before optimizing (baseline)
  • Profile to find actual bottleneck
  • Use realistic workload (not toy data)
  • Measure multiple runs (account for variance)
  • Document baseline and improvements
  • Check for regressions in other metrics
  • Consider readability vs performance tradeoff
  • Verify statistical significance

NEVER:

  • Optimize without measuring first
  • Guess at bottleneck without profiling
  • Benchmark with unrealistic data
  • Trust single-run measurements
  • Skip documentation of results
  • Sacrifice correctness for speed
  • Optimize without clear performance goal
  • Ignore algorithmic improvements

Methodology:

Related skills:

  • codebase-recon — evidence-based investigation (foundation)
  • debugging — structured bug investigation
  • typescript-dev — correctness before performance

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

展示第三方安全扫描或审计结果

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

平台分布

github-copilot

26.67%
按下载量换算33

Claude Code

26.76%
按下载量换算33

kilo

18.85%
按下载量换算23

windsurf

11.68%
按下载量换算14

zencoder

8.91%
按下载量换算11

amp

3.84%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/outfitter-dev/agents --skill performance;npx skills add outfitter-dev/agents --skill "performance" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills