k6-performance

k6-performance is a skill for Claude Code from PramodDutta/qaskills. It costs 31 tokens per session (3,381 once invoked), scanned A, original, MIT.

A guide to performance testing with k6, a tool that sends many simulated requests to an application. It covers load-test scripts, realistic usage scenarios, pass/fail limits, checks, measurements, and result analysis.

In plain words
What is it for?
It helps create smoke, load, stress, spike, and soak tests; model user flows; measure errors and response behaviour; and compare results with predefined limits.
Why use it?
It helps reveal how an application behaves under normal, heavy, sudden, or long-lasting traffic instead of testing only one user at a time.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the qa-essentials plugin — 10 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pramoddutta/qaskills/k6-performance
Any agent
npx skills add PramodDutta/qaskills --skill k6-performance
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

Made for: Claude Code.

Or install qa-essentials, the plugin that ships this one along with the rest of its 10 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for k6-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/k6-performance.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/k6-performance)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/k6-performance"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/k6-performance.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,381 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.03381
Opus 5 $0.00015 $0.01690
Sonnet 5 $0.00006 $0.00676
Haiku 4.5 $0.00003 $0.00338

Measured 6d ago against content hash 3a569bb1add6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

k6-performance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/qa-essentials/skills/k6-performance/SKILL.md · 462 lines

How it starts

The opening of the file, as written. The whole thing — 462 lines — stays where its author put it; the contents beside it link to each section on GitHub.

k6 Performance Testing Skill

You are an expert performance engineer specializing in k6 load testing. When the user asks you to write, review, or debug k6 performance tests, follow these detailed instructions.

Core Principles

  1. Test realistic scenarios -- Model tests after actual user behavior patterns.
  2. Define clear thresholds -- Every test must have pass/fail criteria defined upfront.
  3. Ramp up gradually -- Never slam the system with full load instantly.
  4. Use checks extensively -- Validate responses even under load.
  5. Monitor and correlate -- Combine k6 metrics with server-side monitoring.

Project Structure

k6/
  scripts/
    smoke-test.js
    load-test.js
    stress-test.js
    spike-test.js
    soak-test.js
  scenarios/
    api-scenarios.js
    user-flows.js
  utils/
    helpers.js
    auth.js
    data-generators.js
  data/
    users.csv
    payloads.json
  thresholds/
    default-thresholds.js
  config/
    environments.js
  results/
    .gitkeep

Basic Load Test Script

import http from 'k6/http';
import { check, sleep, group } from 'k6';
import { Rate, Trend, Counter } from 'k6/metrics';

// Custom metrics
const errorRate = new Rate('errors');
const loginDuration = new Trend('login_duration');
const requestCount = new Counter('total_requests');

export const options = {
  stages: [
    { duration: '2m', target: 10 },   // Ramp up to 10 users
    { duration: '5m', target: 10 },   // Stay at 10 users
    { duration: '2m', target: 50 },   // Ramp up to 50 users
    { duration: '5m', target: 50 },   // Stay at 50 users
    { duration: '2m', target: 0 },    // Ramp down
  ],
  thresholds: {
    http_req_duration: ['p(95)<500', 'p(99)<1000'],  // 95th percentile < 500ms
    http_req_failed: ['rate<0.01'],                     // Error rate < 1%
    errors: ['rate<0.05'],                              // Custom error rate < 5%
    login_duration: ['p(95)<800'],                      // Login 95th < 800ms
  },
};

const BASE_URL = __ENV.BASE_URL || 'http://localhost:3000';

export default function () {
  group('Homepage', () => {
    const response = http.get(`${BASE_URL}/`);

    check(response, {
      'homepage status is 200': (r) => r.status === 200,
      'homepage loads in < 2s': (r) => r.timings.duration < 2000,
      'homepage has correct title': (r) => r.body.includes('<title>'),
    });

    errorRate.add(response.status !== 200);
    requestCount.add(1);
  });

  sleep(1);

  group('Login', () => {
    const startTime = Date.now();

    const loginResponse = http.post(`${BASE_URL}/api/auth/login`, JSON.stringify({
      email: '[email protected]',
      password: 'SecurePass123!',
    }), {
      headers: { 'Content-Type': 'application/json' },
    });

    loginDuration.add(Date.now() - startTime);

    check(loginResponse, {
      'login status is 200': (r) => r.status === 200,
      'login returns token': (r) => JSON.parse(r.body).token !== undefined,
    });

    errorRate.add(loginResponse.status !== 200);
    requestCount.add(1);
  });

  sleep(Math.random() * 3 + 1); // Random think time between 1-4 seconds
}

Read the full file on GitHub · 462 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 462 lines · 31 tokens per session scan A 3a569bb1add6

Subscribe to this mod's changes

k6-performance is a skill published in the GitHub repository PramodDutta/qaskills (217 stars, last pushed 6d ago), licensed MIT. It adds 31 tokens to every session and 3,381 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

aginxbrowser

Browser engine for AI agents: fetch JS-rendered and Cloudflare-protected pages as clean markdown, run 5-engine aggregated web search (Baidu, Bing, Sogou, WeChat, Google), take screenshots as visual input, extract structured data from SPAs, and drive multi-step interactions (click, type, fill forms, login, paginate)…

yinnho/aginxbrowser · 297 tokens

test-case-to-katalon-studio

Convert Katalon True Platform/TestOps manual test cases into Katalon Studio automation inside a local Studio Test Project checkout. Use when you need to author or extend a .tc test case file and its paired Groovy script under Scripts/, keep test case variable GUIDs consistent with the .ts test suite bindings that read…

katalon-labs/true-skills · 204 tokens

exploratory-charter

Write, run, and debrief exploratory testing charters against Katalon True Platform/TestOps when there is no script to follow. Use when you need to turn a vague area into a charter (mission, areas, oracles, timebox), run a timeboxed unscripted session, log what you find as session notes, judge which findings are real…

katalon-labs/true-skills · 156 tokens

test-data

Design, source, seed, and tear down the test data a Katalon True Platform test case or an automated suite runs on. Use when the steps are already settled and the blocker is the values, for example which data classes a case needs, which records must exist before a run, how to keep literals out of the step text and into…

katalon-labs/true-skills · 182 tokens

test-estimation

Estimate testing effort, duration, and resourcing for a Katalon True Platform/TestOps cycle. Use when the question is how long testing will take, how many testers it needs, whether the scope fits the sprint window, or what a scope change costs in person-hours. Sizes design, manual execution, automated execution and…

katalon-labs/true-skills · 198 tokens

test-reporting

Report Katalon True Platform/TestOps quality metrics to people outside QA. Use when you need to answer a stakeholder question with testing data, choose the few metrics that actually answer it, trend coverage, execution health, defect risk and stability across several releases, sprints, or iterations rather than inside…

katalon-labs/true-skills · 181 tokens