From k6
Configures k6 load testing in CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), distributed testing with k6-operator on Kubernetes, and xk6 extensions for automated performance tests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/k6:operating-k6-in-ci-cdThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure k6 for CI/CD pipelines, distributed testing on Kubernetes, and extension management.
Configure k6 for CI/CD pipelines, distributed testing on Kubernetes, and extension management.
CI/CD Pipeline Setup → See reference/ci-cd-pipelines.md
Distributed Testing (Kubernetes) → See reference/k6-operator.md
Extensions (xk6) → See reference/extensions.md
name: k6 Load Test
on: [push]
jobs:
k6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: grafana/setup-k6-action@v1
- uses: grafana/run-k6-action@v1
with:
path: tests/load-test.js
docker run --rm -i grafana/k6 run - < script.js
# With local script file
docker run --rm -v $(pwd):/scripts grafana/k6 run /scripts/test.js
# With environment variables
docker run --rm -v $(pwd):/scripts \
-e BASE_URL=https://staging.example.com \
grafana/k6 run /scripts/test.js
k6 exits with code 99 if thresholds fail. CI/CD pipelines use this to pass/fail the build:
export const options = {
thresholds: {
http_req_duration: ['p(95)<500'], // Fails pipeline if p95 > 500ms
http_req_failed: ['rate<0.01'], // Fails pipeline if error rate > 1%
},
};
const BASE_URL = __ENV.BASE_URL || 'https://api.example.com';
const TARGET_VUS = parseInt(__ENV.TARGET_VUS) || 10;
export const options = {
vus: TARGET_VUS,
duration: __ENV.DURATION || '5m',
};
# Run locally, send results to cloud
K6_CLOUD_TOKEN=$TOKEN k6 cloud run --local-execution script.js
# Run entirely in cloud
K6_CLOUD_TOKEN=$TOKEN k6 cloud run script.js
/k6:generating-api-load-tests/k6:analyzing-test-results/k6:testing-resiliencenpx claudepluginhub kimdoubleb/grafana-k6-skills --plugin k6Writes and debugs k6 load test scripts in JavaScript/TypeScript covering all test types, thresholds, checks, scenarios, executors, and CI/CD integration.
Guides k6 load testing for APIs, WebSockets, browsers; writes scenarios (smoke/load/stress/spike/soak), sets thresholds, analyzes results, integrates with CI/CD.
Checks and configures load and performance testing infrastructure with k6, Artillery, or Locust. Audits coverage for smoke/stress tests, sets up CI/CD pipelines, and supports framework migration.