interactive-input

GitHub

用于在聊天响应中嵌入交互式UI组件(如单选、多选、表单),支持测验、调查和结构化数据收集场景。

skills/interactive-input/SKILL.md sugarforever/01coder-agent-skills

Trigger Scenarios

用户要求进行测验或练习 用户发起投票或调查 需要收集结构化表单数据

Install

npx skills add sugarforever/01coder-agent-skills --skill interactive-input -g -y
More Options

Use without installing

npx skills use sugarforever/01coder-agent-skills@interactive-input

指定 Agent (Claude Code)

npx skills add sugarforever/01coder-agent-skills --skill interactive-input -a claude-code -g -y

安装 repo 全部 skill

npx skills add sugarforever/01coder-agent-skills --all -g -y

预览 repo 内 skill

npx skills add sugarforever/01coder-agent-skills --list

SKILL.md

Frontmatter
{
    "name": "interactive-input",
    "description": "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."
}

Interactive Input Blocks

Embed interactive UI components (radio buttons, checkboxes, text fields, toggles) directly in chat responses. Compatible clients render these as native UI elements; other clients show a readable JSON code block as fallback.

When to Use

  • Quizzes and exercises (single/multiple choice, fill-in-the-blank)
  • Surveys and polls
  • Structured data collection (forms)
  • Any scenario where the user needs to select from options or provide structured input

How It Works

Wrap a JSON block in a ```interactive code fence within your normal markdown response. You can mix regular text and interactive blocks freely in the same message.

Schema Reference

See references/schema.md for the complete schema specification.

Quick Example

When presenting a multiple-choice question, instead of listing options as text:

Here's your first question:

```interactive
{
  "id": "q1",
  "card": {
    "body": [
      { "type": "TextBlock", "text": "What is the capital of France?", "weight": "bold" },
      { "type": "Input.ChoiceSet", "id": "answer", "style": "expanded",
        "choices": [
          { "title": "A. London", "value": "london" },
          { "title": "B. Paris", "value": "paris" },
          { "title": "C. Berlin", "value": "berlin" },
          { "title": "D. Madrid", "value": "madrid" }
        ]
      }
    ],
    "actions": [{ "type": "Action.Submit", "title": "Submit" }]
  }
}
```

Rules

  1. Every interactive block MUST have a unique id field
  2. Every interactive block MUST have at least one element in card.body
  3. Include an Action.Submit in card.actions so the user can submit their response
  4. Use "style": "expanded" for choice sets to show all options visually (recommended for quizzes)
  5. Use "style": "compact" for dropdown selects when there are many options
  6. Set "isMultiSelect": true on Input.ChoiceSet for multiple-choice questions
  7. The first TextBlock in the body is used as the question label in the submitted response
  8. You can include multiple interactive blocks in one message (e.g., a full quiz)
  9. Always wrap the JSON in a ```interactive code fence — never use ```json for interactive blocks
  10. Keep the JSON compact and valid — no comments, no trailing commas

Version History

  • e51fb6e Current 2026-08-20 12:03

Same Skill Collection

skills/add-feishu/SKILL.md
skills/claude-session-manager/SKILL.md
skills/codex-cli/SKILL.md
skills/codex-session-manager/SKILL.md
skills/cover-design/SKILL.md
skills/cover-image/SKILL.md
skills/diagram-to-image/SKILL.md
skills/fpl-copilot/SKILL.md
skills/nextjs-security-scan/SKILL.md
skills/personal-chinese-writing-style/SKILL.md
skills/promote-post/SKILL.md
skills/publish-substack-article/SKILL.md
skills/publish-x-article/SKILL.md
skills/publish-zsxq-article/SKILL.md
skills/python-security-scan/SKILL.md
skills/share-reading/SKILL.md
skills/slides-video/SKILL.md
skills/subtitle-correction/SKILL.md
skills/tweet-insight/SKILL.md
skills/video-planner/SKILL.md
skills/mining-session-skills/SKILL.md
skills/producing-video/SKILL.md

Metadata

Files
0
Version
e51fb6e
Hash
48f64f54
Indexed
2026-08-20 12:03

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 15:47
浙ICP备14020137号-1 $Carte des visiteurs$