Skip to content
Back to skills

Ai

ASecurity

Design the message schema and streaming events an agent uses to send UI to a frontend (JSON, WebSocket, SSE, HTMX). Use when an agent must stream components or UI updates to a browser.

  • 24 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added October 14, 2026
ai-agentsgoreactfrontendbackend

Works with

  • cli

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add andreibesleaga/GABBE --skill ai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-gabbe/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-gabbe)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: a2ui-protocols
description: Design the message schema and streaming events an agent uses to send UI to a frontend (JSON, WebSocket, SSE, HTMX). Use when an agent must stream components or UI updates to a browser.
triggers: [design agent ui protocol, implement a2ui, build genui, stream ui from agent, htmx agent responses]
tags: [ai]
context_cost: medium
---
# a2ui-protocols

## Goal
Design, enforce, and integrate robust Agent-to-UI (A2UI) communication protocols using Generative UI and HTMX conventions.

## Steps
1. **Analyze Requirements**: Understand the data exchanged between the agent and the frontend UI.
2. **Design Protocol**: Define the JSON schema, WebSocket events, or Server-Sent Events (SSE) required for the agent to stream UI components.
3. **Implement A2UI**: Configure the backend to serve dynamic UI chunks (e.g., using React Server Components, HTMX responses).
4. **Verify**: Ensure the UI updates smoothly without full page reloads and maintains state. For the front-end views that show agent traces and tool calls, see `agent-ui.skill`.

## Constraints
- The agent may stream only components that exist in the project's design system; unknown component names are rejected by the receiver, not rendered.
- Every message type has a written schema; the UI never executes code or HTML taken from a message field.

## Output Format
A protocol note `docs/A2UI_PROTOCOL.md` (message types with their JSON schema, transport, ordering and error events) and the backend and frontend code that implements it.

## Limits and safety
- Reject UI messages that do not match the schema, and cap payload size and open connections; test both limits with an oversized message.
- Set an explicit CORS origin list on every REST, SSE and WebSocket endpoint; a wildcard origin is a finding.
- The client must not be able to set the agent context id or session token; check that a forged id is refused.
- Set a timeout on streaming responses so one agent run cannot stream UI forever.

Files in this skill

  • a2ui-protocols.skill.md1.5 KB
  • actor-agent-frameworks.skill.md1.7 KB
  • agent-communication.skill.md2.8 KB
  • agent-ui.skill.md1.6 KB
  • autonomous-swarm-patterns.skill.md1.9 KB
  • beyond-llms.skill.md1.8 KB
  • context-engineering.skill.md8.2 KB
  • llm-as-judge.skill.md6.1 KB
  • multi-agent-systems.skill.md1.7 KB
  • rag-evaluation.skill.md6 KB
  • reasoning-patterns.skill.md8.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.