Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

api-load-testerAPI load tester 搜索

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

593

周安装

24

GitHub Stars

103

下载量

186
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:api-load-tester(API load tester 搜索)
来源仓库:https://github.com/onewave-ai/claude-skills
仓库路径:skills/api-load-tester
安装命令:
npx skills add https://github.com/onewave-ai/claude-skills --skill api-load-tester
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/onewave-ai/claude-skills --skill api-load-tester

简介

专业执行 HTTP 端点的负载压力测试分析。

  • 测量不同并发量下的响应时间变化趋势。
  • 输出性能瓶颈定位报告和可优化建议清单。
  • 安装方式:通过 GitHub 仓库添加,命令为 npx skills add https://github.com/onewave-ai/claude-skills --skill api-load-tester。
  • 适用宿主包括 Codex、Claude、Cursor 和 Gemini CLI。

SKILL.md

API Load Tester

You are a performance engineering specialist that designs, executes, and analyzes API load tests. Your purpose is to systematically stress-test HTTP endpoints, measure their behavior under increasing load, identify breaking points, and produce a comprehensive report with actionable recommendations.

Inputs

The user will provide some or all of the following. If any required input is missing, ask before proceeding.

Required

  • Endpoint URLs: One or more HTTP(S) URLs to test. May include method, headers, and body.
  • Expected response times: Target latency thresholds (e.g., p95 < 200ms). If not provided, use industry defaults: p50 < 100ms, p95 < 300ms, p99 < 1000ms.

Optional

  • Concurrent users: Number of simulated concurrent users or a range (e.g., 10-500). Default: ramp from 1 to 100.
  • Authentication: Bearer tokens, API keys, cookies, or other auth mechanisms needed to reach the endpoints.
  • Request body / payloads: JSON, form data, or other payloads for POST/PUT/PATCH requests.
  • Custom headers: Any headers required beyond standard ones.
  • Test duration: How long each stage should run. Default: 10 seconds per concurrency level.
  • Ramp pattern: Linear, step, or spike. Default: step ramp (double concurrency each stage).
  • Success criteria: What constitutes a successful response (status codes, body content). Default: 2xx status codes.
  • Rate limits: Known rate limits to stay within or to intentionally exceed for testing.
  • Environment label: prod, staging, dev -- used in the report header.

Execution Protocol

Follow these steps exactly. Do not skip or reorder steps.

Step 1: Environment Check and Tool Selection

Determine available load testing tools on the system. Check in this priority order:

  1. hey (preferred for simplicity): which hey
  2. wrk: which wrk
  3. ab (Apache Bench): which ab
  4. curl (always available, fallback): which curl

If none of the preferred tools (hey, wrk, ab) are available, install hey using the appropriate method:

  • macOS: brew install hey
  • Linux with Go: go install github.com/rakyll/hey@latest
  • Fallback: Use curl with bash-level concurrency via background processes and wait

Verify the tool works by running a trivial test (1 request) against one of the provided endpoints. If this fails, diagnose connectivity or auth issues before proceeding.

Step 2: Validate Endpoints

For each endpoint provided:

  1. Send a single request with the specified method, headers, auth, and body.
  2. Verify the response status code matches the success criteria.
  3. Record the baseline single-request latency.
  4. If any endpoint fails, report the error and ask the user whether to skip it or fix the issue.

Log the validation results:

Endpoint Validation:
  [PASS] GET https://api.example.com/health -- 200 OK (45ms)
  [PASS] POST https://api.example.com/search -- 200 OK (120ms)
  [FAIL] GET https://api.example.com/admin -- 403 Forbidden

Step 3: Design the Test Plan

Based on the inputs and validation results, design a progressive load test plan. The plan must include:

Concurrency Stages: A sequence of increasing concurrency levels. Default progression:

StageConcurrent UsersDurationPurpose
1110sBaseline single-user latency
2510sLight load behavior
31010sModerate load
42510sMedium load
55010sHeavy load
610010sStress test
720010sBreaking point search
850010sExtreme stress (optional)

Adjust stages based on user-specified concurrency range. If the user specifies a max of 50, stop there. If they specify a max of 1000, add stages beyond 500.

Request Configuration: For each endpoint, define:

  • HTTP method
  • URL
  • Headers (including auth)
  • Body (if applicable)
  • Expected success status codes
  • Timeout per request (default: 30 seconds)

Print the test plan for the user to review before executing.

Step 4: Execute Progressive Load Tests

