.claude/skills/ts-artillery/SKILL.md
When the user wants to perform load testing or performance testing using Artillery with YAML-based scenario definitions. Also use when the user mentions "artillery," "YAML load test," "WebSocket testing," "Socket.io load test," "scenario-based load testing," or "artillery run." For JavaScript-based load testing, see k6.
npx skillsauth add eliferjunior/Claude artilleryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in Artillery, the modern load testing toolkit. You help users define test scenarios in YAML, configure phases for ramping traffic, test HTTP APIs and WebSocket/Socket.io services, write custom JavaScript functions for complex flows, and generate HTML reports. You understand Artillery's plugin ecosystem and CI integration.
Before creating a test scenario:
# load-test.yml — Artillery scenario testing an HTTP API.
# Ramps from 5 to 50 requests per second over 3 phases.
config:
target: "https://api.example.com"
phases:
- duration: 60
arrivalRate: 5
name: "Warm up"
- duration: 120
arrivalRate: 25
name: "Ramp up"
- duration: 60
arrivalRate: 50
name: "Peak load"
defaults:
headers:
Content-Type: "application/json"
scenarios:
- name: "Browse and purchase"
flow:
- get:
url: "/products"
capture:
- json: "$.products[0].id"
as: "productId"
- think: 2
- get:
url: "/products/{{ productId }}"
- think: 1
- post:
url: "/cart"
json:
productId: "{{ productId }}"
quantity: 1
# websocket-test.yml — Artillery scenario testing a WebSocket server.
# Connects, sends messages, and validates responses.
config:
target: "wss://ws.example.com"
phases:
- duration: 60
arrivalRate: 10
engines:
ws: {}
scenarios:
- engine: "ws"
flow:
- send:
payload: '{"type": "subscribe", "channel": "updates"}'
- think: 1
- send:
payload: '{"type": "message", "text": "hello"}'
- think: 5
# socketio-test.yml — Artillery scenario for Socket.io real-time apps.
# Simulates users joining rooms and exchanging messages.
config:
target: "http://localhost:3000"
phases:
- duration: 60
arrivalRate: 20
engines:
socketio:
transports: ["websocket"]
scenarios:
- engine: "socketio"
flow:
- emit:
channel: "join"
data:
room: "general"
username: "user_{{ $randomNumber(1, 1000) }}"
- think: 2
- emit:
channel: "message"
data:
text: "Hello from Artillery"
- think: 3
# custom-flow.yml — Artillery scenario with custom JS processing.
# Uses beforeRequest and afterResponse hooks for dynamic data.
config:
target: "https://api.example.com"
phases:
- duration: 120
arrivalRate: 10
processor: "./helpers.js"
scenarios:
- flow:
- function: "generateUser"
- post:
url: "/users"
json:
name: "{{ name }}"
email: "{{ email }}"
beforeRequest: "addAuthToken"
afterResponse: "logResponse"
// helpers.js — Custom Artillery processor functions.
// Generates dynamic data and handles auth tokens.
module.exports = {
generateUser(context, events, done) {
context.vars.name = `user_${Date.now()}`;
context.vars.email = `user_${Date.now()}@test.com`;
return done();
},
addAuthToken(req, context, events, done) {
req.headers = req.headers || {};
req.headers['Authorization'] = `Bearer ${context.vars.token || 'test-token'}`;
return done();
},
logResponse(req, res, context, events, done) {
if (res.statusCode !== 200) {
console.log(`Error: ${res.statusCode} on ${req.url}`);
}
return done();
},
};
# run-artillery.sh — Common Artillery commands.
# Install, run tests, and generate reports.
# Install
npm install -g artillery
# Run a test
artillery run load-test.yml
# Generate HTML report
artillery run --output results.json load-test.yml
artillery report results.json --output report.html
# Quick test (no YAML needed)
artillery quick --count 100 --num 10 https://api.example.com/health
# .github/workflows/artillery.yml — Run Artillery in GitHub Actions.
# Posts HTML report as an artifact.
name: Load Test
on:
push:
branches: [main]
jobs:
artillery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g artillery
- run: artillery run --output results.json tests/load-test.yml
- run: artillery report results.json --output report.html
- uses: actions/upload-artifact@v4
if: always()
with:
name: artillery-report
path: report.html
development
Expert guidance for Fireworks AI, the platform for running open-source LLMs (Llama, Mixtral, Qwen, etc.) with enterprise-grade speed and reliability. Helps developers integrate Fireworks' inference API, fine-tune models, and deploy custom model endpoints with function calling and structured output support.
development
Convert any website into clean, structured data with Firecrawl — API-first web scraping service. Use when someone asks to "turn a website into markdown", "scrape website for LLM", "Firecrawl", "extract website content as clean text", "crawl and convert to structured data", or "scrape website for RAG". Covers single-page scraping, full-site crawling, structured extraction, and LLM-ready output.
tools
Expert guidance for Firebase, Google's platform for building and scaling web and mobile applications. Helps developers set up authentication, Firestore/Realtime Database, Cloud Functions, hosting, storage, and analytics using Firebase's SDK and CLI.
development
When the user needs to build file upload functionality for a web application. Use when the user mentions "file upload," "image upload," "upload endpoint," "multipart upload," "presigned URL," "S3 upload," "file validation," "upload to cloud storage," or "accept user files." Handles upload endpoints, file validation (type, size, magic bytes), cloud storage integration, and upload status tracking. For image/video processing after upload, see media-transcoder.