Ask me what skills you need
What are you building?
Tell me what you're working on and I'll find the best agent skills for you.
| 条件 | 種類 |
|---|---|
| クライアントが明示的に情報を要求/操作を実行 | Request-Response型 |
| サーバー側の状態変化をクライアントに通知 | Event型 |
詳細パターンとコード例: references/protocol-patterns.md を参照。
moorestech_server/Assets/Scripts/Server.Protocol/PacketResponse/ に新規ファイルを作成。
using System;
using System.Collections.Generic;
using MessagePack;
using Server.Protocol;
namespace Server.Protocol.PacketResponse
{
public class YourProtocol : IPacketResponse
{
public const string ProtocolTag = "va:yourProtocol";
private readonly ISomeDependency _dependency;
public YourProtocol(ServiceProvider serviceProvider)
{
_dependency = serviceProvider.GetService<ISomeDependency>();
}
public ProtocolMessagePackBase GetResponse(byte[] payload)
{
var data = MessagePackSerializer.Deserialize<YourRequestMessagePack>(payload);
// ビジネスロジック
return new YourResponseMessagePack(/* result */);
}
#region MessagePack
[MessagePackObject]
npx skills add moorestech/moorestech --skill creating-server-protocolHow clear and easy to understand the SKILL.md instructions are, rated from 1 to 5.
Clear and well structured, with only minor parts that might need a second read.
How directly an agent can act on the SKILL.md instructions, rated from 1 to 5.
Mostly actionable with clear steps; only a few small gaps remain.