Protocol Design - Message Types & Schemas

Document message types, envelopes, and Zod schemas for the Bastion protocol.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/Glorktelligence/Bastion --skill protocol-design-message-types-schemas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Protocol Design - Message Types & Schemas
Source: https://github.com/Glorktelligence/Bastion/tree/main/.claude/skills/protocol-design
Command: npx skills add https://github.com/Glorktelligence/Bastion --skill protocol-design-message-types-schemas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides the definitive guide to structuring and validating all message types within the Bastion protocol, ensuring consistent and secure communication between system components.

Core Features & Use Cases

  • Message Schema Definition: Outlines the structure and validation rules for all inter-component messages.
  • Protocol Versioning: Establishes a clear process for updating and managing protocol versions.
  • Use Case: When developing a new feature that requires sending data between the AI and the human client, consult this Skill to understand the correct message envelope, payload structure, and validation schema to use.

Quick Start

Refer to the Protocol Design skill to understand the structure of a 'task' message.

Frequently Asked Questions about Protocol Design - Message Types & Schemas

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

FAQPage Schema
How do I define and validate message schemas for an API protocol in TypeScript?

Message schema definition involves structuring inter-component messages and applying validation rules to maintain security and protocol integrity across system communications.

What is the best way to add new message types to a validated communication protocol?

Adding new message types requires following a clear, ordered documentation process that defines the message envelope, payload structure, and Zod validation schema to enforce strict security and integrity rules.

How does Zod validation work for inbound and outbound message envelopes?

Zod validation enforces strict rules for all inbound and outbound message envelopes, verifying payload structures against defined schemas to maintain security and data integrity.

When do I need to use protocol versioning for API message schemas?

Protocol versioning is needed when updating and managing protocol versions to ensure consistent communication, establishing a clear process for structuring new message types without breaking existing system components.

Does this protocol design approach support TypeScript and Zod for task message validation?

Yes, this protocol design approach supports TypeScript and Zod, providing the definitive guide to structuring task messages and applying strict validation rules for all inbound and outbound system communications.

Why does my message schema validation fail when sending data between AI and client components?

Message schema validation fails when the payload structure or message envelope does not match the defined Zod schemas, as the protocol enforces strict validation rules on all inbound and outbound messages to maintain integrity.