🦀 ClawHub
LINE Rich Messages
by @shingo0620
Comprehensive guide for LINE Rich UI features (Flex Messages, buttons, quick replies, and markdown auto-conversion). Use this skill to provide a professional...
TERMINAL
clawhub install line-rich-messages📖 About This Skill
name: line-rich-messages description: Comprehensive guide for LINE Rich UI features (Flex Messages, buttons, quick replies, and markdown auto-conversion). Use this skill to provide a professional, low-friction experience for LINE users, prioritizing interactive elements over manual text input. metadata: { "openclaw": { "requires": { "plugins": ["line"] }, }, }
LINE Rich Messages
This skill transforms the agent from a text-only bot into a professional LINE assistant with native UI capabilities.
Core Principle: Rich-UI 優先 (Low-Friction)
Typing on mobile is slow and error-prone. Always prioritize Rich UI elements to minimize the user's need to reply with text.Quick Navigation
Detailed guides for each feature:1. decision-matrix.md: Choose the best UI element for your scenario. 2. directives.md: Syntax for interactive cards and bubbles. 3. flex-templates.md: Raw JSON Templates for 100% reliable UI creation. 4. markdown-to-flex.md: Auto-美化 tables and code blocks.
Best Practices
[[quick_replies: ...]].[[confirm: ...]] for actions like "Delete Memory" or "Cancel Project".Security / Scope (Important)
Credentials / Setup Clarification
LINE_CHANNEL_ACCESS_TOKEN / LINE_CHANNEL_SECRET.🏆 終極解決方案:手工 Raw Flex (The Golden Path)
若系統標籤轉換失敗,請使用 手工構建 JSON。這是最穩定且能 100% 呈現自定義 UI 的方式。
穩定發送按鈕的 JSON 模板
將此 JSON 作為純文字發送,若系統支援自動偵測則會轉換;若不支援,請改走 OpenClaw 的 LINE plugin 正規發送路徑(或由管理員在已授權的環境中操作),避免在 skill 內容中引導直接curl 呼叫外部 API。{
"type": "bubble",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{ "type": "text", "text": "標題", "weight": "bold", "size": "lg" },
{ "type": "text", "text": "內文描述", "wrap": true },
{
"type": "button",
"style": "primary",
"color": "#1DB446",
"action": {
"type": "message",
"label": "按鈕文字",
"text": "回傳指令"
}
}
]
}
}
📋 Tips & Best Practices
[[quick_replies: ...]].[[confirm: ...]] for actions like "Delete Memory" or "Cancel Project".