api-test

A project helper for making HTTP requests, where HTTP is the standard way software communicates with web services. It fills in the service address and authentication details, and returns the status, response time, and response body.

In plain words
What is it for?
Use it to test API endpoints with GET, POST, or PUT requests, send JSON data, use a specific lane, save responses, or inspect response timing.
Why use it?
It removes repeated setup when testing internal APIs and supports requests through a selected testing lane. It also makes failures easier to assert in scripts by checking the expected status code.

Skill for Claude CodeCodex

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/bezhai/chiwei-platform/api-test
Any agent
npx skills add bezhai/chiwei-platform --skill api-test
Clone the repo
git clone --depth 1 https://github.com/bezhai/chiwei-platform

Made for: Claude Code, Codex.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 951 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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 $0.00069 $0.00951
Opus 5 $0.00034 $0.00476
Sonnet 5 $0.00014 $0.00190
Haiku 4.5 $0.00007 $0.00095

Measured 2d ago against content hash dfd245a0fdac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-test scanned grade A with 1 finding 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 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/http.sh, scripts/test_http.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: 项目 HTTP API 调用 helper。写路径就行,scripts/http.sh 自动补 $PAAS_API、注 PAAS_TOKEN、透泳道,统一返回 {status, ms, body}。需要复杂 curl 能力(stream、文件、TLS/proxy、详细调试)时直接 curl,并说明原因。
.claude/skills/api-test/SKILL.md · 70 lines

What it actually says

/api-test

scripts/http.sh 比裸 curl 强的地方:你只写路径,剩下的它办

  • / 开头的路径自动拼上 $PAAS_API;完整 http(s):// URL 原样使用。
  • 路径在 /dashboard/.../api/paas/... 下时,自动注入 X-API-Key: $PAAS_TOKEN对内对外一把钥匙——dashboard 也认 PAAS_TOKEN,两个面同一个 token,调用方不用再想该传哪个。
  • --lane LANE 自动加 x-lane 头;显式传了 X-API-Key / x-lane--no-auth 时不覆盖。
  • 始终返回 {"status":..,"ms":..,"body":..}ms 是耗时。

完整 http(s):// URL 永远不自动注 token,所以历史上"传完整 URL + 显式 header"的调用方不受影响。

这个 helper 不替代 curl。它不支持的场景直接用 curl,不要让用户手动代劳:stream、文件上传/下载、长日志、复杂 TLS/proxy/redirect、-v 看握手。

用法

HTTP=.claude/skills/api-test/scripts/http.sh

# 裸路径:自动补 base + 自动注 PAAS_TOKEN
$HTTP GET /dashboard/api/ops/services
$HTTP GET "/api/paas/apps/agent-service/resolved-config?lane=prod"

# 带泳道
$HTTP --lane ppe-foo GET /api/paas/apps/agent-service/pods

# POST(第三个参数是 JSON body)
$HTTP POST /api/paas/apps/x '{"a":1}'

# 选项放任意位置都认(含末尾)
$HTTP GET /dashboard/api/ops/services --jq '.apps | length'

# 断言状态码:不匹配则退出码非 0(脚本里好用)
$HTTP --expect 200 GET /dashboard/api/health

# 其它选项:--timeout SEC(默认 60)、--save FILE、--no-auth、--raw
$HTTP --timeout 180 GET /dashboard/api/...
$HTTP PUT /api/paas/apps/x @/tmp/body.json
$HTTP POST /api/paas/... --data "plain text" "Content-Type: text/plain"

# 需要原生 curl 能力时显式透传
$HTTP --curl -v --max-time 300 -H "X-API-Key: $PAAS_TOKEN" "<url>"

选项

  • --lane LANEx-lane(也可用 HTTP_LANE 环境变量)
  • --jq FILTER原始 body(不是 {status,ms,body} 外层)跑 jq -r,只打印结果
  • --expect CODE 状态码 ≠ CODE 时退出码非 0
  • --save FILE 额外把原始 body 落盘
  • --no-auth 不自动注 token;--raw 直出原始 body(不包 JSON、不计时)
  • --curl <args...> 后续参数原样交给 curl

输出

{"status": 200, "ms": 36, "body": {"key": "value"}}
{"status": 500, "ms": 12, "body": {"message": "error detail"}}
{"status": 0, "error": "curl exit 28: timeout"}

测试

scripts/test_http.sh:dry-run 单测(解析/补 base/注 token/透泳道)+ 本地 server e2e(计时/--jq/--expect)。改 http.sh 后跑 bash .claude/skills/api-test/scripts/test_http.sh

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 70 lines · 69 tokens per session scan A dfd245a0fdac

Subscribe to this mod's changes

api-test is a skill published in the GitHub repository bezhai/chiwei-platform (20 stars, last pushed 2d ago), licensed MIT. It adds 69 tokens to every session and 951 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens