standard-schema
Standard Schema v1 for socka contracts and wire validation—Zod, Valibot, or any compatible library; no Zod-only public surface.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Standard Schema v1 for socka contracts and wire validation—Zod, Valibot, or any compatible library; no Zod-only public surface.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Standard Schema socka contracts (defineSocka), v1 wire envelopes, SockaSession/SockaWebSocketClient, React useSockaSession and SockaSessionProvider, SockaError.
SockaDoSession and SockaWebSocketDO on Cloudflare Durable Objects—contract, handlers, wireFormat, SockaError; extends websocket-do BaseSession.
Enforce strict TypeScript typing without escape hatches. Never use `any`, `as` casts to bypass the compiler, or similar workarounds—find the proper typed solution instead.
React Router v7 routing patterns and environment variable configuration. Use when adding routes, configuring routing, or setting up environment variables.
Read when implementing multi-phase work after a plan exists. Mandatory—mkdir+touch then Write/StrReplace (no heredocs), update the temp punch list at every phase boundary, one item at a time, per-phase tests. Complements punch-list-planning for authors.
Read when authoring implementation plans, phased roadmaps, or CreatePlan output for multi-step code work. Ensures the plan hands off a mandatory temp punch list and tells the executor which skill to follow.
| name | standard-schema |
| description | Standard Schema v1 for socka contracts and wire validation—Zod, Valibot, or any compatible library; no Zod-only public surface. |
You define call input and optional output (and optional push payloads) for @firtoz/socka/core, @firtoz/socka/client, @firtoz/socka/react, and @firtoz/socka/do. Omit output only for intentional fire-and-forget success semantics; output slots that are present use StandardSchemaV1 from @standard-schema/spec so callers can use Zod, Valibot, ArkType, etc., without socka-specific adapters.
StandardSchemaV1 instances into defineSocka call/push definitions. SockaWebSocketClient, SockaSession, useSocka, useSockaSession, SockaSessionProvider, and SockaDoSession all consume the resulting SockaContract—not raw library types on socka’s public API.defineSocka (no fromZod / fromValibot helpers required—see package README).defineSocka + useSockaSession / SockaSession / SockaDoSession.exhaustiveGuard from @firtoz/maybe-error in switch defaults so new variants fail at compile time.defineSocka → SockaSession or useSockaSession (or SockaSessionProvider + useSockaSessionContext) on the client; SockaDoSession with the same contract on the DO.SockaWebSocketClient with callbacks, or @firtoz/socka/core encode/decode helpers if you implement custom glue.@firtoz/websocket-do through socka; import transport primitives from websocket-do directly when needed.