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.
npx agentmods add skills/trainlcd/stationapi/benchmark-gqlnpx skills add TrainLCD/StationAPI --skill benchmark-gqlgit clone --depth 1 https://github.com/TrainLCD/StationAPIWhat 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 | $0.00095 | $0.03276 |
| Opus 5 | $0.00048 | $0.01638 |
| Sonnet 5 | $0.00019 | $0.00655 |
| Haiku 4.5 | $0.00010 | $0.00328 |
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 2d 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 — 147 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食い違っていたら、その旨をユーザーに伝えてから続けるか止めるかを決める。
-
ベンチを回す。 既定は全 23 ケース × 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の実装、 およびjj diff --from 'master@origin' --to 'dev@origin'を見て、 どの変更が効いているかを書く。差が出なかったこと自体が結論なら、それも明記する。
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.
- 2d ago First seen · 147 lines · 95 tokens per session scan A d80c5dba1f95
benchmark-gql is a skill published in the GitHub repository TrainLCD/StationAPI (10 stars, last pushed 2d ago), licensed MIT. It adds 95 tokens to every session and 3,276 once invoked, about $0.0005 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-31.
Other skills, from other repositories
create-tutorial
Scaffold a new Membrane API Gateway tutorial in the api-gateway repo — the numbered self-teaching YAML under distribution/tutorials/ /, its support files and README links, and the matching auto-discovered integration test. Use whenever the user asks to create, add, write, or scaffold a tutorial (or a tutorial step)…
optimize-interceptor-docs
Rewrite the reference documentation of a Membrane config element so the page generated at membrane-api.io comes out clean, exact, and reference-style. Use whenever the user wants to write, improve, optimize, polish, or review the docs / Javadoc / @description / @yaml example of an interceptor, plugin, or any…
review-branch
Review the current git branch against master — code quality, refactoring opportunities, regressions, correctness, and test coverage — and print a severity-grouped markdown report. Use whenever the user asks to review the branch, review their changes against master, do a pre-PR / pre-merge review, or asks "is this…
membrane-config
Generate a Membrane API Gateway configuration example or snippet — an apis.yaml (default) or, when explicitly asked, a legacy proxies.xml. Use this whenever the user wants a config, example, or snippet for Membrane: routing a port to a backend, a flow with plugins (setHeader, rateLimiter, basicAuthentication, openapi…
release-notes
Generate GitHub release notes for the Membrane api-gateway repo by collecting the commits between the last release and master, grouping them into Features / Improvements / Fixes / Security / Dependencies, and linking each to its PR. Use whenever the user wants to draft, extract, or write release notes / a changelog /…
run-example-test
Run a single distribution example or tutorial integration test (IT) fast, instead of the whole 6 min example suite. Use when asked to run, verify, or check one example/tutorial test in the api-gateway distribution module.