a2ui-response-generator

1
0
Source

A skill that can retrieve A2UI UI JSON schematics and UI templates that best show the response. This skill is essential and must be used before generating A2UI (Agent to UI) JSON responses.

Install

mkdir -p .claude/skills/a2ui-response-generator && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4505" && unzip -o skill.zip -d .claude/skills/a2ui-response-generator && rm skill.zip

Installs to .claude/skills/a2ui-response-generator

About this skill

A2UI response generation Skill

Overview

This skill is essential and must be used before generating A2UI (Agent to UI) JSON responses. It enables agents to retrieve A2UI UI JSON schematics and UI templates that best show the response, allowing for the generation of rich, interactive UI responses using the A2UI protocol.

Instead of loading the entire A2UI schema and all examples at once, this skill allows agents to retrieve only the relevant UI templates and schematics based on the response content. The A2UI protocol defines a JSON-based format for dynamically constructing and updating user interfaces. By breaking down the examples into modular templates, agents can:

  1. Retrieve the appropriate A2UI UI JSON schematics for validation and structure reference
  2. Select UI templates that best match and display the response content
  3. Reduce prompt token usage by loading only necessary templates
  4. Easily extend with new UI templates for different domains

File Structure

A2UI_response_generator/
├── SKILL.md                          # This file - main skill documentation
├── view_a2ui_schema.py               # Tool to view the complete A2UI schema (schema included in file)
├── view_a2ui_examples.py             # Tool to view UI template examples (templates included in file)
├── __init__.py                       # Package initialization
├── schema/                           # A2UI schema definitions
│   ├── __init__.py
│   └── base_schema.py                # Base A2UI schema
└── UI_templete_examples/             # UI template examples
    ├── __init__.py
    ├── booking_form.py               # Booking form template
    ├── contact_form.py               # Contact form template
    ├── email_compose_form.py         # Email compose form template
    ├── error_message.py              # Error message template
    ├── info_message.py               # Info message template
    ├── item_detail_card_with_image.py # Item detail card with image template
    ├── profile_view.py               # Profile view template
    ├── search_filter_form.py         # Search filter form template
    ├── simple_column_list_without_image.py # Simple list template
    ├── single_column_list.py         # Single column list template
    ├── success_confirmation_with_image.py # Success confirmation template
    └── two_column_list.py            # Two column list template

Quick Start

When it is required to generate UI JSON, follow these steps:

Important: Please use the execute_shell_command tool to execute Python command.

Step 1: Load the A2UI Schema

Run the following script to load the complete A2UI schema.

Currently available schema_category is BASE_SCHEMA.

Use the execute_shell_command tool to run (make sure you are in the skill directory):

python -m view_a2ui_schema --schema_category BASE_SCHEMA

Usage: python -m view_a2ui_schema --schema_category [schema_category] - Loads the A2UI schema definition for validating A2UI JSON response structure. Currently only BASE_SCHEMA is available.

About detailed usage, please refer to the ./view_a2ui_schema.py script (located in the same folder as this SKILL.md file).

Step 2: Select UI Template Examples

Select appropriate UI template examples based on your response content.

IMPORTANT: You MUST use the exact template names listed in the "Available UI template examples" table below. Do NOT use generic category names like 'list', 'form', 'confirmation', or 'detail'. You MUST use the specific template name (e.g., SINGLE_COLUMN_LIST_WITH_IMAGE, BOOKING_FORM_WITH_IMAGE, etc.).

Use the execute_shell_command tool to run (make sure you are in the skill directory):

python -m view_a2ui_examples --template_name SINGLE_COLUMN_LIST_WITH_IMAGE

Usage: python -m view_a2ui_examples --template_name [template_name] - Loads a UI template example for reference when generating A2UI responses. Accepts a single template name from the available templates table below.

Available UI template examples (when schema_category is BASE_SCHEME, you MUST use these exact names, case-sensitive):

Template NameUse CaseSelection GuideImage Support
SINGLE_COLUMN_LIST_WITH_IMAGEVertical list with detailed cards (for ≤5 items)Use for list display with ≤5 items✅ With image
TWO_COLUMN_LIST_WITH_IMAGEGrid layout with cards (for >5 items)Use for list display with >5 items✅ With image
SIMPLE_LISTCompact list without imagesUse for compact lists without images❌ Without image
SELECTION_CARDMultiple choice questionsUse for multiple choice questions❌ Without image
MULTIPLE_SELECTION_CARDSMultiple selection cards in a listUse for multiple selection cards displayed together❌ Without image
BOOKING_FORM_WITH_IMAGEReservation, booking, registrationUse for booking/reservation forms✅ With image
SEARCH_FILTER_FORM_WITH_IMAGESearch forms with filtersUse for search forms with filters❌ Without image
CONTACT_FORM_WITH_IMAGEContact or feedback formsUse for contact/feedback forms❌ Without image
EMAIL_COMPOSE_FORM_WITH_IMAGEEmail composition formsUse for email composition forms❌ Without image
SUCCESS_CONFIRMATION_WITH_IMAGESuccess message after actionUse for success confirmations✅ With image
ERROR_MESSAGEError or warning displayUse for error messages❌ Without image
INFO_MESSAGEInformational messagesUse for info messages❌ Without image
ITEM_DETAIL_CARDDetailed view of single itemUse for item detail views✅ With image
ITEM_DETAIL_CARD_WITH_IMAGEDetailed view of single item with imageUse for item detail views with images✅ With image
PROFILE_VIEWUser or entity profile displayUse for profile views✅ With image

Remember: Always use the exact template names from the table above. Never use generic terms like 'list' or 'form' - they are NOT valid template names.

About detailed usage, please refer to the ./view_a2ui_examples.py script (located in the same folder as this SKILL.md file).

Step 3: Generate the A2UI Response

After loading the schema and examples, output your A2UI response directly as text. The text output must contain two parts separated by the delimiter ---a2ui_JSON---:

First Part: Conversational text response: Your natural language reply to the user Second Part. A2UI JSON messages: A raw JSON array of A2UI message objects that MUST validate against the A2UI schema

Format:

[Your conversational response here]

---a2ui_JSON---
[
  { "beginRendering": { ... } },
  { "surfaceUpdate": { ... } },
  { "dataModelUpdate": { ... } }
]

Important: The JSON portion must be valid JSON and conform to the A2UI schema loaded in Step 1.

Domain-Specific Extensions

To add support for a new domain (e.g., flight booking, e-commerce), add new templates to view_a2ui_examples.py:

  1. Define a new template constant in view_a2ui_examples.py (e.g., FLIGHT_BOOKING_FORM_EXAMPLE)
  2. Add the template to the TEMPLATE_MAP dictionary in view_a2ui_examples.py
  3. Update this SKILL.md to include the new templates in the available templates list

Troubleshooting

If you encounter any issues running the scripts, make sure: you use the tool execute_shell_command run the python command.

  1. You are in the correct skill directory (check the skill description for the actual path)
  2. The script files (view_a2ui_schema.py and view_a2ui_examples.py) exist in the skill directory
  3. You have the required Python dependencies installed

For detailed usage of each script, please refer to:

  • ./view_a2ui_schema.py - View the A2UI schema
  • ./view_a2ui_examples.py - View A2UI template examples

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

641968

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

590705

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318395

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

450339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.