widget-forms
GitHub指导Agent在不同插件宿主中通过结构化表单收集用户输入。区分Codex使用MCP工具,Claude Code使用原生可视化组件,确保跨平台兼容性与交互一致性。
Trigger Scenarios
Install
npx skills add ChatCut-Inc/agent-plugin --skill widget-forms -g -y
SKILL.md
Frontmatter
{
"name": "widget-forms",
"description": "Ask for structured ChatCut input using the current plugin host's supported form surface."
}
Widget Forms Host Adapter
The canonical agent's raw <widget>, <choices/>, and <visual-option> tags render only inside ChatCut. Never emit those tags from the published Codex or Claude Code plugin.
Codex
Call the ChatCut MCP tool ask_followup_questions. Put related fields into one form, write visible text in the user's language, and stop after the call until the submitted answer appears in chat. Use the current tool schema for field and option shapes.
Do not add media-upload fields. Ask for missing source media separately and then use asset-import.
Claude Code
Follow the structured-input recipe in chatcut-plugin-basics-claude: use one visualize.show_widget Elicitation form, submit only through .elicit-submit, and wait for the user to send the filled prompt. Never call ChatCut's ask_followup_questions in Claude Code because that host does not render its MCP-App result.
Version History
-
e1867a8
Current 2026-08-02 23:37
重构为Host Adapter模式,简化Codex与Claude Code的实现逻辑,移除冗余的MCP-App渲染说明,统一表单设计规则。
- 5e9afe0 2026-07-22 10:59


