Agent SkillsChatCut-Inc/agent-plugin › widget-forms

widget-forms

GitHub

将ChatCut结构化表单语义映射至Codex和Claude Code插件宿主,支持文本、选择、音频预览及显式同意等字段类型转换。

codex/skills/widget-forms/SKILL.md ChatCut-Inc/agent-plugin

Trigger Scenarios

需要跨平台适配ChatCut表单结构 在Codex或Claude Code中收集用户输入

Install

npx skills add ChatCut-Inc/agent-plugin --skill widget-forms -g -y
More Options

Non-standard path

npx skills add https://github.com/ChatCut-Inc/agent-plugin/tree/main/codex/skills/widget-forms -g -y

Use without installing

npx skills use ChatCut-Inc/agent-plugin@widget-forms

指定 Agent (Claude Code)

npx skills add ChatCut-Inc/agent-plugin --skill widget-forms -a claude-code -g -y

安装 repo 全部 skill

npx skills add ChatCut-Inc/agent-plugin --all -g -y

预览 repo 内 skill

npx skills add ChatCut-Inc/agent-plugin --list

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.

Semantic contract mapping

This adapter owns how plugin hosts implement a caller's host-neutral form contract. It does not decide which fields the workflow requires.

Map semantic field types as follows:

  • short_text: one text input.
  • explicit_consent: one explicit, initially unselected confirmation control using the caller's full localized copy. An attachment or another submitted field is never consent.
  • audio_reference: plugin forms cannot record or upload media. Render the other fields, ask the user to attach the audio to the conversation, then load asset-import. Return the imported ChatCut audio assetId to the calling workflow; never return a local path, attachment URL, or raw bytes as an asset id.
  • playable_single_choice: one choice surface with stable option values, localized labels, and playable media when the host supports it. Keep the value-to-label map in context when a host returns the visible label.
  • playable_preview: one display-only, non-submitting audio surface using the exact caller-provided runtime media URL. Use only a host-supported safe media renderer; never emit raw <audio> HTML or expose the URL as ordinary prose.

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.

Map playable_single_choice to one single field with variant:"voice". Use each stable value as the option id and keep its localized label, description, and audioUrl tied to the same caller-provided item. An action without playable media has no audioUrl.

Do not call ask_followup_questions solely to display a playable_preview, because a passive preview is not a question. Use Codex's supported audio attachment/media rendering when available. If this host session has no safe runtime-URL audio renderer, say that the preview is available in the ChatCut project assets and continue with the caller's separate branch decision; do not print HTML, a bare URL, or a fake widget tag.

Map explicit_consent to a single-select field containing only one confirmation option. Use the caller's full confirmation copy as its label and do not preselect it. Because the card does not enforce required fields, verify every required answer after submission before continuing.

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.

Map explicit_consent to an unchecked checkbox using the caller's complete localized copy. Do not add a file chooser for audio_reference; request the conversation attachment outside the form and load asset-import after the user sends it.

For playable_single_choice, resolve bundled media keys through ${CLAUDE_PLUGIN_ROOT}/assets/widget-media/manifest.json; use a label-only card when a key is absent and never embed or process the original source URL. Keep the stable value in the label-to-id map rather than exposing it as the DOM audio key. Runtime media URLs are not in the bundled manifest: do not embed them in Elicitation HTML. Present them through the host's normal safe link/audio surface, then use a label-only confirmation control.

Version History

  • f9bc5c9 Current 2026-08-19 13:01
  • e1867a8 2026-08-02 23:37

    重构为Host Adapter模式,简化Codex与Claude Code的实现逻辑,移除冗余的MCP-App渲染说明,统一表单设计规则。

  • 5e9afe0 2026-07-22 10:59

Same Skill Collection

chatcut/skills/asset-import/SKILL.md
chatcut/skills/chatcut-plugin-basics-claude/SKILL.md
chatcut/skills/chatcut-plugin-basics/SKILL.md
chatcut/skills/create-motion-graphics/SKILL.md
chatcut/skills/export/SKILL.md
chatcut/skills/image-gen/SKILL.md
chatcut/skills/known-errors/SKILL.md
chatcut/skills/music/SKILL.md
chatcut/skills/shader-gen/SKILL.md
chatcut/skills/transcription/SKILL.md
chatcut/skills/verification/SKILL.md
chatcut/skills/video-gen/SKILL.md
chatcut/skills/voice/SKILL.md
chatcut/skills/widget-forms/SKILL.md
claude/skills/asset-import/SKILL.md
claude/skills/create-motion-graphics/SKILL.md
claude/skills/export/SKILL.md
claude/skills/image-gen/SKILL.md
claude/skills/known-errors/SKILL.md
claude/skills/motion-graphic-gen/SKILL.md
claude/skills/music/SKILL.md
claude/skills/shader-gen/SKILL.md
claude/skills/transcription/SKILL.md
claude/skills/verification/SKILL.md
claude/skills/video-gen/SKILL.md
claude/skills/widget-forms/SKILL.md
codex/skills/asset-import/SKILL.md
codex/skills/create-motion-graphics/SKILL.md
codex/skills/export/SKILL.md
codex/skills/image-gen/SKILL.md
codex/skills/known-errors/SKILL.md
codex/skills/music/SKILL.md
codex/skills/shader-gen/SKILL.md
codex/skills/transcription/SKILL.md
codex/skills/verification/SKILL.md
codex/skills/video-gen/SKILL.md
chatcut/skills/product-help/SKILL.md
chatcut/skills/talking-head-guide/SKILL.md
claude/skills/chatcut-plugin-basics-claude/SKILL.md
claude/skills/multicam-sync/SKILL.md
claude/skills/product-help/SKILL.md
claude/skills/talking-head-guide/SKILL.md
claude/skills/voice/SKILL.md
codex/skills/chatcut-plugin-basics/SKILL.md
codex/skills/multicam-sync/SKILL.md
codex/skills/product-help/SKILL.md
codex/skills/talking-head-guide/SKILL.md
codex/skills/voice/SKILL.md

Metadata

Files
0
Version
f9bc5c9
Hash
6f6af8b4
Indexed
2026-07-22 10:59

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