Agent Skills
› MigoXLab/LMeterX
› lmeterx-llm-loadtest
lmeterx-llm-loadtest
GitHub用于对LLM API(如OpenAI/Claude兼容接口)进行负载测试。自动识别URL或curl命令,执行脚本预检连通性并创建压测任务,支持自定义并发、时长等参数。
Trigger Scenarios
用户提供以 /v1/chat/completions 或 /v1/messages 结尾的 LLM API URL
用户提及 LLM、大模型、OpenAI、Claude 等关键词
用户提供包含 model 和 messages 字段的 curl 命令
Install
npx skills add MigoXLab/LMeterX --skill lmeterx-llm-loadtest -g -y
SKILL.md
Frontmatter
{
"name": "lmeterx-llm-loadtest",
"emoji": "🤖",
"requires": {
"env": [
"LMETERX_BASE_URL"
]
},
"triggers": [
"压测这个LLM API",
"压测这个大模型接口",
"压测这个模型API",
"帮我压测 OpenAI",
"帮我压测 Claude API",
"压测 chat completions",
"压测 messages 接口",
"load test this LLM API",
"load test OpenAI endpoint",
"stress test this model API",
"压测这个AI接口"
],
"description": "LMeterX LLM API Load Test tool. When a user provides an **LLM API endpoint URL**\n(ending with `\/v1\/chat\/completions` or `\/v1\/messages`) or a curl command targeting\nan LLM API, this skill executes a script to pre-check connectivity and create\na load testing task. Supports OpenAI-compatible and Claude-compatible APIs.\n"
}
Skill: lmeterx-llm-loadtest
Intent Routing Rules (Highest Priority)
When to USE this Skill
- URL ends with
/v1/chat/completions(OpenAI-compatible) - URL ends with
/v1/messages(Claude/Anthropic-compatible) - User mentions "LLM", "大模型", "模型接口", "OpenAI", "Claude", "chat completions"
- curl command body contains
"model"and"messages"fields
When NOT to use this Skill
| Condition | Use Instead |
|---|---|
URL is a webpage (e.g. https://www.baidu.com) |
lmeterx-web-loadtest |
URL is a regular API without LLM path patterns (e.g. /api/users, /graphql) |
lmeterx-http-loadtest |
| User says "网站/网页/页面" | lmeterx-web-loadtest |
Quick Decision Rule
URL ends with /v1/chat/completions or /v1/messages → THIS SKILL
URL is a normal webpage → lmeterx-web-loadtest
Everything else (REST API, GraphQL, etc.) → lmeterx-http-loadtest
Execution Rules
- Mandatory: You must and may only execute the provided script via Bash.
- Prohibition: Do NOT manually construct HTTP requests using
curlorrequeststo call LMeterX APIs. - Prohibition: Do NOT fabricate results. Execute the script and respond based on actual stdout output.
The Only Correct Way to Execute
With URL:
export LMETERX_AUTH_TOKEN="${LMETERX_AUTH_TOKEN:-<YOUR_AUTH_TOKEN>}"
python "${SKILL_DIR}/scripts/run.py" \
--url "<LLM API URL>" \
--header "Authorization: Bearer <api-key>"
With curl command:
export LMETERX_AUTH_TOKEN="${LMETERX_AUTH_TOKEN:-<YOUR_AUTH_TOKEN>}"
python "${SKILL_DIR}/scripts/run.py" \
--curl '<full curl command>'
With custom load parameters:
export LMETERX_AUTH_TOKEN="${LMETERX_AUTH_TOKEN:-<YOUR_AUTH_TOKEN>}"
python "${SKILL_DIR}/scripts/run.py" \
--url "<LLM API URL>" \
--header "Authorization: Bearer <api-key>" \
--body '{"model":"gpt-4","messages":[{"role":"user","content":"Hello"}]}' \
--concurrent-users 50 \
--duration 300 \
--spawn-rate 30
Parameters
| Parameter | Default | Description |
|---|---|---|
--url |
(required, or use --curl) | LLM API endpoint URL |
--curl |
(required, or use --url) | Full curl command string |
--header |
[] | Request header (repeatable, format: Key: Value) |
--body |
"" | Request body JSON string |
--model |
(auto-extracted from body) | Model name |
--stream / --no-stream |
true | Enable/disable streaming |
--concurrent-users |
50 | Concurrent users (1-5000) |
--duration |
300 | Duration in seconds (1-172800) |
--spawn-rate |
30 | User spawn rate |
--name |
(auto-generated) | Task name |
--test-data |
"" | Dataset: "" for none, "default" for built-in dataset |
Presenting Results to the User
After execution, present:
- API Type: OpenAI Chat or Claude Chat
- Pre-check Result: Pass/Fail with categorized failure reason
- Task ID and Report URL:
{LMETERX_BASE_URL}/results/{task_id}
Exception Handling
| Error Scenario | Output Message |
|---|---|
| HTTP 401/403 | LMeterX token is invalid or expired; check LMETERX_AUTH_TOKEN |
| HTTP 5xx | LMeterX platform service error; try again later |
| Connection Failure | Cannot connect to LMeterX service; check network |
| Target API 401 | Target LLM API requires auth; check Authorization header |
| Target API timeout | Target LLM API timed out; may be overloaded |
Version History
- 5ad3898 Current 2026-07-24 21:58


