Index of every page on this site: llms.txt
All skills
Run it yourself

Execute comprehensive load and stress testing to validate API performance and scalability. Use when validating API performance under load. Trigger with phrases like "load test the API", "stress test API", or "benchmark API performance".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/load-testing-apis

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈64 tokens for metadata: the name and description. ≈1.2k when used: this file. ≈1.6k more on demand in 3 files.

Description uses 3.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈256 characters, or 3.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Load Testing APIs

Overview

Execute comprehensive load, stress, and soak tests to validate API performance, identify bottlenecks, and establish throughput baselines. Generate test scripts for k6, Artillery, or wrk that simulate realistic traffic patterns with configurable virtual user ramp-up, request distribution, and failure threshold assertions.

Prerequisites

  • Load testing tool installed: k6 (recommended), Artillery, wrk, or Apache JMeter
  • Target API deployed in a staging/performance environment (never load test production without safeguards)
  • Monitoring stack accessible: Grafana/Prometheus, Datadog, or CloudWatch for correlating test results with server metrics
  • API authentication credentials for testing (API keys, test user JWT tokens)
  • Baseline performance SLOs defined (target p95 latency, max error rate, minimum throughput)

Instructions

  1. Read the API specification and route definitions using Glob and Read to build a complete list of endpoints, identifying high-traffic paths and resource-intensive operations.
  2. Define test scenarios modeling realistic user behavior: browsing (80% reads), checkout (mixed reads + writes), and spike traffic patterns with appropriate think times between requests.
  3. Generate k6 or Artillery test scripts with configurable stages: ramp-up (2 min), sustained load (10 min), spike (2 min at 3x), and cool-down (2 min).
  4. Configure request distribution to match production traffic patterns -- weighted random selection across endpoints rather than uniform distribution.
  5. Add threshold assertions for pass/fail criteria: p95 response time < 500ms, error rate < 1%, throughput > 100 requests/second.
  6. Implement data-driven requests using CSV or JSON fixtures for realistic payloads, unique user IDs, and varied query parameters to avoid cache-only testing.
  7. Execute baseline test at expected production load, then gradually increase to 2x, 5x, and 10x to identify the breaking point and saturation behavior.
  8. Analyze results: correlate latency spikes with server metrics (CPU, memory, DB connections, event loop lag), identify the bottleneck (database, network, compute), and document findings.
  9. Generate a performance report comparing results against SLO thresholds with recommendations for optimization.

See references/implementation.md for the full implementation guide.

Output

  • ${CLAUDE_SKILL_DIR}/load-tests/scenarios/ - k6/Artillery test scripts per traffic scenario
  • ${CLAUDE_SKILL_DIR}/load-tests/data/ - Test data fixtures (users, payloads, tokens)
  • ${CLAUDE_SKILL_DIR}/load-tests/thresholds.json - Pass/fail threshold configuration
  • ${CLAUDE_SKILL_DIR}/reports/load-test-results.json - Raw test results with timing data
  • ${CLAUDE_SKILL_DIR}/reports/load-test-summary.md - Human-readable performance analysis report
  • ${CLAUDE_SKILL_DIR}/reports/bottleneck-analysis.md - Identified bottlenecks with remediation recommendations

Error Handling

Error Cause Solution
Connection refused Target server ran out of file descriptors or connection pool exhausted Increase server ulimit and connection pool size; note the concurrent connection limit
Timeout spike at ramp-up Server cannot handle connection establishment rate Implement connection pre-warming; increase ramp-up duration; add connection pooling
429 responses dominate results Rate limiter engaging during load test Whitelist load test source IPs in rate limiter; or test rate limiter behavior separately
Inconsistent baseline results Shared staging environment with other traffic Isolate test environment; run tests during off-hours; use dedicated performance environment
Memory leak detected Soak test shows steadily increasing memory over hours Flag for development team; identify leaking endpoint by isolating test scenarios

Refer to references/errors.md for comprehensive error patterns.

Examples

E-commerce checkout flow: Simulate 500 concurrent users browsing products (GET, 70%), adding to cart (POST, 20%), and completing checkout (POST, 10%) with 2-5 second think times between actions.

API spike test: Ramp from 50 to 1000 virtual users in 30 seconds to simulate traffic spike from marketing campaign launch, verifying the auto-scaler responds and latency recovers within 60 seconds.

Soak test for memory leaks: Sustain 200 concurrent users for 4 hours, monitoring server memory, connection counts, and response times for degradation patterns indicating resource leaks.

See references/examples.md for additional examples.

Resources

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts27d3 checks · Risk SAFE
  • Gen Agent Trust Hub27d

    The skill automates API load testing by generating and executing scripts for tools like k6 and Artillery. It analyzes API specifications to determine endpoints and test logic. Security considerations include the risk of indirect prompt injection from untrusted API definitions and the execution of dynamically generated scripts.

  • Socket27d

    No alerts

  • Snyk27d

    Risk: LOW · No issues

Signed by skilld at 820dfc8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated last month
What it can do
Reads files Edits files Runs commands
version
1.25.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "api",
  "testing",
  "performance",
  "scaling"
]
All 6 allowed tools
ReadWriteEditGrepGlobBash(api:load-*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/load-testing-apis