Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

lynx-a2ui

БесплатноБез исполняемых скриптовНе проверен

Convert natural-language UI requests into A2UI v1.0 JSON protocol messages that an A2UI renderer can consume.

lynx-communityот lynx-community★ 28 звёзд на GitHub

Об этом скилле

A2UI Generator

Use this skill when an agent must turn a natural-language request into A2UI protocol data for rendering. The output is data only: a JSON array of A2UI v1.0 messages.

Generation Workflow

  1. Fetch the latest catalog from the URL in the Catalog Source section.
  2. Read catalogId, component schemas, function schemas, required fields, enum values, and examples if the fetched catalog provides them.
  3. Build the UI from the protocol rules, catalog schema, hard rules, and example patterns embedded in this skill.
  4. Translate the user's intent into a data model and a flat component graph that validates against the latest fetched catalog.
  5. Emit only the final JSON array of A2UI messages.

This skill is self-contained for third-party agent platforms. Do not rely on repository-local files.

Protocol Reference

A2UI is a JSON-based streaming UI protocol. The agent describes an interface by emitting declarative JSON messages. The renderer instantiates only trusted components from the active catalog. There is no arbitrary code: never emit JavaScript, HTML, CSS, event handlers, scripts, or executable snippets.

Design principles:

  • Prompt-first: follow the in-context schema and examples exactly.
  • Safe like data, expressive like code: emit trusted component data only.
  • Structure/data separation: component messages define a flat UI graph; data model messages populate or update values used by dynamic bindings.
  • Progressive rendering: each valid message may be rendered as it arrives. Prefer a useful minimal UI first, then add data or refinements.
  • Transport-agnostic: A2UI messages may travel over SSE, REST, WebSocket, A2A, AG UI, MCP, or another host transport.

Envelope semantics:

  • createSurface creates a surface. Once created, its surfaceId and catalogId are fixed. To change catalog or theme, delete and recreate the surface.
  • updateDataModel sets values inside a surface's data model. It has shape { "surfaceId": string, "path"?: string, "value"?: any }. path defaults to /, and value may be any JSON value.
  • updateComponents adds or replaces component definitions for a surface. It may reference data paths, but those paths should already be populated by an earlier updateDataModel message in the same response.
  • deleteSurface removes a surface.

Output Contract

Return only a pretty-printed JSON array. Do not return Markdown, prose, XML, HTML, JavaScript, CSS, code fences, comments, or trailing commas.

Each array item must be a top-level object with "version": "1.0" and exactly one of these message keys:

  • "createSurface": create a new render surface.
  • "updateDataModel": set JSON values used by bindings.
  • "updateComponents": add or replace component definitions.
  • "deleteSurface": remove an existing surface.

For a fresh UI response, emit messages in this order:

  1. createSurface
  2. updateDataModel for any initial values read through { "@path": ... }
  3. updateComponents containing a component with id "root"
  4. optional additional updateDataModel or updateComponents messages

The first fresh updateComponents message should contain exactly one root component. Later updateComponents messages may replace or add more components as needed. Put each message object and component object on separate lines so the JSON remains easy to parse and validate.

Before finishing, check bracket balance: every component object closes once, every components array closes once, every message object closes once, and the outer array closes exactly once.

Catalog Source

Use surface id "main" unless the caller provides a different id. Before generating A2UI JSON, fetch the latest Lynx GenUI A2UI catalog from:

"https://unpkg.com/@lynx-js/genui/a2ui/dist/catalog.json"

Treat that fetched catalog as the authoritative, dynamic type definition for the generated UI. Do not rely on a stale component list remembered from this skill. The catalog has this top-level structure:

{
  "catalogId": "https://unpkg.com/@lynx-js/genui/a2ui/dist/catalog.json",
  "components": {},
  "functions": {}
}

Use the fetched catalogId value in createSurface.catalogId. Use only components listed under components, only functions listed under functions, and only props, required fields, enum values, dynamic value shapes, and action schemas allowed by that latest catalog. If the catalog cannot be fetched, ask for the catalog content or a reachable catalog URL before generating non-trivial UI.

If the user supplies a different catalog URL or catalog JSON, use that catalog instead of the default URL and keep createSurface.catalogId aligned with the active catalog.

Example Strategy

Examples improve accuracy, but they must be catalog-aware. Use examples this way:

  • Prefer examples embedded in the fetched catalog if present.
  • Use the embedded examples below as reusable patterns for a form with an action, a data-bound
Полный SKILL.md на GitHub

Установить lynx-a2ui в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

package.json

FAQ

Что делает скилл lynx-a2ui?

Convert natural-language UI requests into A2UI v1.0 JSON protocol messages that an A2UI renderer can consume.

Как установить скилл lynx-a2ui?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл lynx-a2ui запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить lynx-a2ui с