一键导入
performance
Use when investigating latency, throughput, resource saturation, or performance regressions before changing implementation details
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when investigating latency, throughput, resource saturation, or performance regressions before changing implementation details
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | performance |
| description | Use when investigating latency, throughput, resource saturation, or performance regressions before changing implementation details |
Announce at start: "Following the performance skill — measure before optimizing."
No optimization without measurement. Pick the bottleneck based on evidence, not intuition.
Start with a concrete performance problem:
Record current behavior before changing code:
p50, p95, p99) where relevantUse the right tool for the suspected bottleneck:
| Suspected bottleneck | First tool |
|---|---|
| CPU-bound code | Profiler or flame graph |
| Slow DB path | Query plan and slow query log |
| I/O wait | Trace spans and dependency timings |
| Memory growth | Heap snapshot / allocation profile |
| End-to-end path | Load test plus tracing |
Change the hottest confirmed bottleneck first:
After each change:
If the improvement is worth keeping:
| Signal | Action |
|---|---|
| "This code looks slow" with no measurement | Establish a baseline first |
| Microbenchmark used to justify system-wide change | Re-test with representative workload |
| Query or cache change improves one metric but hurts another | Re-evaluate end-to-end outcome |
| Proposed optimization adds major complexity for small gain | Compare maintenance cost to measured benefit |
| Same benchmark not used before and after | Results are not comparable |
| When | Invoke |
|---|---|
| Need root-cause diagnosis before tuning | debugging |
| Need tests or regression guards | testing |
| Releasing a risky optimization | deployment |
| Need better metrics or tracing first | logging |
For principles, rationale, anti-patterns, and examples:
guides/performance-engineering/performance-engineering.mdguides/observability-patterns/observability-patterns.mdguides/database-indexing/database-indexing.mdExecute safe Git workflows — branching, committing, resolving conflicts, and managing PRs
Use when controlling AI spend, token budgets, model routing, or workflow efficiency before scaling usage
Use when handling incidents, outages, severe regressions, or operational emergencies before attempting broad fixes
Use when reviewing code, preparing a PR for review, or processing review feedback
Use when diagnosing bugs, test failures, or unexpected behavior before attempting any fix
Plan and execute safe deployments with rollback procedures, verification, and monitoring