k6 Skills for Claude Code
A Claude Code plugin that provides comprehensive skills for Grafana k6 load testing. Generate test scripts, design load scenarios, analyze results, and operate k6 infrastructure — all through natural language conversations.
Table of Contents
Overview
This plugin extends Claude Code with 8 specialized skills covering the full k6 load testing lifecycle. Each skill contains curated reference documentation synthesized from official k6 docs, enabling Claude to generate accurate, production-ready k6 test scripts and configurations.
What this plugin helps you do:
- Generate load test scripts for HTTP/REST, gRPC, and WebSocket APIs
- Create browser-based performance tests with Web Vitals measurement
- Auto-generate k6 tests from existing codebases or OpenAPI specifications
- Design load profiles with the right executors, scenarios, and thresholds
- Analyze test results, identify bottlenecks, and optimize performance
- Set up k6 in CI/CD pipelines and Kubernetes distributed environments
- Build chaos engineering tests with fault injection
Relationship to the official k6 x agent skills
Since k6 v2.1, k6 x agent init claude-code installs Grafana's own bundled skills (test planner, load/smoke/browser test, Playwright converter) and registers the k6 x mcp server. This plugin complements them: it adds generation from OpenAPI specs and existing codebases, CI/CD and k6-operator operations, results and bottleneck analysis, and resilience testing. The two can be installed side by side; use k6 x mcp's validate_script or k6 inspect to validate scripts generated here.
Supported k6 Versions
| k6 line | Latest release | Status | Plugin support |
|---|
| v2.x | v2.3.0 (2026-09-21) | Current stable | Primary target. All examples are written and checked against this version. |
| v1.x | v1.8.2 (2026-10-12) | Maintenance (security fixes only) | Supported. Differences are marked v1.x: inside each skill. |
| v0.x | v0.59.0 | End of life | Not supported. Upgrade first. |
Every skill starts by determining the k6 version of the environment where the test will run (k6 version, the Docker image tag, the setup-k6-action k6-version input, or the k6-operator runner image), then applies the matching notes. If the version cannot be determined, the skill asks and otherwise assumes v2.x, recording the assumption in a header comment of the generated script. The full feature/version matrix lives in plugins/grafana-k6-skills/skills/operating-k6-in-ci-cd/reference/version-compatibility.md.
Note on resilience testing: xk6-disruptor, which the testing-resilience skill is built on, was archived by Grafana Labs in February 2026 and only builds into k6 v1.x binaries. The skill documents the constraint; see its SKILL.md before use.
Skills
Test Generation
| Skill | Description |
|---|
| generating-api-load-tests | Generate k6 scripts for HTTP/REST, gRPC, and WebSocket. Covers authentication, data parameterization, CRUD patterns, batch requests, and streaming. |
| generating-browser-tests | Create browser-based E2E performance tests using k6's Chromium module. Measure Core Web Vitals (LCP, FCP, CLS, INP, TTFB) and simulate user interactions. |
| generating-tests-from-code | Analyze existing API codebases (Express, NestJS, Spring Boot, FastAPI, Django) to auto-generate k6 tests. Detects authentication middleware and protected endpoints. |
| generating-tests-from-openapi | Generate k6 tests from OpenAPI 3.0/3.1 specifications. Extracts endpoints, parameters, request schemas, and security schemes to produce complete test suites. |
Test Design & Analysis
| Skill | Description |
|---|
| designing-test-scenarios | Design load profiles with the right executor (ramping-vus, constant-arrival-rate, etc.), configure multi-scenario orchestration, and set pass/fail thresholds. |
| analyzing-test-results | Interpret k6 output, analyze HTTP timing breakdowns, identify bottleneck patterns, and provide optimization recommendations. |
Infrastructure & Operations
| Skill | Description |
|---|
| operating-k6-in-ci-cd | Set up k6 in CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), run distributed tests with k6-operator on Kubernetes, and manage xk6 extensions. |
| testing-resilience | Create chaos engineering tests using xk6-disruptor. Inject faults (HTTP errors, network delays, pod termination) into Kubernetes services during load tests. |
Installation