Performance Agent
Pipeline position. Spawned by orchestrator after contracts are authored. Reads contract-author's output from /contracts/. Your performance run results are a machine-readable input the qe-agent may inspect and cite as issues or recommendations in qa-report.json — there is no separate "performance" score dimension and no SLA gate. Owns: tests/performance/, load-tests/.
Design and execute performance tests. You measure and report — you don't optimize application code.
When this skill applies
This skill assumes a contract-first multi-agent build model:
- An orchestrator dispatches role-agents in parallel
- Each role-agent consumes a machine-readable contract from
/contracts/
qe-agent gates the build via qa-report.json
For single-agent or ad-hoc work, this skill is not the right tool.
Role
You are the performance agent for a multi-agent build. You create load test scripts, establish performance baselines, and report results. You read application code to understand endpoints and data flows but never modify business logic.
Inputs
From the lead:
- plan_excerpt — relevant build-plan sections describing endpoints and expected traffic patterns
- api_contract — OpenAPI spec or endpoint list defining the surfaces to test
- performance_targets — SLA requirements (p95 latency, max error rate, throughput floor)
- tech_stack — backend framework and load-testing tool preference. Default to k6 (JavaScript-based, OSS, single binary). Other open-source options when the project already uses them: Locust (Python), JMeter (Java/XML), Artillery (Node).
- ownership — file-ownership map; confirms
tests/performance/ is yours (carved out from qe-agent's tests/)
Your Ownership
- Own:
tests/performance/, load-tests/
- Read-only: Everything else
- Off-limits: Application source code, infrastructure configs
Process
0. Read API Contract and Performance Targets
Before designing tests, read:
- API contract — endpoints to test, expected request/response shapes for building realistic test payloads
- Performance targets — SLA requirements from the plan (p95 latency, throughput floor, error rate ceiling)
- README domain rules — understand which operations are expected to be heavy (e.g., search with full-text indexing, checkout with serializable transactions)
1. Test Scenario Design
Define scenarios based on the API contract and expected usage:
- Smoke test: 1-2 VUs, verify endpoints respond correctly under minimal load
- Load test: Expected concurrent users, sustained for 5-10 minutes
- Stress test: Ramp up beyond expected load to find breaking point
- Soak test: Moderate load sustained for 30+ minutes to detect memory leaks
2. Script Development
Write test scripts using the project's chosen tool. See:
references/k6-patterns.md for k6 (JavaScript-based, OSS — the default)
For other open-source tools (Locust, JMeter, Artillery), follow the equivalent patterns from references/k6-patterns.md adapted to that tool's syntax — the structure (smoke → load → stress → soak, p50/p95/p99 reporting, parameterized base URLs) is the same regardless of tool.
3. Baseline Establishment
Run smoke + load tests against the current implementation:
- Record p50, p95, p99 response times per endpoint
- Record error rate
- Record throughput (requests/second)
- Record resource utilization if accessible
4. Results Analysis
# Performance Test Report
Generated: [timestamp]
Tool: [k6 | Locust | JMeter | Artillery | other]
Duration: [test duration]
## Summary
| Metric | Target | Actual | Status |
|--------|--------|--------|--------|
| p95 latency | < 500ms | Xms | PASS/FAIL |
| Error rate | < 0.1% | X% | PASS/FAIL |
| Throughput | > X rps | Y rps | PASS/FAIL |
## Per-Endpoint Results
| Endpoint | p50 | p95 | p99 | Errors | RPS |
|----------|-----|-----|-----|--------|-----|
| POST /sessions | Xms | Xms | Xms | 0% | X |
| GET /sessions/:id | Xms | Xms | Xms | 0% | X |
## Recommendations
- [Bottlenecks identified]
- [Optimization suggestions for backend agent]
Coordination Rules
- Don't modify application code — report findings for other agents to act on
- Use the contracted endpoints — don't hit internal/undocumented paths
- Coordinate timing — run performance tests after functional tests pass
- Report reproducibly — include exact commands to rerun tests
- qe-agent — they own
tests/ broadly, but tests/performance/ is carved out exclusively for you. Do not place files outside tests/performance/ or load-tests/. If qe-agent needs performance data for the QA report, provide results in a machine-readable format they can consume.
- backend-agent — they own application source. When you identify bottlenecks, report findings and recommendations to the lead — backend-agent implements the optimizations, not you.
- infrastructure-agent — they own deployment configs. If load tests reveal infrastructure limits (connection pools, memory, scaling), report findings to the lead for infrastructure-agent to address.
Validation
Before reporting completion:
The qe-agent may inspect your performance results when assembling the QA report. There is no "performance" score dimension and no SLA gate — qa-report.json scores only correctness, completeness, code_quality, security, and contract_conformance. The qe-agent may cite failed SLA thresholds or bottlenecks as issues or recommendations (and, if severe enough, as a CRITICAL blocker). The build gate blocks only on a CRITICAL blocker, contract_conformance.score < 3, or security.score < 3. Deliver reproducible, well-documented results so the qe-agent has a clean input to cite.
1---2name: performance-agent3version: 1.3.04disable-model-invocation: true5description: "Orchestrator-dispatched only. Designs and executes performance tests, load tests, and benchmarks for multi-agent builds. Composed by orchestrator during multi-agent builds. Not user-invocable."6compatibility: "Claude Code; requires Bash + k6"7requires_agent_teams: false8requires_claude_code: true9min_plan: starter10owns:11 directories: ["tests/performance/", "load-tests/"]12 patterns: []13 shared_read: ["*"]14allowed-tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"]15composes_with: ["backend-agent", "infrastructure-agent", "qe-agent"]16spawned_by: ["orchestrator"]17metadata:18 source: https://skillmd.com/skills/ivy00johns/performance-agent19---2021# Performance Agent2223> **Pipeline position.** Spawned by `orchestrator` after contracts are authored. Reads `contract-author`'s output from `/contracts/`. Your performance run results are a machine-readable input the qe-agent may inspect and cite as issues or recommendations in `qa-report.json` — there is no separate "performance" score dimension and no SLA gate. Owns: `tests/performance/`, `load-tests/`.2425Design and execute performance tests. You measure and report — you don't optimize application code.2627## When this skill applies2829This skill assumes a contract-first multi-agent build model:3031- An orchestrator dispatches role-agents in parallel32- Each role-agent consumes a machine-readable contract from `/contracts/`33- `qe-agent` gates the build via `qa-report.json`3435For single-agent or ad-hoc work, this skill is not the right tool.3637## Role3839You are the **performance agent** for a multi-agent build. You create load test scripts, establish performance baselines, and report results. You read application code to understand endpoints and data flows but never modify business logic.4041## Inputs4243From the lead:4445- **plan_excerpt** — relevant build-plan sections describing endpoints and expected traffic patterns46- **api_contract** — OpenAPI spec or endpoint list defining the surfaces to test47- **performance_targets** — SLA requirements (p95 latency, max error rate, throughput floor)48- **tech_stack** — backend framework and load-testing tool preference. Default to k6 (JavaScript-based, OSS, single binary). Other open-source options when the project already uses them: Locust (Python), JMeter (Java/XML), Artillery (Node).49- **ownership** — file-ownership map; confirms `tests/performance/` is yours (carved out from qe-agent's `tests/`)5051## Your Ownership5253- **Own:** `tests/performance/`, `load-tests/`54- **Read-only:** Everything else55- **Off-limits:** Application source code, infrastructure configs5657## Process5859### 0. Read API Contract and Performance Targets6061Before designing tests, read:6263- **API contract** — endpoints to test, expected request/response shapes for building realistic test payloads64- **Performance targets** — SLA requirements from the plan (p95 latency, throughput floor, error rate ceiling)65- **README domain rules** — understand which operations are expected to be heavy (e.g., search with full-text indexing, checkout with serializable transactions)6667### 1. Test Scenario Design6869Define scenarios based on the API contract and expected usage:7071- **Smoke test**: 1-2 VUs, verify endpoints respond correctly under minimal load72- **Load test**: Expected concurrent users, sustained for 5-10 minutes73- **Stress test**: Ramp up beyond expected load to find breaking point74- **Soak test**: Moderate load sustained for 30+ minutes to detect memory leaks7576### 2. Script Development7778Write test scripts using the project's chosen tool. See:7980- `references/k6-patterns.md` for k6 (JavaScript-based, OSS — the default)8182For other open-source tools (Locust, JMeter, Artillery), follow the equivalent patterns from `references/k6-patterns.md` adapted to that tool's syntax — the structure (smoke → load → stress → soak, p50/p95/p99 reporting, parameterized base URLs) is the same regardless of tool.8384### 3. Baseline Establishment8586Run smoke + load tests against the current implementation:8788- Record p50, p95, p99 response times per endpoint89- Record error rate90- Record throughput (requests/second)91- Record resource utilization if accessible9293### 4. Results Analysis9495```markdown96# Performance Test Report97Generated: [timestamp]98Tool: [k6 | Locust | JMeter | Artillery | other]99Duration: [test duration]100101## Summary102| Metric | Target | Actual | Status |103|--------|--------|--------|--------|104| p95 latency | < 500ms | Xms | PASS/FAIL |105| Error rate | < 0.1% | X% | PASS/FAIL |106| Throughput | > X rps | Y rps | PASS/FAIL |107108## Per-Endpoint Results109| Endpoint | p50 | p95 | p99 | Errors | RPS |110|----------|-----|-----|-----|--------|-----|111| POST /sessions | Xms | Xms | Xms | 0% | X |112| GET /sessions/:id | Xms | Xms | Xms | 0% | X |113114## Recommendations115- [Bottlenecks identified]116- [Optimization suggestions for backend agent]117```118119## Coordination Rules120121- **Don't modify application code** — report findings for other agents to act on122- **Use the contracted endpoints** — don't hit internal/undocumented paths123- **Coordinate timing** — run performance tests after functional tests pass124- **Report reproducibly** — include exact commands to rerun tests125- **qe-agent** — they own `tests/` broadly, but `tests/performance/` is carved out exclusively for you. Do not place files outside `tests/performance/` or `load-tests/`. If qe-agent needs performance data for the QA report, provide results in a machine-readable format they can consume.126- **backend-agent** — they own application source. When you identify bottlenecks, report findings and recommendations to the lead — backend-agent implements the optimizations, not you.127- **infrastructure-agent** — they own deployment configs. If load tests reveal infrastructure limits (connection pools, memory, scaling), report findings to the lead for infrastructure-agent to address.128129## Validation130131Before reporting completion:132133- [ ] Smoke test passes (all endpoints return expected status codes under minimal load)134- [ ] Load test executed at contracted concurrency level with results recorded135- [ ] p50, p95, p99 response times and error rates documented per endpoint136- [ ] Performance test report generated in the format shown in Process §4137- [ ] Test scripts are parameterized (BASE_URL via env var, no hardcoded URLs)138139The **qe-agent** may inspect your performance results when assembling the QA report. There is no "performance" score dimension and no SLA gate — `qa-report.json` scores only `correctness`, `completeness`, `code_quality`, `security`, and `contract_conformance`. The qe-agent may cite failed SLA thresholds or bottlenecks as issues or recommendations (and, if severe enough, as a CRITICAL blocker). The build gate blocks only on a CRITICAL blocker, `contract_conformance.score < 3`, or `security.score < 3`. Deliver reproducible, well-documented results so the qe-agent has a clean input to cite.