← ClaudeAtlas

running-load-tests-with-k6listed

Single source of truth for designing, running, and interpreting k6 load tests against lenne.tech fullstack APIs. Defines installation paths (brew, docker, npm), the three canonical scenarios (smoke / load / soak), endpoint discovery from the generated SDK, realistic Better-Auth login flows, threshold defaults for ~10 concurrent users (p95 < 500ms, error rate < 1%, http_req_failed < 1%), result interpretation, and the optimisation ladder when the system fails (DB indices, query rewrites, caching, connection pool sizing, rate-limit relaxation, payload trimming). Activates whenever an agent or command needs to validate that the API is stable for ~10 concurrent users performing many actions in short time, or to detect performance regressions via k6. Currently used by /lt-dev:production-ready, lt-dev:production-readiness-orchestrator, and lt-dev:performance-reviewer. NOT for Lighthouse frontend performance (use a11y-reviewer). NOT for unit performance assertions (use the test runner directly).
lenneTech/claude-code · ★ 0 · Testing & QA · score 75
Install: claude install-skill lenneTech/claude-code
# Running Load Tests with k6 This skill is the **single source of truth** for k6 load tests in the lenne.tech stack. It exists so every consumer (command, agent, reviewer) produces comparable scenarios with the same thresholds, the same auth flow, and the same optimisation ladder. > **Goal:** Prove the API is stable for **10 concurrent users performing many actions in a short time window** — and surface concrete optimisation steps when it is not. ## When to Use This Skill | Caller | Phase | Trigger | |--------|-------|---------| | `/lt-dev:production-ready` | Phase 3 | Mandatory load-test gate before sign-off | | `lt-dev:production-readiness-orchestrator` | Phase 3 | Runs the scenarios, owns the optimisation loop | | `lt-dev:performance-reviewer` | Phase 7 (optional) | Regression check vs baseline JSON | | Manual user invocation | Ad-hoc | Reproducing a customer-reported slowness | ## Step 1 — Ensure k6 is available Detect first, install only when missing. ```bash command -v k6 >/dev/null 2>&1 && k6 version || echo "missing" ``` Install paths in order of preference: | Platform | Command | |----------|---------| | macOS | `brew install k6` | | Linux (deb) | `sudo gpg -k; sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69; echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sour