Performance — before and after measurements on the same load profile and in the same environment, p95/p99 thresholds only from approved documents, profiling the server side (response time, CPU, storage queries, locks, connection pools, queues, external calls) and the client (bundle size, time to interactive, rendering), load test protocol and measurement report. Use for performance profiling, load testing, latency p95/p99, benchmark before/after, bundle size, regression.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Performance?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-performance)
---
name: performance
description: Performance — before and after measurements on the same load profile and in the same environment, p95/p99 thresholds only from approved documents, profiling the server side (response time, CPU, storage queries, locks, connection pools, queues, external calls) and the client (bundle size, time to interactive, rendering), load test protocol and measurement report. Use for performance profiling, load testing, latency p95/p99, benchmark before/after, bundle size, regression.
metadata:
category: performance
---
# Performance
## Purpose
This skill guides performance measurements of the server side, background processes and the client. Rule: a performance claim ("faster", "no worse", "will hold up") is made only with before and after measurements on the same load profile and in the same environment. The skill does not set thresholds: p95/p99 budgets and acceptable error rates come from the project's approved documents. If there is no threshold, the report says "threshold not approved".
Fixing the bottleneck found is done by the task assignee; this skill provides the measurement and the location of the problem.
## Inputs
- Change or scenario, approved budgets.
- Environment and load profile.
## Outputs
- Performance report (`templates/performance-report.md`).
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "performance measurement"` for prior decisions, patterns and lessons.
- [AGENTS.md](../../../AGENTS.md) — the "Invariants" and "Restrictions" sections: the project's rules on measurements and environments.
- A document with performance budgets or non-functional requirements, if the project has one (for example `docs/performance-budgets.md`); otherwise thresholds are a question for the owner.
- [ADR register](../../../docs/adr/README.md) — the chosen storage, queues, caches and tools, including a load testing tool if one was chosen.
- Client build budget configuration, if any (bundler budgets, `size-limit` and similar).
- Report template: [../../../templates/performance-report.md](../../../templates/performance-report.md).
Neighbouring skills — read their SKILL.md instead of repeating them: `test-strategy` (quality gates), `architecture-decisions` (changing the architecture after a measurement), `operations` (observability in production).
## Steps
1. **Question and threshold.** Write down what is being confirmed: a regression, an improvement, acceptance against a budget. Find the threshold in an approved document. Link to the document; do not copy the number.
**Rule:** no approved threshold — the report says "threshold not approved" with a question for the owner. A threshold is never invented or taken "from experience".
Done when the "Question" and "Threshold and source" fields of the report are filled in.
2. **Profile.** Fix the profile before the first run: operation mix and shares, number of parallel users or requests per second, data distribution (volume, "hot" keys), tenant scopes, behaviour of external dependencies (latency, failures, retries), warm-up, duration, number of repetitions, build version, environment parameters (resources, storage version, pool sizes). For the client — browser and device, network, amount of data on screen, scenario.
Done when every field of the template's "Profile" section is filled in.
3. **"Before" measurement.** Run the profile on the version without the change. Server: response time per operation (p50, p95, p99), error rate, CPU and memory, event loop delay or thread utilization, query and transaction time, lock waits, pool utilization, queue length and age, external call latency. Client: initial bundle size against the budget, time to interactive, response to key actions, render duration, number of network requests per scenario.
Done when the raw "before" results are saved and their path is in the report.
4. **Profiling.** Find where the cost is: traces, query plans (`EXPLAIN ANALYZE` or equivalent) under the application role and with a real access scope, waiting locks, CPU and memory profile, browser profile (unnecessary re-renders, repeated requests, large lists without virtualization or server-side pagination).
Done when the report names the cost location with evidence (trace, plan, profile) or says "no bottleneck found" with a list of what was checked.
5. **"After" measurement.** The same profile, the same environment, the same number of repetitions; only the change under test differs.
**Rule:** if the profile or environment changed, the comparison is invalid and the "before" measurement is repeated.
Done when the "Before / After / Change" table is filled in for all metrics from step 3.
6. **Load acceptance** (if required). Scenarios: sustained load, a sharp peak, a slow or failing external dependency, repeated requests and webhooks, concurrent changes to one resource, bulk export, storage failure and recovery. Load against a third-party test environment — only with its owner's permission; against production — never without the owner's decision, and never by an agent.
**Rule:** if the project has not chosen a load testing tool, an ADR is needed. Until the ADR the tool is not added to dependencies; a one-off run names the tool in the report as "preliminary, requires an ADR".
Done when every scenario has a result or the entry "not run" with a reason.
7. **Report.** Write it per the [template](../../../templates/performance-report.md). The outcome is "conforms to the threshold of document X", "does not conform" or "threshold not approved".
Done when the report is attached to the task and tied to the build version and the profile.
## Best practices
- Same profile and environment before and after.
- Compare tails, not means.
- Name the cost location with evidence.
## Common mistakes
- Claims without measurements.
- Invented thresholds.
## Example
Search p95 840 → 190 ms after fixing N+1, measured 3 × 5 minutes on the same profile.
## Reusable prompt
```text
Apply the performance skill (.agents/skills/performance/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Measure before and after on the same profile, profile the cost location and report against the approved threshold.
Cite evidence for every claim; list open questions separately.
```
## Checks
- [ ] Every speed claim rests on "before" and "after" measurements on the same load profile and in the same environment.
- [ ] Tails (p95, p99) are compared, not only the mean; the number of run repetitions is stated.
- [ ] Thresholds — a link to an approved document or "threshold not approved"; no threshold "from experience".
- [ ] Errors, timeouts and retries are counted separately from successful responses.
- [ ] Measurements run under the application role with real access restrictions, not as a superuser.
- [ ] Build budgets and check thresholds are not weakened to make them pass.
- [ ] The load testing tool is not added to dependencies without an ADR.
- [ ] No runs against production or third-party environments without permission.
## Out of scope
- Fixing queries, schema, code and UI — the task assignee (`software-engineer`) per the `task-execution` skill.
- Choosing a load testing tool and changing the architecture after a measurement — `architecture-decisions` and an ADR.
- Approving p95/p99 budgets and numeric targets — the product and release owner.
- Observability, alerts and production operations — `operations`.