← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

slack-block-kit

在生成带有块的Slack API负载、带有结构化内容的chat.postMessage调用或views.open/views.publish调用时主动应用。触发于Block Kit、Slack块、段落块、动作块、标题块、分割线块、上下文块、表格块、Markdown块、富文本块、图片块、输入块、视频块、context_actions块、计划块、任务卡片块、Slack模态框、Slack应用程序主页、Slack界面、Slack交互元素、Slack按钮、Slack下拉菜单、Slack溢出菜单、Slack日期选择器、Slack复选框、Slack单选按钮、工作对象、Slack链接展开、chat.postMessage块、views.open、views.update、views.push、views.publish、Slack组合对象。当构建Block Kit负载、构造块数组、创建模态框或应用程序主页视图、添加交互元素、使用工作对象实现链接展开,或者设计富消息布局时使用。Slack Block Kit UI框架用于构建富消息布局、模态框和应用程序主页视图。

person作者: jakexiaohubgithub

Slack Block Kit

Construct the requested Slack layout or interaction using the receiving surface's schema. The user's explicit instructions take precedence over this skill's guidelines.

Establish the surface

Use the requested content, interaction, target Slack method/surface, and any existing payload as input. Infer the surface from code when possible; ask if a missing choice changes the payload. Ordinary text replies do not require blocks.

| Work | Reference | |---|---| | Message, modal, App Home, or interaction lifecycle | SURFACES.md | | Block choice, fields, limits, surface compatibility | BLOCKS.md | | Buttons, inputs, menus, pickers | ELEMENTS.md | | Text objects, options, confirmation dialogs | COMPOSITION.md | | Structured rich-text nesting and inline elements | RICH-TEXT.md | | start/append/stop streaming, chunks, SDK differences | STREAMING.md | | Entity unfurls, flexpanes, edits, comments | WORK-OBJECTS.md | | Compact block/element/limit lookup | CHEATSHEET.md |

Load only the relevant reference or section. Payload construction does not require a Slack connection. Use the separately installed slack-mrkdwn skill for detailed text-formatting questions when available; the composition and rich-text references here cover the required object shapes independently.

Preserve the payload contract

  • Choose text syntax per field: mrkdwn uses *bold* and <url|label>; plain_text is literal; markdown blocks use standard Markdown; rich_text uses structured elements.
  • Check surface compatibility: for example, alerts are modal-only and message payloads have different limits from modal/Home views.
  • Keep top-level fallback text semantically aligned with blocks when provided. Screen readers and mobile notifications can depend on it.
  • Escape untrusted text for its receiving field. Preserve supplied IDs and URLs; do not fabricate real channel, user, trigger, or entity identifiers.
  • A modal needs a live trigger and interaction handling; a static preview does not prove the lifecycle works. Follow the current method/SDK contract when streaming schemas disagree.

Deliver valid JSON or integration code for the requested surface, with necessary fallback text and any unresolved runtime inputs. Verify payload structure and relevant limits; test live delivery only when requested or already authorized. Creating a payload does not itself authorize posting it.

Use the Slack Block Kit reference and the exact Web API method/SDK schema for current fields and limits that the bundled reference does not establish.