block-kit
它能做什么
它教 AI 智能体把 Slack 回复排版为原生 Block Kit 布局,例如分区、表格和按钮。它适合希望 Slack 回答清晰、便于执行的人。
适用场景
- ✓Slack 回复需要按钮,以便你批准或选择选项的时候。
- ✓回答是报告、对比或计划,用分区或表格阅读更方便的时候。
- ✓回复只是简短的答复或闲聊的时候,技能会保留为纯文本。
技能链接
https://github.com/openclaw/openclaw/blob/main/extensions/slack/skills/block-kit/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在 Slack 中给团队发一份本周销售摘要,用表格展示,并附一个可打开完整报告的按钮。”
每周 5 个新技能,1 分钟读完。
工作原理
技能判断丰富的布局是否有帮助,然后通过 Slack 消息工具以结构化的形式发送回复。它还附有纯文本的备用版本,即使布局无法显示,意思也能保留。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Slack Block Kit
Make useful Slack replies feel native. When structure or one-click follow-up improves the outcome, send a rich message without waiting for the user to ask for Block Kit.
Choose the surface
Use a presentation when the reply has at least one of these shapes:
- a decision, confirmation, or next action that belongs on buttons or a select
- a status, comparison, report, or plan that scans better as titled sections, a table, or a chart
- important context that should be visually separated from the primary result
Use plain text for short answers and casual conversation where structure adds no value.
Send the result
For a reply in Slack, call the message tool with action: "send" and a portable presentation. The Slack plugin renders it as native Block Kit. Use the exact schema exposed by the current tool; supported block types can include text, context, divider, buttons, select, chart, and table.
- Put the outcome first. Keep titles, labels, and context concise.
- Give interactive controls real follow-up semantics. Use typed
callbackactions for conversational choices andurlfor an external destination. Do not use genericcommandactions for Slack controls; Slack renders them as text fallback rather than clickable controls. - Include a useful
messagefallback that preserves the meaning without the rich layout. - After the visible send succeeds, do not repeat the same content in the final response.
A control is complete only when its value is self-contained enough for the next agent turn to understand and act on. When an interaction returns, acknowledge the choice visibly and continue the requested workflow.
Native Block Kit authoring
When the user is building a Slack app or explicitly requests raw Block Kit JSON, read the adapted official Block Kit guide in full. For common message, modal, and App Home layouts, also read the official patterns.
Follow the adapted guide's live-documentation and blocks.validate workflow for native JSON. Do not pass native Slack blocks to OpenClaw's presentation field; the plugin owns that conversion.
常见问题
Slack 中的按钮真的能用吗?
按钮需要恰当的后续动作,例如输入的回调或网页链接,才能点击并发挥作用。
如果丰富的布局无法显示怎么办?
技能包含纯文本备用版本,保持相同的意思。
每条回复都使用布局吗?
不会。简短回答和闲聊消息仍然保持为纯文本。
详情
作者的原始描述
Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.
repo: openclaw/openclaw
热度
- GitHub 星标
- 394k
- 排名
- #36
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
discord-user-post
394k让你的智能体通过 Discord 桌面应用,以你的身份发送你已批准的消息,并在发送前确认具体频道。
discrawl
394k让你的智能体搜索和总结本地保存的 Discord 消息档案,查看档案的新旧程度,并阅读私信。
gitcrawl
394k让你的智能体搜索已保存的 GitHub 议题和拉取请求档案,将重复内容归类,并在 GitHub 上核实它们的当前状态。
graincrawl
394k让你的智能体搜索已保存的 Granola 会议记录和转写稿,查看它们的新旧程度,并统计某段时间内的数量。