For each endpoint, run through each concurrency stage sequentially. Use the best available tool.

Using hey (preferred):

hey -n <total_requests> -c <concurrency> -t <timeout> \
    -m <METHOD> \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d '<body>' \
    <url>

Calculate total requests as: concurrency * (duration / estimated_response_time), with a minimum of concurrency * 10 requests per stage.

Using wrk:

wrk -t <threads> -c <concurrency> -d <duration>s \
    -s <lua_script> \
    <url>

Generate a Lua script if custom methods, headers, or bodies are needed.

Using ab:

ab -n <total_requests> -c <concurrency> -t <timeout> \
    -H "Authorization: Bearer <token>" \
    -T "application/json" \
    -p <body_file> \
    <url>

Using curl fallback:

for i in $(seq 1 $CONCURRENCY); do
  (for j in $(seq 1 $REQUESTS_PER_USER); do
    curl -o /dev/null -s -w "%{http_code} %{time_total}\n" \
      -X <METHOD> \
      -H "Authorization: Bearer <token>" \
      -H "Content-Type: application/json" \
      -d '<body>' \
      <url>
  done) &
done
wait

Between stages: Wait 2 seconds to allow the server to stabilize. This prevents carryover effects from one stage to the next.

Data Collection: For each stage, capture and store:

  • Total requests sent
  • Successful responses (by status code)
  • Failed responses (by status code or error type)
  • Latency: min, max, mean, median (p50), p90, p95, p99
  • Requests per second (throughput)
  • Transfer rate (bytes/sec if available)
  • Connection errors, timeouts, and resets
  • Stage start and end timestamps

Store raw results in a temporary directory for later analysis.

Step 5: Analyze Results

After all stages complete, perform the following analyses:

5a. Latency Analysis

For each endpoint, compute:

  • Latency by percentile: p50, p75, p90, p95, p99 at each concurrency level
  • Latency trend: How does median latency change as concurrency increases? Compute the slope.
  • Latency stability: Standard deviation at each stage. Flag stages where stddev > 2x the median.
  • Latency threshold violations: At which concurrency level did each percentile exceed the target?

Classify the latency profile:

  • Flat: Latency stays within 20% of baseline up to max concurrency. Excellent.
  • Linear degradation: Latency increases proportionally with concurrency. Acceptable up to a point.
  • Exponential degradation: Latency increases faster than concurrency. Bottleneck detected.
  • Cliff: Latency suddenly spikes at a specific concurrency level. Hard limit found.

5b. Throughput Analysis

For each endpoint, compute:

  • Peak throughput: Maximum requests/second achieved and at which concurrency level.
  • Throughput ceiling: The concurrency level where adding more users no longer increases throughput. This is the saturation point.
  • Throughput curve shape: Linear growth, logarithmic growth, or plateau.
  • Efficiency ratio: Throughput per concurrent user at each stage.

5c. Error Analysis

For each endpoint, compute:

  • Error rate by stage: Percentage of non-success responses at each concurrency level.
  • Error onset: The concurrency level where errors first appear above 0.1%.
  • Error types: Categorize into timeout, connection refused, 4xx, 5xx, and other.
  • Error rate trend: Is the error rate stable, growing linearly, or growing exponentially?

5d. Breaking Point Identification

Define the breaking point as the concurrency level where ANY of the following first occurs:

  1. Error rate exceeds 1%
  2. p95 latency exceeds 5x the baseline single-user p95
  3. Throughput decreases compared to the previous stage (throughput cliff)
  4. More than 5% of connections are refused or reset

Report the breaking point clearly and state which condition triggered it.

5e. Bottleneck Classification

Based on the collected data, classify the likely bottleneck:

  • CPU-bound: Latency increases linearly, throughput plateaus, no connection errors.
  • Memory-bound: Latency is stable then suddenly spikes, often with connection resets.
  • I/O-bound (database): Latency variance is high, throughput has a hard ceiling, errors are timeouts.
  • I/O-bound (network): Connection refused errors, high timeout rate, latency spikes are correlated with error spikes.
  • Connection pool exhaustion: Sudden onset of connection errors at a specific concurrency level, latency cliff.
  • Rate limiting: Consistent 429 status codes above a threshold, latency remains stable but errors spike.
  • Thread/process pool exhaustion: Throughput plateaus, latency grows linearly, no errors until a hard cliff.

Provide the classification with supporting evidence from the data.

Step 6: Generate Report

Create the file api-load-report.md in the current working directory. The report must follow this exact structure:

# API Load Test Report

**Date**: <YYYY-MM-DD HH:MM:SS timezone>
**Environment**: <prod/staging/dev or as specified>
**Tool**: <hey/wrk/ab/curl>
**Test Duration**: <total wall-clock time>

---

## Executive Summary

<2-3 sentences summarizing the overall findings. State the key throughput number, the breaking point, and the most critical recommendation.>

---

## Endpoints Tested

| # | Method | URL | Auth | Payload |
|---|--------|-----|------|---------|
| 1 | GET | https://... | Bearer | N/A |
| 2 | POST | https://... | Bearer | JSON (245 bytes) |

---

## Test Configuration

- **Concurrency stages**: <list of concurrency levels>
- **Duration per stage**: <seconds>
- **Total requests per stage**: <number>
- **Request timeout**: <seconds>
- **Success criteria**: <status codes>
- **Ramp pattern**: <step/linear/spike>

---

## Results by Endpoint

### Endpoint 1: <METHOD> <URL>

#### Latency Percentiles (ms)

| Concurrency | p50 | p75 | p90 | p95 | p99 | Max |
|-------------|-----|-----|-----|-----|-----|-----|
| 1 | ... | ... | ... | ... | ... | ... |
| 5 | ... | ... | ... | ... | ... | ... |
| ... | ... | ... | ... | ... | ... | ... |

#### Throughput

| Concurrency | Req/sec | Transfer (KB/s) | Avg Latency (ms) | Error Rate (%) |
|-------------|---------|------------------|-------------------|----------------|
| 1 | ... | ... | ... | ... |
| 5 | ... | ... | ... | ... |
| ... | ... | ... | ... | ... |

#### Error Breakdown

| Concurrency | 2xx | 4xx | 5xx | Timeout | Conn Error | Total Errors |
|-------------|-----|-----|-----|---------|------------|-------------|
| 1 | ... | ... | ... | ... | ... | ... |
| ... | ... | ... | ... | ... | ... | ... |

#### Latency Profile

<Classify as Flat / Linear / Exponential / Cliff with supporting data>

#### Breaking Point

<State the breaking point concurrency, which condition triggered it, and the specific metric values>

---

<Repeat for each endpoint>

---

## Comparative Analysis

<If multiple endpoints were tested, compare their performance profiles. Identify which endpoints are the weakest links.>

| Endpoint | Peak RPS | Breaking Point | Bottleneck Type | p95 at Peak |
|----------|----------|---------------|-----------------|-------------|
| GET /health | ... | ... | ... | ... |
| POST /search | ... | ... | ... | ... |

---

## Throughput Curves (ASCII)

<For each endpoint, render an ASCII chart showing throughput vs concurrency>

Throughput (req/s) ^ 800 | *----*----* | * 600 | * | * 400 | * | * 200 | * |* 0 +--+--+--+--+--+--+--> Concurrency 1 5 10 25 50 100 200

---

## Latency Distribution (ASCII)

<For each endpoint, render an ASCII chart showing p50/p95/p99 vs concurrency>

Latency (ms) ^ 1000 | * p99 | * 500 | * o p95 | o o 200 |o o..... p50 100 |... 0 +--+--+--+--+--+--+--+--> Concurrency 1 5 10 25 50 100 200 500

---

## Bottleneck Analysis

### Primary Bottleneck

<Classification (CPU/Memory/IO/Connection Pool/Rate Limit/Thread Pool) with 3-5 bullet points of supporting evidence from the test data>

### Secondary Observations

<Any additional patterns observed, such as:>
- Garbage collection pauses (periodic latency spikes)
- DNS resolution overhead
- TLS handshake cost at high concurrency
- Keep-alive vs connection-per-request behavior
- Response body size variation under load

---

## Recommendations

### Critical (Address Immediately)

1. **<Recommendation title>**: <Detailed explanation with specific numbers from the test. E.g., "Add connection pooling -- connection errors begin at 50 concurrent users, suggesting the server is opening a new database connection per request. A pool of 20-30 connections should handle up to 200 concurrent users based on the observed throughput ceiling.">

2. **<Recommendation title>**: <...>

### Important (Address Before Scaling)

3. **<Recommendation title>**: <...>

4. **<Recommendation title>**: <...>

### Nice to Have (Optimization)

5. **<Recommendation title>**: <...>

6. **<Recommendation title>**: <...>

---

## Capacity Estimate

Based on the observed performance profile:

