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 职业分类
| 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.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.