k6-best-practices

Installation
SKILL.md

k6 Scenario Builder

Enforces a consistent, production-ready pattern for k6 load test scripts using JavaScript or TypeScript, covering HTTP/REST, WebSocket, and gRPC protocols.

Output Format

When producing or fixing a script, always deliver three things:

  1. A complete, runnable script file — never a partial snippet.
  2. The exact run command with the environment variables needed.
  3. A one-line explanation of the executor chosen and why it fits the load goal.

When fixing any OOM error or open() misuse, cover both failure modes — even if the user only mentioned one:

  • Plain variable at init context → OOM (data copied per VU). Fix: SharedArray.
  • open() inside default()immediate runtime error (can't call open() in the VU context). Fix: move to init context.

Related skills
Installs
1
GitHub Stars
5
First Seen
Mar 29, 2026