agentleFS
CaduS0uzaCaduS0uza/qa-supreme/skills/load-and-stress/SKILL.md

load-and-stress

Skill1 starsChanged 2 months agoMITView on GitHub

Design and run load, stress, soak and spike tests with k6 or Artillery, with thresholds that fail the build, realistic traffic shapes, and analysis that names the bottleneck. Use when asked about load testing, scalability, capacity, or "can we handle launch".

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run load before launch, soak before a long weekend, stress before you promise a number.

    line 18
  2. Distinctive:

    Warm up: before measuring, and discard the ramp from the analysis window.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Load & Stress

Pick the right shape

TestShapeAnswers
Loadexpected peak, held 10-30 mindoes it meet SLO at normal peak
Stressramp until it breakswhere is the ceiling, and how does it fail
Spike0 -> peak in secondscan it absorb a launch/campaign
Soakmoderate load, 2-12hmemory leaks, connection exhaustion, log disk
Breakpointslow linear ramp, no capthe exact concurrency where p95 crosses the SLO

Run load before launch, soak before a long weekend, stress before you promise a number.

k6 with thresholds that gate

import http from 'k6/http'
import { check, sleep } from 'k6'

export const options = {
  stages: [ { duration: '2m', target: 100 }, { duration: '10m', target: 100 }, { duration: '2m', target: 0 } ],
  thresholds: {
    http_req_failed: ['rate<0.01'],                  // < 1% errors
    http_req_duration: ['p(95)<800', 'p(99)<2000'],  // latency SLO
    checks: ['rate>0.99'],
  },
}

export default function () {
  const res = http.get(`${__ENV.BASE_URL}/api/products`, { headers: { Authorization: `Bearer ${__ENV.TOKEN}` } })
  check(res, { 'status 200': r => r.status === 200, 'has rows': r => r.json('items').length > 0 })
  sleep(Math.random() * 2 + 1)          // think time — back-to-back requests are not users
}

thresholds is what turns a load script into a test: k6 exits non-zero when they breach.

Realism rules (skip these and the numbers are fiction)

  • Think time and pacing. Real users pause. Zero think time measures your load generator.
  • Traffic mix by real proportion: 80% browse, 15% search, 5% checkout — take it from analytics.
  • Cache-realistic data: random ids across the real key space, not the same row 100k times.
  • Auth per virtual user, from a pool. One shared token measures one session's cache.
  • Test the environment you will ship, or scale results explicitly and label them as estimates.
  • Warm up before measuring, and discard the ramp from the analysis window.

Reading results

Report percentiles, never averages — the average hides the users who left. Correlate the client metrics with server metrics at the same timestamps: CPU, memory, connection pool saturation, database locks, GC pauses. The bottleneck is where the queue forms, and it is usually the pool, not the CPU.

Output

LOAD 100 VU / 10 min  BASE=staging
  http_req_failed   0.4%   threshold <1%    PASS
  p95 latency       740ms  threshold <800   PASS
  p99 latency       3.1s   threshold <2000  FAIL
  bottleneck: db connection pool saturated at 92 VU (pool=20, avg wait 1.4s)
VERDICT: fails p99 SLO from ~90 concurrent users. Raise pool or add a read replica.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.