add-ws-action

Automate adding outgoing WebSocket actions with typed payloads and API exposure.

3|1|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/Ariedam64/Gemini --skill add-ws-action
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-ws-action
Source: https://github.com/Ariedam64/Gemini/tree/main/.claude/skills/add-ws-action
Command: npx skills add https://github.com/Ariedam64/Gemini --skill add-ws-action

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the addition of new outgoing WebSocket actions with typed payloads and a public API surface, reducing boilerplate and integration errors.

Core Features & Use Cases

  • Typed payloads for ClientToServer messages
  • Automatic API exposure to window.Gemini.WebSocket
  • Step-by-step guidance for adding new actions across projects and extensions

Quick Start

Create a new action following the steps to define the action name, payload, and API exposure.

Frequently Asked Questions about add-ws-action

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

FAQPage Schema
How do I add typed WebSocket actions with a clean API in TypeScript?

To add typed WebSocket actions, you define the action name, typed payload interface, and API exposure. This process automates protocol enum extension and optional middleware scaffolding for ClientToServer messages.

What is the best way to expose WebSocket API functions to the frontend window object?

Exposing WebSocket API functions is done through automatic window.Gemini.WebSocket assignment. This provides a public API surface for your typed payloads across projects and extensions.

How does the WebSocket protocol enum extension work when adding new actions?

Protocol enum extension works by mapping newly defined WebSocket actions to their typed payloads. This ensures type safety for ClientToServer messages and updates the protocol systematically.

Do I need to manually scaffold middleware for every new WebSocket payload?

No, you do not need to manually scaffold middleware for every new WebSocket payload. The process provides optional middleware scaffolding automatically when defining new outgoing actions.

Can I use this WebSocket integration approach across multiple frontend extensions?

Yes, you can apply this WebSocket integration approach across multiple frontend extensions. It provides step-by-step guidance to cover action definition, protocol updates, and API exposure project-wide.

Why define typed payloads for ClientToServer WebSocket messages?

Defining typed payloads for ClientToServer WebSocket messages reduces boilerplate and integration errors. It enforces strict TypeScript interfaces for outgoing actions, ensuring a reliable API surface.