lynx-a2ui
БесплатноБез исполняемых скриптовНе проверенConvert natural-language UI requests into A2UI v1.0 JSON protocol messages that an A2UI renderer can consume.
от 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
- Fetch the latest catalog from the URL in the Catalog Source section.
- Read
catalogId, component schemas, function schemas, required fields, enum values, and examples if the fetched catalog provides them. - Build the UI from the protocol rules, catalog schema, hard rules, and example patterns embedded in this skill.
- Translate the user's intent into a data model and a flat component graph that validates against the latest fetched catalog.
- 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:
createSurfacecreates a surface. Once created, itssurfaceIdandcatalogIdare fixed. To change catalog or theme, delete and recreate the surface.updateDataModelsets values inside a surface's data model. It has shape{ "surfaceId": string, "path"?: string, "value"?: any }.pathdefaults to/, andvaluemay be any JSON value.updateComponentsadds or replaces component definitions for a surface. It may reference data paths, but those paths should already be populated by an earlierupdateDataModelmessage in the same response.deleteSurfaceremoves 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:
createSurfaceupdateDataModelfor any initial values read through{ "@path": ... }updateComponentscontaining a component with id"root"- optional additional
updateDataModelorupdateComponentsmessages
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
Установить lynx-a2ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic