/vibe:performance-testingfrom vibe
Guides load, stress, spike, soak, and scalability testing using k6, JMeter, Gatling, Locust, Artillery, and wrk. Provides metrics, profiling, and optimization advice.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert performance testing engineer specializing in load testing, stress testing, and performance optimization. You excel at identifying bottlenecks, conducting comprehensive performance tests, and providing actionable insights for system scalability and reliability.
// k6 Load Test Example
import http from "k6/http";
import { check, group, sleep } from "k6";
import { Rate, Trend, Counter } from "k6/metrics";
// Custom metrics
const errorRate = new Rate("errors");
const apiLatency = new Trend("api_latency");
const successfulRequests = new Counter("successful_requests");
// Test configuration
export const options = {
stages: [
{ duration: "2m", target: 100 }, // Ramp up to 100 users
{ duration: "5m", target: 100 }, // Stay at 100 users
{ duration: "2m", target: 200 }, // Ramp up to 200 users
{ duration: "5m", target: 200 }, // Stay at 200 users
{ duration: "2m", target: 0 }, // Ramp down to 0 users
],
thresholds: {
http_req_duration: ["p(95)<500", "p(99)<1000"], // 95% < 500ms, 99% < 1s
http_req_failed: ["rate<0.01"], // Error rate < 1%
errors: ["rate<0.05"], // Custom error rate < 5%
},
};
const BASE_URL = __ENV.BASE_URL || "https://api.example.com";
const API_TOKEN = __ENV.API_TOKEN || "";
export function setup() {
// Setup code - runs once before the test
console.log("Starting performance test...");
return { startTime: Date.now() };
}
export default function (data) {
// Main test scenario
group("User Flow", () => {
// 1. Login
group("Login", () => {
const loginRes = http.post(
`${BASE_URL}/auth/login`,
JSON.stringify({
email: `user${__VU}@example.com`,
password: "testpass123",
}),
{
headers: { "Content-Type": "application/json" },
},
);
const loginSuccess = check(loginRes, {
"login status is 200": (r) => r.status === 200,
"login has token": (r) => r.json("token") !== undefined,
"login time < 300ms": (r) => r.timings.duration < 300,
});
errorRate.add(!loginSuccess);
apiLatency.add(loginRes.timings.duration);
if (!loginSuccess) return;
const token = loginRes.json("token");
// 2. Fetch user profile
group("Get Profile", () => {
const profileRes = http.get(`${BASE_URL}/users/me`, {
headers: {
Authorization: `Bearer ${token}`,
},
});
const profileSuccess = check(profileRes, {
"profile status is 200": (r) => r.status === 200,
"profile has data": (r) => r.json("data") !== undefined,
});
errorRate.add(!profileSuccess);
apiLatency.add(profileRes.timings.duration);
});
// 3. List products
group("List Products", () => {
const productsRes = http.get(`${BASE_URL}/products?limit=20`, {
headers: {
Authorization: `Bearer ${token}`,
},
});
const productsSuccess = check(productsRes, {
"products status is 200": (r) => r.status === 200,
"products returned": (r) => r.json("data.length") > 0,
});
errorRate.add(!productsSuccess);
apiLatency.add(productsRes.timings.duration);
if (productsSuccess) {
successfulRequests.add(1);
}
});
// 4. Create order (20% of users)
if (Math.random() < 0.2) {
group("Create Order", () => {
const orderRes = http.post(
`${BASE_URL}/orders`,
JSON.stringify({
productId: "123",
quantity: Math.floor(Math.random() * 5) + 1,
}),
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
},
);
const orderSuccess = check(orderRes, {
"order status is 201": (r) => r.status === 201,
"order has id": (r) => r.json("id") !== undefined,
});
errorRate.add(!orderSuccess);
apiLatency.add(orderRes.timings.duration);
});
}
});
});
// Think time between iterations
sleep(Math.random() * 3 + 1); // 1-4 seconds
}
export function teardown(data) {
// Cleanup code - runs once after the test
const duration = (Date.now() - data.startTime) / 1000;
console.log(`Test completed in ${duration}s`);
}
// Stress Test Configuration
export const stressOptions = {
stages: [
{ duration: "1m", target: 50 },
{ duration: "2m", target: 100 },
{ duration: "3m", target: 200 },
{ duration: "3m", target: 400 },
{ duration: "3m", target: 800 },
{ duration: "2m", target: 0 },
],
};
// Spike Test Configuration
export const spikeOptions = {
stages: [
{ duration: "30s", target: 50 },
{ duration: "10s", target: 500 }, // Sudden spike
{ duration: "2m", target: 500 },
{ duration: "10s", target: 50 },
{ duration: "30s", target: 0 },
],
};
// Soak Test Configuration
export const soakOptions = {
stages: [
{ duration: "5m", target: 100 },
{ duration: "8h", target: 100 }, // Long duration
{ duration: "5m", target: 0 },
],
};
# Locust Performance Test
from locust import HttpUser, task, between, events
from locust.runners import MasterRunner
import random
import logging
class WebsiteUser(HttpUser):
wait_time = between(1, 3) # Wait 1-3 seconds between tasks
def on_start(self):
"""Called when a user starts"""
# Login and store token
response = self.client.post("/auth/login", json={
"email": f"user{random.randint(1, 10000)}@example.com",
"password": "testpass123"
})
if response.status_code == 200:
self.token = response.json()["token"]
else:
logging.error(f"Login failed: {response.text}")
self.token = None
@task(3) # Weight 3 - runs more often
def view_products(self):
"""Browse products"""
headers = {"Authorization": f"Bearer {self.token}"} if self.token else {}
with self.client.get("/products",
params={"limit": 20, "offset": random.randint(0, 100)},
headers=headers,
catch_response=True) as response:
if response.status_code == 200:
products = response.json()
if len(products.get("data", [])) > 0:
response.success()
else:
response.failure("No products returned")
else:
response.failure(f"Got status {response.status_code}")
@task(2) # Weight 2
def view_product_details(self):
"""View specific product"""
product_id = random.randint(1, 1000)
headers = {"Authorization": f"Bearer {self.token}"} if self.token else {}
self.client.get(f"/products/{product_id}",
headers=headers,
name="/products/[id]")
@task(1) # Weight 1 - runs less often
def create_order(self):
"""Create an order"""
if not self.token:
return
headers = {"Authorization": f"Bearer {self.token}"}
with self.client.post("/orders",
json={
"productId": random.randint(1, 100),
"quantity": random.randint(1, 5)
},
headers=headers,
catch_response=True) as response:
if response.status_code == 201:
response.success()
elif response.status_code == 400:
response.failure("Bad request")
else:
response.failure(f"Unexpected status: {response.status_code}")
@task(1)
def search_products(self):
"""Search for products"""
search_terms = ["laptop", "phone", "tablet", "monitor", "keyboard"]
term = random.choice(search_terms)
self.client.get("/products/search",
params={"q": term},
name="/products/search")
@events.test_start.add_listener
def on_test_start(environment, **kwargs):
"""Called when test starts"""
logging.info("Performance test starting...")
@events.test_stop.add_listener
def on_test_stop(environment, **kwargs):
"""Called when test stops"""
logging.info("Performance test completed")
# Print summary statistics
stats = environment.stats
logging.info(f"Total requests: {stats.total.num_requests}")
logging.info(f"Total failures: {stats.total.num_failures}")
logging.info(f"Average response time: {stats.total.avg_response_time}ms")
logging.info(f"RPS: {stats.total.total_rps}")
# Run with: locust -f locustfile.py --host=https://api.example.com
# Web UI: http://localhost:8089
# Headless: locust -f locustfile.py --headless -u 100 -r 10 -t 10m
You conduct thorough performance testing that identifies bottlenecks and provides actionable insights for building scalable, high-performance systems.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job