protocol-gen

Generate and validate WebSocket protocol schemas, types, and handler maps.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/lasswellt/claudeHQ --skill protocol-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: protocol-gen
Source: https://github.com/lasswellt/claudeHQ/tree/main/.claude/skills/protocol-gen
Command: npx skills add https://github.com/lasswellt/claudeHQ --skill protocol-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the creation and validation of the full WebSocket protocol layer used across agent, hub, and dashboard, generating schemas, TypeScript types, and handler maps to ensure consistent communication.

Core Features & Use Cases

  • Generates Zod schemas, TypeScript types, and handler maps for all protocol messages across components.
  • Produces direction-specific unions (AgentToHub, HubToAgent, HubToDashboard, DashboardToHub) and a consolidated Message schema.
  • Validates protocol consistency against architecture docs and existing source to surface gaps and guide integration.

Quick Start

Run the protocol-gen workflow to generate schemas and types for the WebSocket protocol across agent, hub, and dashboard.

Frequently Asked Questions about protocol-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate WebSocket protocol schemas and TypeScript types automatically?

To generate WebSocket protocol schemas and TypeScript types, you can run a workflow that produces Zod schemas, handler maps, and direction-specific message unions for agent, hub, and dashboard components.

What is the best way to validate a WebSocket protocol layer against architecture requirements?

Validating a WebSocket protocol layer involves checking generated Zod schemas and TypeScript types against existing architecture docs and source code to surface integration gaps and ensure message consistency.

How does Zod schema generation work for bidirectional WebSocket messages?

Zod schema generation for WebSocket messages works by producing direction-specific unions like AgentToHub and HubToDashboard, consolidating them into a single Message schema to enforce consistent communication.

Can I generate TypeScript handler maps for a WebSocket protocol across multiple components?

Yes, you can generate TypeScript handler maps for a WebSocket protocol across agent, hub, and dashboard components, outputting the routing logic into dedicated files like protocol.ts and events.ts.

Do I need existing source code to validate generated WebSocket schemas and types?

Existing source code and architecture documentation are required to validate generated WebSocket schemas and types, as the validation process surfaces gaps and guides integration by comparing outputs against current project files.