lucaswilliameufrasio/agent-skills

performance-optimization

- Diagnose and improve application performance or resource efficiency using measured evidence.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/lucaswilliameufrasio/agent-skills --skill performance-optimization

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Evidence-driven performance optimization

Optimize the system's actual objective, not an isolated benchmark score. Keep correctness, reliability, tail latency, resource use, and cost in view. A queue that rejects overload correctly or a slow external dependency may be a design boundary rather than an application-code defect.

Establish the target and baseline

  1. Ask what outcome matters: latency percentile, sustainable throughput, CPU or

memory per request, queue age, startup time, cost, or a specific regression. Define a success threshold and unacceptable trade-offs.

  1. Inspect the project, existing dashboards, performance scripts, prior

baselines, release/runtime settings, and environment. Preserve existing workflows and unrelated changes.

  1. Reproduce the symptom with a representative, repeatable workload. Record

commit/build, runtime and flags, machine/architecture, resource limits, dependencies/topology, input size, offered load, duration, warmup, and repetitions. Do not compare numbers from materially different environments as if they were directly comparable.

  1. Measure useful outputs together: offered and delivered throughput, p50/p95/

p99 latency, errors/timeouts, CPU, RSS/allocations, queue depth/age, and dependency calls or cost as relevant. Check that the load generator is not the bottleneck.

Use performance-benchmarking-and-load-testing to create or run the harness; use performance-profiling-ebpf when sampling can narrow a measured bottleneck.

Diagnose before editing

Form a falsifiable hypothesis tied to evidence: profile samples, traces, allocation/lock data, query plans, queue growth, runtime metrics, or an isolated microbenchmark. Rank candidates by expected user impact, confidence, effort, and risk. Distinguish CPU-bound work, allocation/GC pressure, lock contention, I/O, queueing, downstream capacity, and load-generator/infrastructure limits.

Do not optimize a synthetic endpoint or microbenchmark and present it as a production capacity improvement. Do not treat a flamegraph as proof of a fix; it helps explain where time was spent under one workload. If the bottleneck is external or the evidence is inconclusive, report that and gather the smallest useful next measurement rather than making speculative changes.

Make and prove one change at a time

  1. State the hypothesis and predicted metric change before editing.
  2. Make the smallest change that tests it; preserve API, data, security, and

backpressure semantics. Add or update correctness/regression tests, then run the repository's full relevant quality gate so a speedup does not hide a correctness or reliability regression.

  1. Repeat the same workload, tool version, environment, and resource settings.

Use enough independent runs to distinguish noise; report distributions or medians, not a cherry-picked fastest run.

  1. Compare the target and guardrails: a throughput gain is not a win if p99,

errors, memory, queue growth, downstream load, or cost worsens beyond the agreed bounds.

  1. Keep, revise, or revert only the change under evaluation based on evidence.

Do not discard unrelated user changes.

The final report should include the bottleneck evidence, hypothesis, change, before/after results and run conditions, correctness checks, trade-offs, limitations, and remaining bottlenecks. Separate observed facts from estimates and recommendations. Never generalize a local ceiling into a production SLO.

Review checklist

  • Was the original behavior reproduced and the objective defined?
  • Is the claimed bottleneck supported by evidence under representative load?
  • Are baseline and candidate runs comparable and repeated?
  • Did correctness and reliability remain intact?
  • Were focused regression tests and the repository's required quality checks run?
  • Were tail latency, errors, resource use, queues, dependencies, and cost checked?
  • Are conclusions appropriately limited to the tested environment/workload?

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills
lucaswilliameufrasio
社区

cross-repo-standard-sync

- Find the canonical owner of a development standard, audit drift, or propagate an approved standard across repositories and agent configurations. Use when the user says their preferred workflow is out of sync, wants common rules synchronized, or asks which copy is authoritative. Separate personal defaults, organization policy, and repository facts; preserve local commands and exceptions, and never overwrite ambiguous differences without approval.

安装量
1
GitHub Stars
0
最近更新
10月8日
lucaswilliameufrasio
社区

explicit-code-style

- Apply explicit, safe coding conventions when writing or reviewing code: use multiline braced control flow, explicit loops, and strict TypeScript value handling. Use when editing, reviewing, or refactoring application code; respect API contracts and language-specific constraints.

安装量
1
GitHub Stars
0
最近更新
10月8日
lucaswilliameufrasio
社区

privacy-safe-skill-extraction

- Turn an internal standard, runbook, prompt, or repeated workflow into a reusable skill for a public or broader audience. Use whenever asked to generalize or publish guidance derived from private material. Preserve useful behavior while removing organization, product, customer, repository, infrastructure, and operational identifiers; inspect the final artifacts for leakage before sharing them.

安装量
1
GitHub Stars
0
最近更新
10月8日
lucaswilliameufrasio
社区

testing-standard

- Apply the repository testing standard whenever adding or changing code, tests, persistence, APIs, CI, or fixing a bug, and whenever asked to verify that work is complete. Select meaningful unit, integration, and regression coverage; run the repository's full documented quality gate using safe local resources; report exactly what passed, failed, or was not run. Inspect repository instructions and commands instead of assuming a universal stack.

安装量
1
GitHub Stars
0
最近更新
10月8日