Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

ui-question

verified

Ask user a question via browser UI and wait for response

View on GitHub

Marketplace

mermaid-collab-dev

ben-mad-jlp/claude-mermaid-collab

Plugin

mermaid-collab

Repository

ben-mad-jlp/claude-mermaid-collab
2stars

skills/ui-question/SKILL.md

Last Verified

February 3, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ben-mad-jlp/claude-mermaid-collab/blob/main/skills/ui-question/SKILL.md -a claude-code --skill ui-question

Installation paths:

Claude
.claude/skills/ui-question/
Powered by add-skill CLI

Instructions

# UI Question

Renders a question in the browser and polls for user response. This skill is intended to be invoked by other skills that need to ask questions via the browser UI.

## Input

The skill receives arguments in the format:
```
project: <project_path> | session: <session_name> | ui: <UI component JSON>
```

The `ui` parameter is the same object that would be passed to `render_ui`.

Example invocation:
```
Tool: Skill
Args: {
  "skill": "ui-question",
  "args": "project: /path/to/project | session: my-session | ui: {\"type\": \"MultipleChoice\", \"props\": {\"options\": [{\"value\": \"a\", \"label\": \"Option A\"}, {\"value\": \"b\", \"label\": \"Option B\"}], \"name\": \"choice\", \"label\": \"Which approach?\"}}"
}
```

If project and session are not provided, the skill will attempt to find the active collab session.

## Steps

1. **Parse arguments** to extract project, session, and UI component.

2. **Find active session** (if not provided):
   - Call `mcp__plugin_mermaid-collab_mermaid__list_sessions` to find active sessions
   - Use the most recently active session

3. **Render UI** (non-blocking):
   ```
   Tool: mcp__plugin_mermaid-collab_mermaid__render_ui
   Args: {
     "project": "<project>",
     "session": "<session>",
     "ui": <parsed UI object>,
     "blocking": false
   }
   ```
   Save the returned `uiId`.

4. **Poll for response** in a loop:
   ```
   Tool: mcp__plugin_mermaid-collab_mermaid__get_ui_response
   Args: {
     "project": "<project>",
     "session": "<session>",
     "uiId": "<uiId>"
   }
   ```

   - If status is `pending`: poll again (the server adds a delay)
   - If status is `responded`: extract action and data, proceed to output
   - If status is `stale` or `not_found`: report error

5. **Output the response** in a structured format that the calling skill can parse:
   ```
   UI_RESPONSE:
   action: <action>
   data: <JSON data>
   ```

## Completion

This skill completes after outputting the user's response. The callin

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2686 chars