pikdum/thistle_tea / .agents/skills/server-message
server-message
VerifiedImplement Thistle Tea SMSG_* server messages following our architecture patterns. Use this when asked to implement a new message or you need to use one that isn't implemented yet.
Create/modify a module under lib/game/network/message/ that:
use ThistleTea.Game.Network.ServerMessage, :SMSG_FOO- defines a
defstructmatching the fields needed to encode the packet - implements
to_binary/1using little-endian bit syntax patterns like<<x::little-size(32)>>
Quick examples
Minimal payload (SMSG_PONG):
defmodule ThistleTea.Game.Network.Message.SmsgPong do
@moduledoc false
use ThistleTea.Game.Network.ServerMessage, :SMSG_PONG
defstruct [:sequence_id]
@impl ServerMessage
def to_binary(%__MODULE__{sequence_id: sequence_id}) do
<<sequence_id::little-size(32)>>
end
end
Conditional payload (SMSG_AUTH_RESPONSE):
defmodule ThistleTea.Game.Network.Message.SmsgAuthResponse do
@moduledoc false
use ThistleTea.Game.Network.ServerMessage, :SMSG_AUTH_RESPONSE
@result_auth_ok 0x0C
@result_auth_wait_queue 0x1B
defstruct [:result, :billing_time, :billing_flags, :billing_rested, :queue_position]
@impl ServerMessage
def to_binary(%__MODULE__{} = msg) do
<<msg.result::little-size(8)>> <>
case msg.result do
@result_auth_ok ->
<<msg.billing_time::little-size(32), msg.billing_flags::little-size(8),
msg.billing_rested::little-size(32)>>
@result_auth_wait_queue ->
<<msg.queue_position::little-size(32)>>
_ ->
<<>>
end
end
end
How to find the packet spec
- Packet formats are cataloged in the
wow_messagesgit submodule atrefs/wow_messages/. - Look up the
.wowmspec here:refs/wow_messages/wow_message_parser/wowm/*/${SMSG_NAME}.wowm - Note that Thistle Tea is a Vanilla (patch 1.12.1) server, so ignore future client versions
Workflow
- Translate the
.wowmfields intodefstructfields and an encoder into_binary/1. - Use pattern matching in the function head for type safety:
to_binary(%__MODULE__{} = msg).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |