[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EM0TSE6A2RP9G92A17SCB6":3,"skill-same:01M6EM0TSE6A2RP9G92A17SCB6":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6EM0TSE6A2RP9G92A17SCB6","building-chat-widgets",null,"Build interactive AI chat widgets with buttons, forms, and bidirectional actions.\nUse when creating agentic UIs with clickable widgets, entity tagging (@mentions),\ncomposer tools, or server-handled widget actions. Covers full widget lifecycle.\nNOT when building simple text-only chat without interactive elements.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fasmayaseen\u002Fbuilding-chat-widgets\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"building chat widgets","widgets","chat","simple","composer","elements","full","widget","forms","build","agentic","only","use","interactive","text","lifecycle","Tools","actions","server","2026-11-10 10:12:30",false,"---\r\nname: building-chat-widgets\r\ndescription: |\r\n  Build interactive AI chat widgets with buttons, forms, and bidirectional actions.\r\n  Use when creating agentic UIs with clickable widgets, entity tagging (@mentions),\r\n  composer tools, or server-handled widget actions. Covers full widget lifecycle.\r\n  NOT when building simple text-only chat without interactive elements.\r\n---\r\n\r\n# Building Chat Widgets\r\n\r\nCreate interactive widgets for AI chat with actions and entity tagging.\r\n\r\n## Quick Start\r\n\r\n```typescript\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n\r\n  widgets: {\r\n    onAction: async (action, widgetItem) => {\r\n      if (action.type === \"view_details\") {\r\n        navigate(`\u002Fdetails\u002F${action.payload.id}`);\r\n      }\r\n    },\r\n  },\r\n});\r\n```\r\n\r\n---\r\n\r\n## Action Handler Types\r\n\r\n| Handler | Defined In | Processed By | Use Case |\r\n|---------|------------|--------------|----------|\r\n| `\"client\"` | Widget template | Frontend `onAction` | Navigation, local state |\r\n| `\"server\"` | Widget template | Backend `action()` | Data mutation, widget replacement |\r\n\r\n---\r\n\r\n## Widget Lifecycle\r\n\r\n```\r\n1. Agent tool generates widget → yield WidgetItem\r\n2. Widget renders in chat with action buttons\r\n3. User clicks action → action dispatched\r\n4. Handler processes action:\r\n   - client: onAction callback in frontend\r\n   - server: action() method in ChatKitServer\r\n5. Optional: Widget replaced with updated state\r\n```\r\n\r\n---\r\n\r\n## Core Patterns\r\n\r\n### 1. Widget Templates\r\n\r\nDefine reusable widget layouts with dynamic data:\r\n\r\n```json\r\n{\r\n  \"type\": \"ListView\",\r\n  \"children\": [\r\n    {\r\n      \"type\": \"ListViewItem\",\r\n      \"key\": \"item-1\",\r\n      \"onClickAction\": {\r\n        \"type\": \"item.select\",\r\n        \"handler\": \"client\",\r\n        \"payload\": { \"itemId\": \"item-1\" }\r\n      },\r\n      \"children\": [\r\n        {\r\n          \"type\": \"Row\",\r\n          \"gap\": 3,\r\n          \"children\": [\r\n            { \"type\": \"Icon\", \"name\": \"check\", \"color\": \"success\" },\r\n            { \"type\": \"Text\", \"value\": \"Item title\", \"weight\": \"semibold\" }\r\n          ]\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### 2. Client-Handled Actions\r\n\r\nActions that update local state, navigate, or send follow-up messages:\r\n\r\n**Widget Definition:**\r\n\r\n```json\r\n{\r\n  \"type\": \"Button\",\r\n  \"label\": \"View Article\",\r\n  \"onClickAction\": {\r\n    \"type\": \"open_article\",\r\n    \"handler\": \"client\",\r\n    \"payload\": { \"id\": \"article-123\" }\r\n  }\r\n}\r\n```\r\n\r\n**Frontend Handler:**\r\n\r\n```typescript\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n\r\n  widgets: {\r\n    onAction: async (action, widgetItem) => {\r\n      switch (action.type) {\r\n        case \"open_article\":\r\n          navigate(`\u002Farticle\u002F${action.payload?.id}`);\r\n          break;\r\n\r\n        case \"more_suggestions\":\r\n          await chatkit.sendUserMessage({ text: \"More suggestions, please\" });\r\n          break;\r\n\r\n        case \"select_option\":\r\n          setSelectedOption(action.payload?.optionId);\r\n          break;\r\n      }\r\n    },\r\n  },\r\n});\r\n```\r\n\r\n### 3. Server-Handled Actions\r\n\r\nActions that mutate data, update widgets, or require backend processing:\r\n\r\n**Widget Definition:**\r\n\r\n```json\r\n{\r\n  \"type\": \"ListViewItem\",\r\n  \"onClickAction\": {\r\n    \"type\": \"line.select\",\r\n    \"handler\": \"server\",\r\n    \"payload\": { \"id\": \"blue-line\" }\r\n  }\r\n}\r\n```\r\n\r\n**Backend Handler:**\r\n\r\n```python\r\nfrom chatkit.types import (\r\n    Action, WidgetItem, ThreadItemReplacedEvent,\r\n    ThreadItemDoneEvent, AssistantMessageItem, ClientEffectEvent,\r\n)\r\n\r\nclass MyServer(ChatKitServer[dict]):\r\n\r\n    async def action(\r\n        self,\r\n        thread: ThreadMetadata,\r\n        action: Action[str, Any],\r\n        sender: WidgetItem | None,\r\n        context: RequestContext,  # Note: Already RequestContext, not dict\r\n    ) -> AsyncIterator[ThreadStreamEvent]:\r\n\r\n        if action.type == \"line.select\":\r\n            line_id = action.payload[\"id\"]  # Use .payload, not .arguments\r\n\r\n            # 1. Update widget with selection\r\n            updated_widget = build_selector_widget(selected=line_id)\r\n            yield ThreadItemReplacedEvent(\r\n                item=sender.model_copy(update={\"widget\": updated_widget})\r\n            )\r\n\r\n            # 2. Stream assistant message\r\n            yield ThreadItemDoneEvent(\r\n                item=AssistantMessageItem(\r\n                    id=self.store.generate_item_id(\"msg\", thread, context),\r\n                    thread_id=thread.id,\r\n                    created_at=datetime.now(),\r\n                    content=[{\"text\": f\"Selected {line_id}\"}],\r\n                )\r\n            )\r\n\r\n            # 3. Trigger client effect\r\n            yield ClientEffectEvent(\r\n                name=\"selection_changed\",\r\n                data={\"lineId\": line_id},\r\n            )\r\n```\r\n\r\n### 4. Entity Tagging (@mentions)\r\n\r\nAllow users to @mention entities in messages:\r\n\r\n```typescript\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n\r\n  entities: {\r\n    onTagSearch: async (query: string): Promise\u003CEntity[]> => {\r\n      const results = await fetch(`\u002Fapi\u002Fsearch?q=${query}`).then(r => r.json());\r\n\r\n      return results.map((item) => ({\r\n        id: item.id,\r\n        title: item.name,\r\n        icon: item.type === \"person\" ? \"profile\" : \"document\",\r\n        group: item.type === \"People\" ? \"People\" : \"Articles\",\r\n        interactive: true,\r\n        data: { type: item.type, article_id: item.id },\r\n      }));\r\n    },\r\n\r\n    onClick: (entity: Entity) => {\r\n      if (entity.data?.article_id) {\r\n        navigate(`\u002Farticle\u002F${entity.data.article_id}`);\r\n      }\r\n    },\r\n  },\r\n});\r\n```\r\n\r\n### 5. Composer Tools (Mode Selection)\r\n\r\nLet users select different AI modes from the composer:\r\n\r\n```typescript\r\nconst TOOL_CHOICES = [\r\n  {\r\n    id: \"general\",\r\n    label: \"Chat\",\r\n    icon: \"sparkle\",\r\n    placeholderOverride: \"Ask anything...\",\r\n    pinned: true,\r\n  },\r\n  {\r\n    id: \"event_finder\",\r\n    label: \"Find Events\",\r\n    icon: \"calendar\",\r\n    placeholderOverride: \"What events are you looking for?\",\r\n    pinned: true,\r\n  },\r\n];\r\n\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n  composer: {\r\n    placeholder: \"What would you like to do?\",\r\n    tools: TOOL_CHOICES,\r\n  },\r\n});\r\n```\r\n\r\n**Backend Routing:**\r\n\r\n```python\r\nasync def respond(self, thread, item, context):\r\n    tool_choice = context.metadata.get(\"tool_choice\")\r\n\r\n    if tool_choice == \"event_finder\":\r\n        agent = self.event_finder_agent\r\n    else:\r\n        agent = self.general_agent\r\n\r\n    result = Runner.run_streamed(agent, input_items)\r\n    async for event in stream_agent_response(context, result):\r\n        yield event\r\n```\r\n\r\n---\r\n\r\n## Widget Component Reference\r\n\r\n### Layout Components\r\n\r\n| Component | Props | Description |\r\n|-----------|-------|-------------|\r\n| `ListView` | `children` | Scrollable list container |\r\n| `ListViewItem` | `key`, `onClickAction`, `children` | Clickable list item |\r\n| `Row` | `gap`, `align`, `justify`, `children` | Horizontal flex |\r\n| `Col` | `gap`, `padding`, `children` | Vertical flex |\r\n| `Box` | `size`, `radius`, `background`, `padding` | Styled container |\r\n\r\n### Content Components\r\n\r\n| Component | Props | Description |\r\n|-----------|-------|-------------|\r\n| `Text` | `value`, `size`, `weight`, `color` | Text display |\r\n| `Title` | `value`, `size`, `weight` | Heading text |\r\n| `Image` | `src`, `alt`, `width`, `height` | Image display |\r\n| `Icon` | `name`, `size`, `color` | Icon from set |\r\n\r\n### Interactive Components\r\n\r\n| Component | Props | Description |\r\n|-----------|-------|-------------|\r\n| `Button` | `label`, `variant`, `onClickAction` | Clickable button |\r\n\r\n---\r\n\r\n## Critical Implementation Details\r\n\r\n### Action Object Structure\r\n\r\n**IMPORTANT**: Use `action.payload`, NOT `action.arguments`:\r\n\r\n```python\r\n# WRONG - Will cause AttributeError\r\naction.arguments\r\n\r\n# CORRECT\r\naction.payload\r\n```\r\n\r\n### Context Parameter\r\n\r\nThe `context` parameter is `RequestContext`, not `dict`:\r\n\r\n```python\r\n# WRONG - Tries to wrap RequestContext\r\nrequest_context = RequestContext(metadata=context)\r\n\r\n# CORRECT - Use directly\r\nuser_id = context.user_id\r\n```\r\n\r\n### UserMessageItem Required Fields\r\n\r\nWhen creating synthetic user messages:\r\n\r\n```python\r\nfrom chatkit.types import UserMessageItem, UserMessageTextContent\r\n\r\n# Include ALL required fields\r\nsynthetic_message = UserMessageItem(\r\n    id=self.store.generate_item_id(\"message\", thread, context),\r\n    thread_id=thread.id,\r\n    created_at=datetime.now(),\r\n    content=[UserMessageTextContent(type=\"input_text\", text=message_text)],\r\n    inference_options={},\r\n)\r\n```\r\n\r\n---\r\n\r\n## Anti-Patterns\r\n\r\n1. **Mixing handlers** - Don't handle same action in both client and server\r\n2. **Missing payload** - Always include data in action payload\r\n3. **Using action.arguments** - Use `action.payload`\r\n4. **Wrapping RequestContext** - Context is already RequestContext\r\n5. **Missing UserMessageItem fields** - Include id, thread_id, created_at\r\n6. **Wrong content type** - Use `type=\"input_text\"` for user messages\r\n\r\n---\r\n\r\n## Verification\r\n\r\nRun: `python3 scripts\u002Fverify.py`\r\n\r\nExpected: `✓ building-chat-widgets skill ready`\r\n\r\n## If Verification Fails\r\n\r\n1. Check: references\u002F folder has widget-patterns.md\r\n2. **Stop and report** if still failing\r\n\r\n## References\r\n\r\n- [references\u002Fwidget-patterns.md](references\u002Fwidget-patterns.md) - Complete widget patterns\r\n- [references\u002Fserver-action-handler.md](references\u002Fserver-action-handler.md) - Backend action handling","# Building Chat Widgets\r\n\r\nCreate interactive widgets for AI chat with actions and entity tagging.\r\n\r\n## Quick Start\r\n\r\n```typescript\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n\r\n  widgets: {\r\n    onAction: async (action, widgetItem) => {\r\n      if (action.type === \"view_details\") {\r\n        navigate(`\u002Fdetails\u002F${action.payload.id}`);\r\n      }\r\n    },\r\n  },\r\n});\r\n```\r\n\r\n---\r\n\r\n## Action Handler Types\r\n\r\n| Handler | Defined In | Processed By | Use Case |\r\n|---------|------------|--------------|----------|\r\n| `\"client\"` | Widget template | Frontend `onAction` | Navigation, local state |\r\n| `\"server\"` | Widget template | Backend `action()` | Data mutation, widget replacement |\r\n\r\n---\r\n\r\n## Widget Lifecycle\r\n\r\n```\r\n1. Agent tool generates widget → yield WidgetItem\r\n2. Widget renders in chat with action buttons\r\n3. User clicks action → action dispatched\r\n4. Handler processes action:\r\n   - client: onAction callback in frontend\r\n   - server: action() method in ChatKitServer\r\n5. Optional: Widget replaced with updated state\r\n```\r\n\r\n---\r\n\r\n## Core Patterns\r\n\r\n### 1. Widget Templates\r\n\r\nDefine reusable widget layouts with dynamic data:\r\n\r\n```json\r\n{\r\n  \"type\": \"ListView\",\r\n  \"children\": [\r\n    {\r\n      \"type\": \"ListViewItem\",\r\n      \"key\": \"item-1\",\r\n      \"onClickAction\": {\r\n        \"type\": \"item.select\",\r\n        \"handler\": \"client\",\r\n        \"payload\": { \"itemId\": \"item-1\" }\r\n      },\r\n      \"children\": [\r\n        {\r\n          \"type\": \"Row\",\r\n          \"gap\": 3,\r\n          \"children\": [\r\n            { \"type\": \"Icon\", \"name\": \"check\", \"color\": \"success\" },\r\n            { \"type\": \"Text\", \"value\": \"Item title\", \"weight\": \"semibold\" }\r\n          ]\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### 2. Client-Handled Actions\r\n\r\nActions that update local state, navigate, or send follow-up messages:\r\n\r\n**Widget Definition:**\r\n\r\n```json\r\n{\r\n  \"type\": \"Button\",\r\n  \"label\": \"View Article\",\r\n  \"onClickAction\": {\r\n    \"type\": \"open_article\",\r\n    \"handler\": \"client\",\r\n    \"payload\": { \"id\": \"article-123\" }\r\n  }\r\n}\r\n```\r\n\r\n**Frontend Handler:**\r\n\r\n```typescript\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n\r\n  widgets: {\r\n    onAction: async (action, widgetItem) => {\r\n      switch (action.type) {\r\n        case \"open_article\":\r\n          navigate(`\u002Farticle\u002F${action.payload?.id}`);\r\n          break;\r\n\r\n        case \"more_suggestions\":\r\n          await chatkit.sendUserMessage({ text: \"More suggestions, please\" });\r\n          break;\r\n\r\n        case \"select_option\":\r\n          setSelectedOption(action.payload?.optionId);\r\n          break;\r\n      }\r\n    },\r\n  },\r\n});\r\n```\r\n\r\n### 3. Server-Handled Actions\r\n\r\nActions that mutate data, update widgets, or require backend processing:\r\n\r\n**Widget Definition:**\r\n\r\n```json\r\n{\r\n  \"type\": \"ListViewItem\",\r\n  \"onClickAction\": {\r\n    \"type\": \"line.select\",\r\n    \"handler\": \"server\",\r\n    \"payload\": { \"id\": \"blue-line\" }\r\n  }\r\n}\r\n```\r\n\r\n**Backend Handler:**\r\n\r\n```python\r\nfrom chatkit.types import (\r\n    Action, WidgetItem, ThreadItemReplacedEvent,\r\n    ThreadItemDoneEvent, AssistantMessageItem, ClientEffectEvent,\r\n)\r\n\r\nclass MyServer(ChatKitServer[dict]):\r\n\r\n    async def action(\r\n        self,\r\n        thread: ThreadMetadata,\r\n        action: Action[str, Any],\r\n        sender: WidgetItem | None,\r\n        context: RequestContext,  # Note: Already RequestContext, not dict\r\n    ) -> AsyncIterator[ThreadStreamEvent]:\r\n\r\n        if action.type == \"line.select\":\r\n            line_id = action.payload[\"id\"]  # Use .payload, not .arguments\r\n\r\n            # 1. Update widget with selection\r\n            updated_widget = build_selector_widget(selected=line_id)\r\n            yield ThreadItemReplacedEvent(\r\n                item=sender.model_copy(update={\"widget\": updated_widget})\r\n            )\r\n\r\n            # 2. Stream assistant message\r\n            yield ThreadItemDoneEvent(\r\n                item=AssistantMessageItem(\r\n                    id=self.store.generate_item_id(\"msg\", thread, context),\r\n                    thread_id=thread.id,\r\n                    created_at=datetime.now(),\r\n                    content=[{\"text\": f\"Selected {line_id}\"}],\r\n                )\r\n            )\r\n\r\n            # 3. Trigger client effect\r\n            yield ClientEffectEvent(\r\n                name=\"selection_changed\",\r\n                data={\"lineId\": line_id},\r\n            )\r\n```\r\n\r\n### 4. Entity Tagging (@mentions)\r\n\r\nAllow users to @mention entities in messages:\r\n\r\n```typescript\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n\r\n  entities: {\r\n    onTagSearch: async (query: string): Promise\u003CEntity[]> => {\r\n      const results = await fetch(`\u002Fapi\u002Fsearch?q=${query}`).then(r => r.json());\r\n\r\n      return results.map((item) => ({\r\n        id: item.id,\r\n        title: item.name,\r\n        icon: item.type === \"person\" ? \"profile\" : \"document\",\r\n        group: item.type === \"People\" ? \"People\" : \"Articles\",\r\n        interactive: true,\r\n        data: { type: item.type, article_id: item.id },\r\n      }));\r\n    },\r\n\r\n    onClick: (entity: Entity) => {\r\n      if (entity.data?.article_id) {\r\n        navigate(`\u002Farticle\u002F${entity.data.article_id}`);\r\n      }\r\n    },\r\n  },\r\n});\r\n```\r\n\r\n### 5. Composer Tools (Mode Selection)\r\n\r\nLet users select different AI modes from the composer:\r\n\r\n```typescript\r\nconst TOOL_CHOICES = [\r\n  {\r\n    id: \"general\",\r\n    label: \"Chat\",\r\n    icon: \"sparkle\",\r\n    placeholderOverride: \"Ask anything...\",\r\n    pinned: true,\r\n  },\r\n  {\r\n    id: \"event_finder\",\r\n    label: \"Find Events\",\r\n    icon: \"calendar\",\r\n    placeholderOverride: \"What events are you looking for?\",\r\n    pinned: true,\r\n  },\r\n];\r\n\r\nconst chatkit = useChatKit({\r\n  api: { url: API_URL, domainKey: DOMAIN_KEY },\r\n  composer: {\r\n    placeholder: \"What would you like to do?\",\r\n    tools: TOOL_CHOICES,\r\n  },\r\n});\r\n```\r\n\r\n**Backend Routing:**\r\n\r\n```python\r\nasync def respond(self, thread, item, context):\r\n    tool_choice = context.metadata.get(\"tool_choice\")\r\n\r\n    if tool_choice == \"event_finder\":\r\n        agent = self.event_finder_agent\r\n    else:\r\n        agent = self.general_agent\r\n\r\n    result = Runner.run_streamed(agent, input_items)\r\n    async for event in stream_agent_response(context, result):\r\n        yield event\r\n```\r\n\r\n---\r\n\r\n## Widget Component Reference\r\n\r\n### Layout Components\r\n\r\n| Component | Props | Description |\r\n|-----------|-------|-------------|\r\n| `ListView` | `children` | Scrollable list container |\r\n| `ListViewItem` | `key`, `onClickAction`, `children` | Clickable list item |\r\n| `Row` | `gap`, `align`, `justify`, `children` | Horizontal flex |\r\n| `Col` | `gap`, `padding`, `children` | Vertical flex |\r\n| `Box` | `size`, `radius`, `background`, `padding` | Styled container |\r\n\r\n### Content Components\r\n\r\n| Component | Props | Description |\r\n|-----------|-------|-------------|\r\n| `Text` | `value`, `size`, `weight`, `color` | Text display |\r\n| `Title` | `value`, `size`, `weight` | Heading text |\r\n| `Image` | `src`, `alt`, `width`, `height` | Image display |\r\n| `Icon` | `name`, `size`, `color` | Icon from set |\r\n\r\n### Interactive Components\r\n\r\n| Component | Props | Description |\r\n|-----------|-------|-------------|\r\n| `Button` | `label`, `variant`, `onClickAction` | Clickable button |\r\n\r\n---\r\n\r\n## Critical Implementation Details\r\n\r\n### Action Object Structure\r\n\r\n**IMPORTANT**: Use `action.payload`, NOT `action.arguments`:\r\n\r\n```python\r\n# WRONG - Will cause AttributeError\r\naction.arguments\r\n\r\n# CORRECT\r\naction.payload\r\n```\r\n\r\n### Context Parameter\r\n\r\nThe `context` parameter is `RequestContext`, not `dict`:\r\n\r\n```python\r\n# WRONG - Tries to wrap RequestContext\r\nrequest_context = RequestContext(metadata=context)\r\n\r\n# CORRECT - Use directly\r\nuser_id = context.user_id\r\n```\r\n\r\n### UserMessageItem Required Fields\r\n\r\nWhen creating synthetic user messages:\r\n\r\n```python\r\nfrom chatkit.types import UserMessageItem, UserMessageTextContent\r\n\r\n# Include ALL required fields\r\nsynthetic_message = UserMessageItem(\r\n    id=self.store.generate_item_id(\"message\", thread, context),\r\n    thread_id=thread.id,\r\n    created_at=datetime.now(),\r\n    content=[UserMessageTextContent(type=\"input_text\", text=message_text)],\r\n    inference_options={},\r\n)\r\n```\r\n\r\n---\r\n\r\n## Anti-Patterns\r\n\r\n1. **Mixing handlers** - Don't handle same action in both client and server\r\n2. **Missing payload** - Always include data in action payload\r\n3. **Using action.arguments** - Use `action.payload`\r\n4. **Wrapping RequestContext** - Context is already RequestContext\r\n5. **Missing UserMessageItem fields** - Include id, thread_id, created_at\r\n6. **Wrong content type** - Use `type=\"input_text\"` for user messages\r\n\r\n---\r\n\r\n## Verification\r\n\r\nRun: `python3 scripts\u002Fverify.py`\r\n\r\nExpected: `✓ building-chat-widgets skill ready`\r\n\r\n## If Verification Fails\r\n\r\n1. Check: references\u002F folder has widget-patterns.md\r\n2. **Stop and report** if still failing\r\n\r\n## References\r\n\r\n- [references\u002Fwidget-patterns.md](references\u002Fwidget-patterns.md) - Complete widget patterns\r\n- [references\u002Fserver-action-handler.md](references\u002Fserver-action-handler.md) - Backend action handling",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fasmayaseen\u002Fbuilding-chat-widgets",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill building-chat-widgets",{"tool":58,"command":59},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill building-chat-widgets",{"tool":61,"command":62},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill building-chat-widgets","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fasmayaseen\u002Fbuilding-chat-widgets\u002FSKILL.md",true,[66,72,76,82],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fserver-action-handler.md","REFERENCE","参考文档",6669,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fasmayaseen\u002Fbuilding-chat-widgets\u002Freferences\u002Fserver-action-handler.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fwidget-patterns.md",6300,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fasmayaseen\u002Fbuilding-chat-widgets\u002Freferences\u002Fwidget-patterns.md",{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002Fverify.py","SCRIPT","脚本",640,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fasmayaseen\u002Fbuilding-chat-widgets\u002Fscripts\u002Fverify.py",{"path":83,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":84,"sourceHtmlUrl":85},"skill-report.json",9386,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fasmayaseen\u002Fbuilding-chat-widgets\u002Fskill-report.json",[87,96,105,114,120,126],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":38},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[93,94,95],"model","model hierarchy","model hierarchy skill",{"skillNo":97,"name":98,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":38},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[102,103,104],"MCP","zoom","zoom mcp",{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":38},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[111,112,113,103],"sdk","zoom apps sdk","apps",{"skillNo":115,"name":116,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":38},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[116],{"skillNo":121,"name":122,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[122],{"skillNo":127,"name":128,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":38},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[128]]