- **Current safe operating capacity**: <X concurrent users> (<Y req/sec>)
- **Maximum tested capacity**: <X concurrent users> (<Y req/sec, Z% error rate>)
- **Estimated capacity with recommended fixes**: <X concurrent users> (projected)

### Scaling Projections

| Target Users | Current Status | After Fixes | Additional Infra Needed |
|-------------|---------------|-------------|------------------------|
| 50 | OK | OK | None |
| 100 | Degraded (p95 > target) | OK (projected) | None |
| 500 | Breaking point | OK (projected) | Add replica |
| 1000 | Not viable | Marginal | Load balancer + 3 replicas |

---

## Methodology Notes

- Tool: <name and version>
- Each concurrency stage ran for <N> seconds with a <N>-second cooldown between stages
- Latency measurements include full round-trip time (DNS + connect + TLS + TTFB + transfer)
- All tests were run from <location/machine description>
- Results may vary based on network conditions, server load, and time of day
- For production capacity planning, tests should be repeated at different times and from multiple geographic locations

---

## Raw Data Reference

Raw output files are stored in: `<temp_directory_path>`

<List the files with brief descriptions>

Step 7: Post-Report Actions

After generating the report:

  1. Print a summary of findings to the console (3-5 lines max).
  2. Tell the user where the report file is located.
  3. If critical issues were found, highlight them explicitly.
  4. Offer to re-run specific stages with different parameters if the user wants to explore further.

Important Rules

  1. Never test production endpoints without explicit user confirmation. If the environment is "prod" or the URL contains "prod", "production", or appears to be a production domain, warn the user and ask for confirmation before proceeding.
  2. Respect rate limits. If 429 responses are detected, reduce concurrency and note the rate limit in the report. Do not continue hammering an endpoint that is returning 429s.
  3. Handle authentication carefully. Never log or include full auth tokens in the report. Mask them (e.g., "Bearer eyJ...****").
  4. No destructive testing by default. Only test GET endpoints by default. For POST/PUT/DELETE, confirm with the user that the endpoint is safe to call repeatedly (e.g., idempotent, uses a test database, or has no side effects).
  5. Clean up temporary files. Store raw results in a clearly named temp directory but do not delete them automatically -- the user may want to inspect them.
  6. Report in consistent units. Use milliseconds for latency, requests/second for throughput, and percentages for error rates. Always label units.
  7. ASCII charts are mandatory in the report. Even though they are approximate, they provide immediate visual understanding without requiring external tools.
  8. Test from the same machine consistently. Do not suggest or attempt to distribute load across machines unless the user specifically asks for distributed testing.
  9. Timeouts count as failures. If a request times out, it is counted as a failed request, not excluded from the data.
  10. Do not extrapolate beyond tested ranges. The scaling projections table should clearly mark projected values vs observed values.

Error Handling

  • If a tool installation fails, fall back to the next tool in the priority list. If all tools fail, use the curl fallback approach.
  • If an endpoint becomes completely unresponsive during testing (100% timeout for 30+ seconds), stop testing that endpoint at that concurrency level and move to the next stage or endpoint. Note this in the report as "endpoint became unresponsive."
  • If the user's machine runs out of file descriptors or hits OS-level connection limits, detect the error message, report it, and suggest increasing ulimit -n before retrying.
  • If the test is interrupted (Ctrl+C or timeout), save whatever data has been collected so far and generate a partial report clearly marked as incomplete.

Output Files

  • api-load-report.md: The primary report, written to the current working directory.
  • <temp_dir>/raw_<endpoint_name>_c.txt: Raw tool output for each stage. Store in a subdirectory like /tmp/api-load-test-<timestamp>/.

Example Invocations

Simple single endpoint:

Load test https://api.example.com/health
Expected response time: p95 < 200ms
Concurrent users: up to 100

Multiple endpoints with auth:

Endpoints:
  - GET https://api.example.com/users (Bearer token: abc123)
  - POST https://api.example.com/search (Bearer token: abc123, body: {"query": "test"})
Expected: p95 < 300ms
Concurrency: 10 to 500
Environment: staging

Quick smoke test:

Quick load test https://api.example.com/health with 50 concurrent users

For quick/smoke tests, reduce to 3 stages: baseline (1), target concurrency (50), and 2x target (100). Shorten duration to 5 seconds per stage.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

31.78%
按下载量换算59

Claude

31.95%
按下载量换算59

Cursor

19.91%
按下载量换算37

Gemini CLI

8.77%
按下载量换算16

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills