daojie-yusheng: Skill for Claude Code

.claude/skills/prod-gm-api/SKILL.md

prod-gm-api is a skill for Claude Code from fruktoguo/daojie-yusheng. It costs 114 tokens per session (1,984 once invoked), scanned A, original, MIT.

A command-line helper for connecting to a live game server's GM API to inspect logs, runtime status, players, database state, and other operational details.

In plain words
What is it for?
Use it to view server health and logs, search players, inspect database tables or backups, run read-only SQL diagnostics, and check online presence.
Why use it?
It gives developers a consistent, authenticated way to investigate production problems and verify behavior without manually constructing API requests.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is fruktoguo/daojie-yusheng's own configuration. It tells Claude Code how to work on daojie-yusheng itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything daojie-yusheng configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/gm-api.sh <子命令> [参数].

Reuse

Borrowing it

Nothing to install: this file belongs to fruktoguo/daojie-yusheng. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fruktoguo/daojie-yusheng/main/.claude/skills/prod-gm-api/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fruktoguo/daojie-yusheng

Made for: Claude Code.

Wrote 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.

agentmods badge for prod-gm-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/fruktoguo/daojie-yusheng/prod-gm-api/github.svg)](https://agentmods.dev/skills/fruktoguo/daojie-yusheng/prod-gm-api)
Your own site
<a href="https://agentmods.dev/skills/fruktoguo/daojie-yusheng/prod-gm-api"><img src="https://agentmods.dev/badge/skills/fruktoguo/daojie-yusheng/prod-gm-api/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.

agentmods 80×15 button for prod-gm-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/fruktoguo/daojie-yusheng/prod-gm-api"><img src="https://agentmods.dev/badge/skills/fruktoguo/daojie-yusheng/prod-gm-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,984 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00114 $0.01984
Opus 5.5 $0.00046 $0.00794
Sonnet 5.5 $0.00023 $0.00397
Haiku 4.5 $0.00011 $0.00198

Measured 1mo ago against content hash be3eebbcc6f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prod-gm-api 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.

**这是与正式服交互的唯一入口,不要手写 curl 拼 token。**
.claude/skills/prod-gm-api/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

正式服 GM API(道劫余生)

通过统一助手脚本 scripts/gm-api.sh 调用正式服 GM API,帮助开发和线上验证。 这是与正式服交互的唯一入口,不要手写 curl 拼 token。

  • 正式服域名:https://dj.faith.wang(GM 面板 https://dj.faith.wang/gm.html,API 前缀 /api/gm、/api/auth/gm)
  • 鉴权:脚本自动从 prod.env(gitignored)读取 GM_PASSWORD,POST /api/auth/gm/login 换取 Bearer token,缓存到 .runtime/.gm-api-token(600 权限,11h 复用,401 自动重登)。密码不出现在任何入库文件里,不要打印、不要写进代码或文档。

调用方式

bash scripts/gm-api.sh <子命令> [参数]

常用只读命令(默认安全,可直接用于排查/验证)

命令 作用
bash scripts/gm-api.sh state 全服运行态总览:在线数、玩家统计、地图列表、tick、CPU、内存、流量
bash scripts/gm-api.sh logs [limit] [before] 服务端控制台日志缓冲(默认 100 条,before=<seq> 向前翻页,返回 nextBeforeSeq)
bash scripts/gm-api.sh players [search] 玩家列表(可搜索用户名/角色名)
bash scripts/gm-api.sh player <id> 单玩家详情
bash scripts/gm-api.sh workers worker / outbox / 备份心跳汇总
bash scripts/gm-api.sh dbstate 数据库连接状态与备份列表
bash scripts/gm-api.sh presence 在线玩家(presence all)
bash scripts/gm-api.sh tables 列出所有数据库表及占用
bash scripts/gm-api.sh diag "<command>" 诊断指令(见下)
bash scripts/gm-api.sh sql "SELECT ..." 只读 SQL(服务端强制只读围栏 + statement_timeout + LIMIT)

诊断指令(diag "<command>",全部只读)

先跑 diag "help" 看完整清单。常用:

  • tables / table <name> [limit] — 表结构/采样
  • presence / presence all — 在线态
  • player <id|username> — 玩家身份+在线+快照+钱包
  • inventory <id> / equipment <id> / techniques <id> / quests <id> — 玩家子系统
  • outbox — outbox 事件队列
  • sql <SELECT...> — 自由只读查询(等价 sql 子命令)

排查线上问题的推荐顺序:logs 看报错 → diag "help" 找对应查询 → player <id> / sql 定位数据 → 对照 docs/mechanics/ 机制文档确认预期。真实表名以 tables 输出为准(例如 player_flush_ledger、outbox_event、outbox_consumer_dedupe 等;不存在名为 players 的表)。

通用出口(脚本未封装的端点)

bash scripts/gm-api.sh get  /api/gm/<path>
bash scripts/gm-api.sh post /api/gm/<path> '<json>'
bash scripts/gm-api.sh raw  <METHOD> /api/gm/<path> '<json>'
bash scripts/gm-api.sh token          # 打印当前有效 token(供特殊场景)

常见可 GET 的只读端点:/api/gm/runtime-flags、/api/gm/game-config、/api/gm/maps、/api/gm/maps/:mapId/runtime、/api/gm/world/summary、/api/gm/world/instances、/api/gm/market/trades、/api/gm/database/table-stats、/api/gm/database/state、/api/gm/environment/check。

Read the full file on GitHub · 97 lines

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. 1mo ago Changed · +13 lines be3eebbcc6f0
  2. 2mo ago First seen · 84 lines · 114 tokens per session scan A bd34a45a26cb

Subscribe to this mod's changes

prod-gm-api is a skill published in the GitHub repository fruktoguo/daojie-yusheng (78 stars, last pushed 24d ago), licensed MIT. It adds 114 tokens to every session and 1,984 once invoked, about $0.0005 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-09-01.

Related

prod-gm-api compared with skills from other repositories

prod-gm-api next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
prod-gm-apifruktoguo/daojie-yushengSkill7824d agoMITA114Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16kyesterdayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k3d agoMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill319yesterdayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2kyesterdayApache-2.0A15Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill1.9k23d agoMITA36Claude Code
triaging-web-analytics-supportPostHog/posthogSkill41kyesterdaynoneA151Claude Code, Codex