testing-performance
Perf: k6 load/stress/spike, Locust Python, JMeter, load profiles, SLA, p50/p95/p99, flame graphs
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o testing-performance.zip https://jpskill.com/download/22281.zip && unzip -o testing-performance.zip && rm testing-performance.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22281.zip -OutFile "$d\testing-performance.zip"; Expand-Archive "$d\testing-performance.zip" -DestinationPath $d -Force; ri "$d\testing-performance.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
testing-performance.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
testing-performanceフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
testing-performance
Purpose
This skill enables performance testing using tools like k6, Locust, and JMeter to simulate load, stress, and spike scenarios, measure metrics such as p50/p95/p99 latency, enforce SLAs, and generate flame graphs for bottleneck analysis.
When to Use
Use this skill when assessing application performance under load, identifying scalability issues, validating SLAs, or optimizing code before production. Apply it in pre-release testing, CI/CD pipelines, or when debugging high-latency problems in web services or APIs.
Key Capabilities
- Run load tests with k6 using VU (virtual users) and duration settings to simulate traffic.
- Generate reports with metrics like p50 (median), p95 (95th percentile), and p99 latency from test outputs.
- Define load profiles in Locust via Python scripts for custom user behaviors and ramp-up rates.
- Enforce SLAs by setting thresholds in JMeter and checking against results.
- Create flame graphs using integrated profiling in k6 or external tools to visualize CPU/memory usage.
- Support distributed testing across multiple machines for large-scale simulations.
Usage Patterns
To perform a basic load test, select a tool based on scenario: use k6 for quick scripts, Locust for Python-based customization, or JMeter for complex scenarios with UI elements. Always define a test script first, then run with specified profiles. For CI/CD, integrate as a step that triggers on code changes. Include parameterization for environments (e.g., staging vs. production) and always analyze results post-run. Example: Script a k6 test for an API endpoint, then scale it with Locust for user simulation.
Common Commands/API
For k6, run tests via CLI: k6 run -u 50 -d 1m script.js (sets 50 virtual users for 1 minute). Use thresholds like --threshold p(95)<500 to enforce p95 latency under 500ms. Script example:
import http from 'k6/http';
export default function() { http.get('https://api.example.com'); }
For Locust, start with: locust -f locustfile.py --host https://api.example.com --users 100 --spawn-rate 10 (100 users, 10 per second). Locustfile snippet:
from locust import HttpUser, task
class QuickUser(HttpUser):
@task
def endpoint(self): self.client.get("/health")
For JMeter, execute via: jmeter -n -t test_plan.jmx -l results.jtl (non-GUI mode). JMeter config in .jmx XML format includes elements like Thread Group with 50 loops and HTTP Samplers. API endpoints: If testing requires auth, set env vars like $K6_API_KEY in scripts (e.g., export K6_API_KEY=your_key before running).
Integration Notes
Integrate this skill into workflows by wrapping commands in scripts or CI tools like GitHub Actions: e.g., run: k6 run script.js in a YAML step. For cloud services, pass auth via env vars (e.g., $LOCUST_API_TOKEN) to access protected endpoints. Combine with monitoring tools by piping outputs (e.g., k6 JSON results to Prometheus). Ensure tools are installed via package managers (e.g., npm install -g k6 or pip install locust), and use Docker images for consistency (e.g., docker run loadimpact/k6 run - < script.js). If using APIs, endpoints like k6's cloud API require $K6_CLOUD_TOKEN for uploads.
Error Handling
Check exit codes after runs: k6 returns non-zero for failures, e.g., threshold breaches. In scripts, wrap commands with try-catch for Locust (e.g., in Python: try: run_locust() except Exception as e: log(e)). For JMeter, parse .jtl logs for errors like "Assertion failure" and set up listeners to halt on thresholds. Common issues: Handle network errors by adding retries in scripts (e.g., k6: http.get(url, { retries: 3 })), and use verbose flags like k6 run --verbose script.js for debugging. If auth fails, verify env vars (e.g., echo $K6_API_KEY before execution).
Concrete Usage Examples
- To test an e-commerce API for 100 users over 5 minutes with k6: Write a script with a GET request, then run
k6 run -u 100 -d 5m script.js --threshold "http_req_duration{type:200} < 500". Analyze output for p95 latency and ensure SLA compliance. - For simulating user logins with Locust: Create a locustfile.py with tasks for login and browsing, then execute
locust -f locustfile.py --host https://app.example.com --users 200 --run-time 10m. Monitor for errors and generate reports to identify bottlenecks.
Graph Relationships
- Related to: testing (cluster), performance-test (tag), k6 (tag), locust (tag), load-test (tag)
- Connected via: testing cluster for other testing skills, e.g., unit-testing or integration-testing
- Dependencies: monitoring skills for metric analysis, deployment skills for environment setup