k6
Open-source library of AI agent skills — SKILL.md files for Claude Code, Codex, Gemini CLI, Cursor
Install / Use
npx skills add TerminalSkills/skills --skill k6Installs into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of k6
k6 scores 73/100 on our quality scale, 3793rd of 4,658 Development & Engineering skills we index.
Its SKILL.md is 5.1 KB long, well organised into 20 sections with 6 code examples: a solid amount of guidance for an agent.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- The repository was last updated 19 days ago, so k6 is actively maintained.
- Our last check on 2026-08-09 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 80/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-03. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
k6 compared with similar skills
All 4 of these similar skills score higher than k6; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| k6 (this skill)by TerminalSkills | 73 | 0 | 19d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 88.6k | 17d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.3k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 44.8k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 2d ago | CLAUDE.md |
Frequently asked questions
- How do I install k6?
- Run
npx skills add TerminalSkills/skills --skill k6. The install tabs above show the steps for each supported agent. - Which AI agents does k6 work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is k6 safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It declares no license and scores 80/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is k6 still maintained?
- The repository was last updated 19 days ago, so k6 is actively maintained.
Skill content
View source on GitHubname: k6 description: When the user wants to perform load testing, stress testing, or performance testing of APIs and websites using k6. Also use when the user mentions "k6," "load test," "performance test," "stress test," "spike test," "soak test," "thresholds," "virtual users," or "VUs." For browser-based testing, see selenium. metadata: author: terminal-skills version: "1.0.0" category: development tags: - load-testing - performance - stress-testing - benchmarking
k6
Overview
You are an expert in k6, the open-source load testing tool built for developer happiness. You help users write k6 test scripts in JavaScript, configure virtual users and durations, set thresholds for pass/fail criteria, and analyze results. You understand k6's execution model, lifecycle hooks, and how to integrate k6 into CI/CD pipelines.
Instructions
Initial Assessment
Before writing a load test, understand:
- Target — What endpoint(s) or service are you testing?
- Goal — What kind of test? (load, stress, spike, soak, smoke)
- Expectations — What response time and error rate are acceptable?
- Scale — How many concurrent users should the test simulate?
Writing k6 Scripts
Always structure scripts with clear stages and thresholds:
// load-test.js — k6 load test with ramping VUs and thresholds.
// Tests the /api/users endpoint under increasing load.
import http from 'k6/http';
import { check, sleep } from 'k6';
export const options = {
stages: [
{ duration: '1m', target: 50 },
{ duration: '3m', target: 50 },
{ duration: '1m', target: 0 },
],
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.01'],
},
};
export default function () {
const res = http.get('https://api.example.com/users');
check(res, {
'status is 200': (r) => r.status === 200,
'response time < 500ms': (r) => r.timings.duration < 500,
});
sleep(1);
}
Test Types
Guide users to the right test type:
- Smoke test — Minimal load (1-2 VUs) to verify the script works
- Load test — Expected normal and peak load
- Stress test — Beyond normal capacity to find breaking points
- Spike test — Sudden surge of traffic
- Soak test — Extended duration to find memory leaks and degradation
Thresholds
Always recommend thresholds so tests have clear pass/fail criteria:
// thresholds.js — Common threshold patterns for k6.
// Combine multiple metrics for comprehensive pass/fail.
export const options = {
thresholds: {
http_req_duration: ['p(95)<500', 'p(99)<1000'],
http_req_failed: ['rate<0.01'],
http_reqs: ['rate>100'],
checks: ['rate>0.99'],
'http_req_duration{name:login}': ['p(95)<800'],
},
};
Custom Metrics
// custom-metrics.js — Track business-specific metrics in k6.
// Useful for measuring things beyond HTTP response times.
import { Trend, Counter, Rate } from 'k6/metrics';
const loginDuration = new Trend('login_duration');
const successfulLogins = new Counter('successful_logins');
const loginSuccessRate = new Rate('login_success_rate');
export default function () {
const start = Date.now();
const res = http.post('https://api.example.com/login', JSON.stringify({
username: 'testuser',
password: 'testpass',
}), { headers: { 'Content-Type': 'application/json' } });
loginDuration.add(Date.now() - start);
const success = res.status === 200;
successfulLogins.add(success ? 1 : 0);
loginSuccessRate.add(success);
}
CI Integration
# .github/workflows/load-test.yml — Run k6 load tests in GitHub Actions.
# Fails the pipeline if thresholds are breached.
name: Load Test
on:
push:
branches: [main]
jobs:
k6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: grafana/k6-action@v0.3.1
with:
filename: tests/load-test.js
Running k6
# run-k6.sh — Common k6 commands for different scenarios.
# Install and run with various output options.
# Install
brew install k6
# Basic run
k6 run load-test.js
# With environment variables
k6 run -e BASE_URL=https://staging.example.com load-test.js
# Override VUs and duration
k6 run --vus 100 --duration 5m load-test.js
# Output to JSON for analysis
k6 run --out json=results.json load-test.js
Scenarios (Advanced)
// scenarios.js — Multiple scenarios running different patterns simultaneously.
// Simulates realistic mixed traffic patterns.
export const options = {
scenarios: {
browse: {
executor: 'constant-vus',
vus: 20,
duration: '5m',
exec: 'browsePage',
},
checkout: {
executor: 'ramping-arrival-rate',
startRate: 1,
timeUnit: '1s',
preAllocatedVUs: 50,
stages: [
{ duration: '2m', target: 10 },
{ duration: '2m', target: 0 },
],
exec: 'checkout',
},
},
};
export function browsePage() {
http.get('https://api.example.com/products');
sleep(2);
}
export function checkout() {
http.post('https://api.example.com/checkout', JSON.stringify({ item: 'widget' }));
}
Related Skills
Agent-Reach
88.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
44.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
