api-load-tester
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "api-load-tester" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-32fd9d30e319e138b1f1803306e15566f7c98fdc882ca7476fe8fd0477515e55. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Generate and run API load-test scripts using k6, wrk, or autocannon. Create realistic test scenarios from an OpenAPI spec, route files, or endpoint descriptions. Use when you need to perform load testing, stress testing, benchmarking, or identify API performance bottlenecks. Trigger words: load test, stress test, benchmark, RPS, concurrent users, breaking point, performance test, k6, wrk.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: api-load-tester
description: >-
Generates and executes load test scripts for APIs using k6, wrk, or
autocannon. Creates realistic test scenarios from OpenAPI specs, route
files, or endpoint descriptions. Use when someone needs to load test,
stress test, benchmark, or find the breaking point of their API.
Trigger words: load test, stress test, benchmark, RPS, concurrent users,
breaking point, performance test, k6, wrk.
license: Apache-2.0
compatibility: "Requires k6, wrk, or autocannon installed; Node.js for autocannon"
metadata:
author: terminal-skills
version: "1.0.0"
category: devops
tags: ["load-testing", "performance", "api", "k6", "benchmarking"]API Load Tester
Overview
This skill generates realistic load test scripts from API definitions and executes them with proper ramp-up patterns, authentication flows, and assertions. It produces clear reports identifying breaking points, bottlenecks, and latency percentiles at each traffic level.
Instructions
Step 1: Choose Tool and Gather API Info
Prefer k6 for complex scenarios (multi-step flows, thresholds, custom metrics). Use wrk for quick single-endpoint benchmarks. Use autocannon if only Node.js is available.
Gather endpoint information from:
- OpenAPI/Swagger spec files
- Route definitions (Express, FastAPI, etc.)
- User-described endpoints
Step 2: Generate Realistic Payloads
Read request/response types from the codebase (TypeScript interfaces, Python dataclasses, Go structs) and generate payloads with:
- Realistic field values (not "test123" or "foo")
- Proper data distributions (varied product IDs, realistic quantities)
- Edge cases mixed in (long strings, special characters at ~5% rate)
Step 3: Design Test Scenarios
Create scenarios appropriate for the goal:
Ramp-up test (finding breaking point):
stages: [
{ duration: '2m', target: 50 }, // warm-up
{ duration: '5m', target: 200 }, // ramp
{ duration: '3m', target: 500 }, // push
{ duration: '2m', target: 500 }, // sustain
{ duration: '2m', target: 0 }, // cool-down
]
Soak test (finding memory leaks, connection exhaustion):
stages: [
{ duration: '5m', target: 100 }, // ramp
{ duration: '60m', target: 100 }, // sustain
{ duration: '5m', target: 0 }, // cool-down
]
Spike test (sudden traffic burst):
stages: [
{ duration: '2m', target: 50 }, // normal
{ duration: '30s', target: 500 }, // spike
{ duration: '5m', target: 500 }, // sustain spike
{ duration: '30s', target: 50 }, // drop back
]
Step 4: Include Proper Assertions
Always add thresholds:
thresholds: {
http_req_duration: ['p(95)<800', 'p(99)<2000'],
http_req_failed: ['rate<0.05'],
// Custom per-endpoint if needed
}
Step 5: Execute and Report
Run the test and parse output into a structured report showing:
- Latency percentiles (p50, p95, p99) per stage
- Error rate per stage
- Requests per second achieved
- Breaking point (where thresholds first violated)
- Bottleneck hypothesis based on error patterns
Examples
Example 1: Quick Endpoint Benchmark
User prompt:
Benchmark our /api/search endpoint handling 100 concurrent connections
Agent output:
# Quick benchmark with k6
k6 run --vus 100 --duration 60s - <<'EOF'
import http from 'k6/http';
import { check } from 'k6';
export default function () {
const res = http.get('https://api.example.com/api/search?q=laptop&page=1');
check(res, { 'status 200': (r) => r.status === 200 });
}
EOF
Results — /api/search @ 100 VUs for 60s
Requests: 8,423 total (140.4 RPS)
Latency: p50=89ms p95=340ms p99=890ms
Errors: 12 (0.14%)
Data: 24.3 MB received
Verdict: Endpoint handles 140 RPS at 100 VUs. p99 approaching 1s suggests
database query optimization needed for sustained higher load.
Example 2: Multi-Step Flow
User prompt:
Create a load test for our signup → login → create-project flow
Agent generates a k6 script with:
- Step 1: POST /api/auth/signup with randomized email/name
- Step 2: POST /api/auth/login to get JWT
- Step 3: POST /api/projects with auth header and realistic project data
- Custom metrics tracking each step's latency separately
- Sleep between steps to simulate real user behavior
Guidelines
- Never load test production without explicit confirmation — always clarify the target environment
- Start low, ramp gradually — sudden jumps make it hard to identify the exact breaking point
- Realistic think time — add
sleep(1-3)between requests to simulate real users; without it, you're testing throughput, not user concurrency - Authentication matters — many bottlenecks only appear with real auth flows (token validation, session lookups)
- Watch for connection reuse — k6 reuses connections by default, which is realistic for browsers but not for serverless/mobile clients
- Rate limit awareness — if the API has rate limiting, note it in the report; it's not a performance bottleneck, it's intentional
- Report infrastructure context — always note the server specs, pod count, and database size alongside results
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 API 负载测试脚本生成与执行能力,适用于开发、运维、性能测试等高频刚需场景
- 支持多种工具(k6、wrk、autocannon)和测试场景(Ramp-up、Soak、Spike)
- 能显著提升 API 性能评估效率,识别性能瓶颈和断点
Highlights
- 触发词完整且精准,覆盖 load test、stress test、benchmark、RPS、concurrent users、breaking point、performance test、k6、wrk
- 边界清晰,不易与其他 Skill 重叠
Highlights
- Phase/步骤清晰(Step 1-5),逻辑连贯
- 包含端到端示例(Example 1 & 2),便于用户理解执行流程
- frontmatter 完整,单文件未超 500 行
Highlights
- 工具来源明确(k6、wrk、autocannon),参数正确
- 覆盖主要异常(如生产环境确认、认证流程、断言阈值)
- 不可逆操作有确认机制(Never load test production without explicit confirmation)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- api.example.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.