load-test-plan
Skill0 starsChanged 18 days agoMITView on GitHub
Designs, writes and interprets HTTP load tests with k6, using open-model arrival rates and SLO thresholds so results reflect real latency. Use when asked to load test, stress test, benchmark an API, find a service's capacity, or check whether an endpoint meets a latency target.
In this repository2 other files it gives its agents.
- incident-runbookSkill
- migration-reviewSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Pin down the target: Ask for (or propose) the SLO: for example p95 < 300 ms, p99 < 800 ms, error rate < 1%.
- Distinctive: line 15
Pick the environment: Never load test production without explicit approval.
- Very specific: line 26
If k6 warns about insufficient VUs (dropped_iterations > 0), raise maxVUs: the generator, not the service, was the limit.
≈ “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.
Files
Load test plan (k6)
A load test answers one question: at what request rate does this service stop meeting its SLO? Agree on that question before writing any script.
Steps
- Pin down the target. Ask for (or propose) the SLO: for example p95 < 300 ms, p99 < 800 ms, error rate < 1%. Ask for expected peak traffic in requests per second, not users.
- Pick the environment. Never load test production without explicit approval. Use a prod-like staging environment, and run k6 from a different machine than the service so the generator doesn't steal its CPU.
- Choose endpoints and mix. Model the real traffic mix (for example 70% reads, 25% list queries, 5% writes). Include auth if production requires it.
- Write the script from the template. Keep the open model (
ramping-arrival-rate); see "Why arrival rate" below. - Run in stages: a smoke run (1-2 rps, 1 minute) to validate the script, then the load profile, then optionally a stress profile that ramps past the expected peak to find the breaking point.
- Watch the system, not just k6: CPU, memory, DB connections, pool wait time, queue depth, error logs. The bottleneck is usually the database or a connection pool.
- Report with the format below.
Why arrival rate
A closed model (fixed VUs, each sending the next request after the previous one returns) slows down when the service slows down, so it sends less load exactly when the service struggles and hides the latency real users would see. This is coordinated omission. An arrival-rate executor keeps sending requests on schedule, so slowdowns show up as latency and dropped iterations, the way they would in production.
If k6 warns about insufficient VUs (dropped_iterations > 0), raise maxVUs: the generator, not the service, was the limit.
Reading results
- Judge latency by p95/p99, never the average. One slow dependency hides in the mean.
- Separate errors by type: 5xx from the service, timeouts, and 429s from your own rate limiter are different findings.
- Capacity is the highest stable rate where every threshold passed for the whole hold period, not the peak of a spike.
- Re-run once. If two runs differ by more than ~10%, the environment is noisy; say so.
Report format
### Load test: <service> <endpoint mix>
**SLO:** p95 < __ ms, p99 < __ ms, errors < __%
**Environment:** <where, instance sizes, data volume>
| Rate (rps) | p95 | p99 | Error rate | Notes |
|-----------:|----:|----:|-----------:|-------|
| 50 | 120 ms | 210 ms | 0.0% | |
| 100 | 290 ms | 640 ms | 0.2% | DB CPU 85% |
| 150 | 1.9 s | 4.1 s | 6.3% | pool exhausted, threshold failed |
**Capacity:** ~100 rps within SLO.
**Bottleneck:** <component and evidence>
**Next step:** <one concrete change and the expected gain>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
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.

