All skills
sugarforever avatar

/interactive-input

@66e1826

Enables rich interactive UI components in chat responses. When presenting questions that require structured input (multiple choice, true/false, forms), embed interactive blocks that compatible clients render as native UI elements. Use when user asks for quizzes, exercises, surveys, or any structured input scenario.

Use this Skill: https://skilld.dev/gh/sugarforever/01coder-agent-skills/interactive-input

This session only. Nothing lands on disk.

referencesschema.md

≈1.5k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Interactive Block Schema (v1)

Root Structure

{
  "id": "unique-block-id",
  "card": {
    "body": [ /* CardElement[] */ ],
    "actions": [ /* CardAction[] */ ]
  }
}
  • id (string, required): Unique identifier for this block, used to correlate user responses
  • card.body (array, required): List of UI elements to render
  • card.actions (array, optional): Action buttons at the bottom of the card

Card Elements

TextBlock

Static text label. Use as question titles or descriptions.

{ "type": "TextBlock", "text": "Your question here", "weight": "bold", "size": "md" }
Field Type Default Description
text string required The text content
weight "normal" | "bold" "normal" Font weight
size "sm" | "md" | "lg" "md" Font size

Input.ChoiceSet

Single or multiple selection from a list of options.

{
  "type": "Input.ChoiceSet",
  "id": "answer",
  "label": "Select your answer",
  "style": "expanded",
  "isMultiSelect": false,
  "choices": [
    { "title": "Option A", "value": "a" },
    { "title": "Option B", "value": "b" }
  ]
}
Field Type Default Description
id string required Input identifier for the response
label string optional Label above the input
style "expanded" | "compact" "compact" expanded = radio/checkbox list, compact = dropdown
isMultiSelect boolean false true for checkboxes, false for radio buttons
choices array required List of { title, value } objects

Input.Text

Free-form text input.

{
  "type": "Input.Text",
  "id": "explanation",
  "label": "Show your work",
  "placeholder": "Type your answer...",
  "isMultiline": true
}
Field Type Default Description
id string required Input identifier
label string optional Label above the input
placeholder string optional Placeholder text
isMultiline boolean false true for textarea, false for single-line input

Input.Number

Numeric input.

{
  "type": "Input.Number",
  "id": "result",
  "label": "Final answer",
  "min": 0,
  "max": 100,
  "placeholder": "Enter a number"
}
Field Type Default Description
id string required Input identifier
label string optional Label above the input
min number optional Minimum value
max number optional Maximum value
placeholder string optional Placeholder text

Input.Toggle

Boolean toggle (checkbox).

{
  "type": "Input.Toggle",
  "id": "confident",
  "label": "I am confident in my answer"
}
Field Type Default Description
id string required Input identifier
label string required Label next to the checkbox
valueOn string optional Value when checked
valueOff string optional Value when unchecked

Separator

Visual divider between elements.

{ "type": "Separator" }

Card Actions

Action.Submit

Submit button that collects all input values and sends them as a response.

{ "type": "Action.Submit", "title": "Submit Answer" }
Field Type Description
title string Button label text

Complete Examples

Single Choice Quiz

```interactive
{
  "id": "math-q1",
  "card": {
    "body": [
      { "type": "TextBlock", "text": "What is 2 + 3 × 4?", "weight": "bold" },
      { "type": "Input.ChoiceSet", "id": "answer", "style": "expanded",
        "choices": [
          { "title": "A. 20", "value": "20" },
          { "title": "B. 14", "value": "14" },
          { "title": "C. 24", "value": "24" },
          { "title": "D. 11", "value": "11" }
        ]
      }
    ],
    "actions": [{ "type": "Action.Submit", "title": "Submit" }]
  }
}
```

Multiple Choice

```interactive
{
  "id": "even-numbers",
  "card": {
    "body": [
      { "type": "TextBlock", "text": "Select all even numbers:", "weight": "bold" },
      { "type": "Input.ChoiceSet", "id": "answer", "style": "expanded", "isMultiSelect": true,
        "choices": [
          { "title": "12", "value": "12" },
          { "title": "15", "value": "15" },
          { "title": "28", "value": "28" },
          { "title": "33", "value": "33" }
        ]
      }
    ],
    "actions": [{ "type": "Action.Submit", "title": "Submit" }]
  }
}
```

Mixed Form (Show-your-work)

```interactive
{
  "id": "geometry-q1",
  "card": {
    "body": [
      { "type": "TextBlock", "text": "A rectangle is 8cm long and 5cm wide. Find the perimeter.", "weight": "bold" },
      { "type": "Input.Text", "id": "steps", "label": "Show your work", "isMultiline": true, "placeholder": "Write your steps..." },
      { "type": "Separator" },
      { "type": "Input.Number", "id": "answer", "label": "Final answer (cm)" }
    ],
    "actions": [{ "type": "Action.Submit", "title": "Submit Answer" }]
  }
}
```

Survey / Feedback

```interactive
{
  "id": "feedback",
  "card": {
    "body": [
      { "type": "TextBlock", "text": "How was this lesson?", "weight": "bold" },
      { "type": "Input.ChoiceSet", "id": "rating", "style": "expanded",
        "choices": [
          { "title": "Excellent", "value": "5" },
          { "title": "Good", "value": "4" },
          { "title": "Average", "value": "3" },
          { "title": "Needs improvement", "value": "2" }
        ]
      },
      { "type": "Input.Text", "id": "comment", "label": "Any comments?", "placeholder": "Optional feedback...", "isMultiline": true },
      { "type": "Input.Toggle", "id": "more", "label": "I want more practice on this topic" }
    ],
    "actions": [{ "type": "Action.Submit", "title": "Send Feedback" }]
  }
}
```

Source: SKILL.md on GitHub

No alerts17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    No security issues detected. This skill provides instructions and a schema for generating interactive UI components (like quizzes, forms, and surveys) in chat responses. It contains no executable code, network operations, or external dependencies.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer6mo

    2 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 66e1826. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Steadyupdated 7 months ago

README badge

README badge for sugarforever/01coder-agent-skills/interactive-input