add-message-type — community add-message-type, ShareGo, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Advanced Protocol Agents needing to extend WebSocket message types in a serverless, end-to-end encrypted environment. Serverless, end-to-end encrypted, local-network file and secret sharing between 2 devices. No cloud, no relay — just Wi-Fi.

MehdiMamas MehdiMamas
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The add-message-type skill by MehdiMamas is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Advanced Protocol Agents needing to extend WebSocket message types in a serverless, end-to-end encrypted environment.

Core Value

Empowers agents to define new message interfaces using TypeScript enums and interfaces, enhancing the ShareGo protocol with custom message types over WebSocket, leveraging JSON messages for seamless communication.

Capabilities Granted for add-message-type

Extending the ShareGo protocol with custom message types
Defining new message interfaces for local-network file sharing
Implementing end-to-end encryption for sensitive data exchange

! Prerequisites & Limits

  • Requires modifications to the core library and documentation
  • Limited to TypeScript environments
  • Dependent on WebSocket protocol
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

add-message-type

Install add-message-type, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Adding a new message type

the ShareGo protocol uses typed JSON messages over WebSocket. adding a new message type requires changes in the core library and documentation.

Steps

1. Add the type to the enum

file: core/src/protocol/types.ts

typescript
1export enum MessageType { 2 // ... existing types 3 PING = "PING", // your new type 4}

2. Define the message interface

file: core/src/protocol/types.ts

typescript
1export interface PingMessage extends BaseMessage { 2 type: MessageType.PING; 3 timestamp: number; 4}

3. Add to the union

file: core/src/protocol/types.ts

typescript
1export type ProtocolMessage = 2 | HelloMessage 3 | ChallengeMessage 4 // ... existing 5 | PingMessage; // add here

4. Update serialization validation

file: core/src/protocol/serialization.ts

add a case for the new type in deserializeMessage() to validate required fields:

typescript
1case MessageType.PING: 2 if (typeof parsed.timestamp !== "number") { 3 throw new Error("PING: missing timestamp"); 4 } 5 break;

5. Handle in session

file: core/src/session/session.ts

add a case in handleIncoming():

typescript
1case MessageType.PING: 2 this.handlePing(msg as PingMessage); 3 break;

6. Export if needed

if the new message type needs to be used by app shells, export it from:

  • core/src/protocol/index.ts
  • core/src/index.ts

7. Add tests

file: core/src/protocol/serialization.test.ts

typescript
1it("should roundtrip PING message", () => { 2 const msg: PingMessage = { 3 ...createBaseFields(MessageType.PING, "ABC123", 1), 4 timestamp: Date.now(), 5 }; 6 const bytes = serializeMessage(msg); 7 const parsed = deserializeMessage(bytes); 8 expect(parsed.type).toBe(MessageType.PING); 9});

8. Update documentation

  • docs/PROTOCOL.md — add the message spec, fields table, and example JSON
  • docs/THREAT_MODEL.md — add security implications if the message carries sensitive data
  • .cursor/rules/sharego-protocol.mdc — update if wire format changes

Security checklist

  • new message does NOT carry plaintext sensitive data (passwords, OTPs)
  • if it carries binary data, it uses AEAD encryption like DATA messages
  • sequence number is required and validated
  • protocol version is checked
  • session ID is validated
  • unknown/unexpected messages of this type are rejected, not ignored
  • no new fields leak key material or internal state

Checklist

  • enum value added to MessageType
  • interface defined extending BaseMessage
  • added to ProtocolMessage union
  • serialization validation added in deserializeMessage()
  • handler added in session.ts handleIncoming()
  • exported from barrel files (if needed by app shells)
  • roundtrip test added
  • docs/PROTOCOL.md updated with spec
  • docs/THREAT_MODEL.md updated if security-relevant

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is add-message-type?

Perfect for Advanced Protocol Agents needing to extend WebSocket message types in a serverless, end-to-end encrypted environment. Serverless, end-to-end encrypted, local-network file and secret sharing between 2 devices. No cloud, no relay — just Wi-Fi.

How do I install add-message-type?

Run the command: npx killer-skills add MehdiMamas/ShareGo/add-message-type. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for add-message-type?

Key use cases include: Extending the ShareGo protocol with custom message types, Defining new message interfaces for local-network file sharing, Implementing end-to-end encryption for sensitive data exchange.

Which IDEs are compatible with add-message-type?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for add-message-type?

Requires modifications to the core library and documentation. Limited to TypeScript environments. Dependent on WebSocket protocol.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add MehdiMamas/ShareGo/add-message-type. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use add-message-type immediately in the current project.

Related Skills

Looking for an alternative to add-message-type or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI