作者:互联网 时间: 2026-08-09 15:45:01
从源直接安装技能的最快方式。
npx clawhub@latest install slack
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 slack。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Slack 动作技能提供了一套完整的工具,用于从 AI 智能体环境控制 Slack。通过使用配置好的机器人令牌,此技能使智能体能够执行广泛的任务,如发送、编辑和删除消息,以及管理消息反应和置顶项目。作为 Openclaw Skills 生态系统的核心部分,它允许在 Slack 频道和私信中进行复杂的自动化。
无论您需要监控最近的对话还是管理成员信息,此技能都提供了无缝协作所需的技术桥梁。它将复杂的 Slack API 简化为 AI 可以执行的可操作命令,从而保持团队同步并使工作区井然有序。
要部署此技能,请确保您的环境已配置必要的机器人凭据。此技能是 Clawdbot 的 Openclaw Skills 仓库的标准组件。
# 在环境变量中设置您的 Slack 机器人令牌
export SLACK_BOT_TOKEN='xoxb-your-bot-token'
请确保机器人在您的 Slack 应用配置中拥有所需的权限范围(chat:write, reactions:write, pins:write 等)。
该技能利用结构化输入模式来准确锁定特定消息和用户:
| 字段 | 描述 | 格式 |
|---|---|---|
channelId |
唯一的 Slack 频道 ID | 例如:C12345678 |
messageId |
特定消息的时间戳 | 例如:1712023032.1234 |
to |
消息的接收目标 | channel: |
content |
消息的正文文本 | 字符串 |
emoji |
用于反应的表情符号 | Unicode 或 :名称: |
limit |
要获取的消息数量 | 整数(默认:20) |
name: slack
description: Use when you need to control Slack from Clawdbot via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
Use slack to react, manage pins, send/edit/delete messages, and fetch member info. The tool uses the bot token configured for Clawdbot.
channelId and messageId (Slack message timestamp, e.g. 1712023032.1234).emoji (Unicode or :name:).to target (channel:<id> or user:<id>) and content.Message context lines include slack message id and channel fields you can reuse directly.
| Action group | Default | Notes |
|---|---|---|
| reactions | enabled | React + list reactions |
| messages | enabled | Read/send/edit/delete |
| pins | enabled | Pin/unpin/list |
| memberInfo | enabled | Member info |
| emojiList | enabled | Custom emoji list |
{
"action": "react",
"channelId": "C123",
"messageId": "1712023032.1234",
"emoji": "?"
}
{
"action": "reactions",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "sendMessage",
"to": "channel:C123",
"content": "Hello from Clawdbot"
}
{
"action": "editMessage",
"channelId": "C123",
"messageId": "1712023032.1234",
"content": "Updated text"
}
{
"action": "deleteMessage",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "readMessages",
"channelId": "C123",
"limit": 20
}
{
"action": "pinMessage",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "unpinMessage",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "listPins",
"channelId": "C123"
}
{
"action": "memberInfo",
"userId": "U123"
}
{
"action": "emojiList"
}