Provides structured logging, server health metrics, and alert rules for live multiplayer game servers. Tracks tick duration, room/WebSocket counts, disconnects, errors per mode, and currency flow. Targets Bun and Elysia.
Ships in game-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A game server needs two outputs. Log lines answer "what happened to this
player in this room". Metrics answer "is the server healthy right now".
Player behaviour (DAU, session length, D1/D7/D30 retention, funnels) is
analytics, not ops: use gameplay-analytics for it.
level,
message, timestamp, context (service, component, playerId,
sessionId, roomId, requestId), data, error..derive(), never
from store. Elysia's store is one global object for the whole app, so
concurrent requests overwrite each other's values. derive runs once per
request, and its values are not shared with other requests.requestLogger before the routes it should log. Elysia hooks
apply only to routes registered after them.derive runs. Those lines carry no requestId. The plugin logs
them, and validation failures, as warn request_rejected, so the error
rate counts server faults only.body, query...), the property
path and the schema rule it broke, never the rejected value. Elysia's
error.message and its summary both include the input, and a login body
holds a password.templates/alert-config.ts defines these names. Record durations as
histograms, never as averages: a mean hides the slow tail, and the tail is
what players feel as lag.
| Signal | Instrument | Where the threshold comes from |
|---|---|---|
game.tick.duration (p99) | histogram, seconds | Tick budget: 1 / tickRate times a headroom fraction. Tick rate from game-backend-architecture. |
game.tick.overruns | counter | Ticks that took longer than the interval. A sustained count means rooms fall behind. |
game.rooms.active, game.ws.connections | up-down counter | A load test of one server (see below). |
game.ws.closes by code | counter | Baseline per close code. |
game.messages.errors by mode, messageType | counter | Baseline rate. |
game.matchmaking.wait (p95) | histogram, seconds | Baseline per mode. The queue design is in matchmaking-system. |
game.jobs.failed by queue | counter | Baseline. Count failed and stalled jobs from the queue events in bullmq-game-queues. |
game.currency.minted, game.currency.spent | counter | The sink and faucet targets in game-economy-design. |
roomId in the log context and query the logs.
Do not make roomId, playerId or sessionId a metric label: each value
becomes its own time series.close handler reports 1006 when the client process
dies. 1000 is a normal close; 1001 is a page navigating away or a server
going down. Alert on a rise in 1006, not on total closes.tickOverrunRule takes both values.capacityRule fires at a fraction of it that you choose.baselineRule. Tighten or
loosen it after the first false alert.runbook line saying what
the responder does first.messageType appears in game.messages.errors.game-economy-design
targets.ci-cd-game runs the deploy; this list is what to look at afterwards.
store: wrong ids and durations under load.warn.gameplay-analytics.boilerplate/logger.ts: copy when the server needs structured logs. It has
GameLogger (JSON lines, child loggers that carry playerId, sessionId,
roomId), the requestLogger Elysia plugin, and createSessionLogger for
WebSocket connections.templates/alert-config.ts: copy when you define metrics and alerts. It
names the game signals, the AlertRule shape, and three rule builders
(tick overrun, capacity, baseline). None of them has a default threshold.references/sources.md: read when you need the source behind a rule here.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/game-dev:monitoring-game-opsfrom game-dev
npx claudepluginhub fcsouza/agent-skills --plugin game-dev39 skills in this plugin
/betterauth-integrationCovers the game-specific layer of Better Auth: player, moderator and admin roles, session checks on game routes and WebSocket handshakes, and keeping the auth session apart from the game session. Use when a game needs player login, moderator or admin powers, or authenticated real-time connections, and the project uses Better Auth./bullmq-game-queuesBackground job design for game backends on BullMQ and Redis: one queue per game domain, idempotent reward fulfilment, and cron schedulers for daily rewards and season ends. Use when a game needs matchmaking requests, reward grants, match results, notifications or analytics processed off the request path, or recurring and timed jobs such as daily login rewards, leaderboard snapshots and season rollovers./Other plugins' skills for the same job