Borrowing it
Nothing to install: this file belongs to TrainLCD/StationAPI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/TrainLCD/StationAPI/dev/.claude/skills/benchmark-gql/SKILL.mdgit clone --depth 1 https://github.com/TrainLCD/StationAPIWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/trainlcd/stationapi/benchmark-gql)<a href="https://agentmods.dev/skills/trainlcd/stationapi/benchmark-gql"><img src="https://agentmods.dev/badge/skills/trainlcd/stationapi/benchmark-gql/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/trainlcd/stationapi/benchmark-gql"><img src="https://agentmods.dev/badge/skills/trainlcd/stationapi/benchmark-gql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 33 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
- medium MCP Rug Pull · line 38 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00095 | $0.03343 |
| Opus 5.5 | $0.00038 | $0.01337 |
| Sonnet 5.5 | $0.00019 | $0.00669 |
| Haiku 4.5 | $0.00010 | $0.00334 |
Grade A, and why
benchmark-gql 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 1mo ago.
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.
for u in https://gql.trainlcd.app https://gql-stg.trainlcd.app; do curl -s "$u/__health"; echo " <- $u"; done How it starts
The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.
benchmark-gql
本番 (https://gql.trainlcd.app / Worker stationapi) とステージング
(https://gql-stg.trainlcd.app / Worker stationapi-stg) の GraphQL 性能を、
schema/public.graphql の全 Query フィールドについて比較する。
両環境は同じデータを積んでいる (/__health が返す駅数・路線数・会社数が一致する) ので、
出てくる差は実装差だけ。ステージングは dev、本番は master から出るので、
このベンチは「次のリリースで本番の性能がどう変わるか」を先に見るものになる。
何を測るか
| 指標 | 出どころ | 何が見えるか |
|---|---|---|
| CPU Time | wrangler tail --format json の cpuTime |
Worker が実際に計算に使った時間。ネットワークもコロの当たり外れも含まないので、実装差はここに出る。判定はこの列で行う |
| Worker wall time | 同 wallTime |
Worker 内の実時間。この Worker は I/O をしないので CPU Time とほぼ一致し、乖離したら外部待ちが混ざったサイン |
| クライアント応答時間 | keep-alive を張った 1 本の接続での往復時間 | 利用者から見た体感。回線とエッジ処理と転送を含む |
| 応答サイズ | レスポンスのバイト数 | 転送時間の効き方を読むための補助 |
CPU Time はリクエストと cf-ray で突き合わせる。wrangler tail 側には
--header x-stationapi-bench:<実行 ID> を渡すので、本番に実ユーザーのトラフィックが
流れていてもこの実行のリクエストだけが降ってくる。
前提条件
-
wrangler の認証が済んでいて、権限に
workers_tail (read)があること。 無いと CPU Time が欠測になる (応答時間の計測だけは続行する)。 版はMakefileのWRANGLER_VERSIONに合わせる。版を指定しないnpx wranglerは その時点の最新を取ってくるので、Cloudflare の認証情報を持つ環境で走らせるものとしては 固定しておく。bench.pyも同じ値を読んでwrangler tailを起動する。npx --yes wrangler@"$(sed -n 's/^WRANGLER_VERSION := //p' Makefile)" whoami -
Python 3。依存は標準ライブラリのみ。
-
リポジトリルートで実行すること (
wrangler tailの cwd に使う)。
手順
-
両環境が同じデータかを先に確認する。 違えば差は実装起因ではない。
for u in https://gql.trainlcd.app https://gql-stg.trainlcd.app; do curl -s "$u/__health"; echo " <- $u"; done食い違っていたら、その旨をユーザーに伝えてから続けるか止めるかを決める。
-
ベンチを回す。 既定は
queries.jsonの全ケース × 15 反復 × 2 環境で、2〜3 分。 本番側が遅いクエリを抱えているとその分伸びる。python3 .claude/skills/benchmark-gql/bench.py # make bench でも同じ (追加引数は make bench BENCH_ARGS="--repeat 30")wrangler tailの接続待ちだけで最大 90 秒かかるので、バックグラウンド実行にして待つこと。 フォアグラウンドだとツールのタイムアウトに当たる。 -
レポートの「所見」節を埋める。 ここだけは自動生成しない。差が出たクエリについて、
src/graphql/query.rsやstationapi/src/use_case/interactor/query.rsの実装、 およびorigin/masterとorigin/devの差分を見て、 どの変更が効いているかを書く。差が出なかったこと自体が結論なら、それも明記する。
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.
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.
- 1mo ago Changed 5f5ef84dfca5
- 1mo ago Changed · +8 lines 13bc6cca76ce
- 2mo ago First seen · 147 lines · 95 tokens per session scan A d80c5dba1f95
benchmark-gql is a skill published in the GitHub repository TrainLCD/StationAPI (14 stars, last pushed 4d ago), licensed MIT. It adds 95 tokens to every session and 3,343 once invoked, about $0.0004 per session on Opus 5.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-31.
Other skills, from other repositories
api-testing-patterns
Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing. Use when testing APIs or designing API test strategies.
api-testing
REST/GraphQL API testing with automated validation — test endpoints, validate responses, check status codes, and ensure API contracts.
GraphQL Testing
Comprehensive GraphQL API testing including query/mutation testing, schema validation, resolver testing, subscription testing, and N+1 query detection.
api-testing
Comprehensive API testing, validation, and test suite generation.
api-testing-patterns
Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing. Use when testing APIs or designing API test strategies.
api-integration-architect
Design, implement, debug, and optimize API integrations with expert-level patterns for REST, GraphQL, webhooks, and authentication flows.