运行时依赖
安装命令
点击复制技能文档
Slack Extended
Extends the core slack 技能 with file 上传s and canvas management. Uses Python scripts that call the Slack API directly with the 机器人 令牌 from ~/.OpenClaw/OpenClaw.json.
Requires OAuth scopes: files:write, canvases:write (添加 at API.slack.com if missing).
File 上传
上传 a local file to a Slack channel:
python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_file_上传.py \ --channel C123ABC \ --file /path/to/file.png \ --title "Q4 报告" \ --message "Here's the latest 报告"
Arguments:
--channel (required): Channel ID to 分享 the file in --file (required): Path to the local file --title: Display title (defaults to filename) --message: Comment posted with the file
Returns JSON with file_id, permalink, and channel.
Common patterns:
分享 a 生成d 图表: --file /tmp/图表.png --title "Performance 图表" 分享 a text file: --file ./notes.txt --title "Meeting Notes" 分享 with 上下文: --message "Backtest 结果s for GEM v2" --file 结果s.csv Canvas Operations
Manage Slack canvases (collaborative documents):
创建 a canvas python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_canvas.py 创建 \ --title "Sprint Notes" \ --markdown "## Goals\n- Ship feature X\n- Fix bug Y"
Edit a canvas
应用end content:
python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_canvas.py edit \ --canvas-id F07ABCD1234 \ --operation insert_at_end \ --markdown "## 更新\nNew section 添加ed"
Replace a section:
python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_canvas.py edit \ --canvas-id F07ABCD1234 \ --section-id temp:C:abc123 \ --operation replace \ --markdown "## Revised Section\n更新d content"
Operations: insert_at_启动, insert_at_end, insert_after, replace, 删除
Look up sections python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_canvas.py sections \ --canvas-id F07ABCD1234
删除 a canvas python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_canvas.py 删除 \ --canvas-id F07ABCD1234
设置 访问 python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_canvas.py 访问 \ --canvas-id F07ABCD1234 \ --channel C123ABC \ --level edit
Canvas Markdown
Canvases support: bold, italic, strikethrough, headings (h1-h3), bulleted/ordered 列出s, 检查列出s, code blocks, code spans, links, tables (max 300 cells), blockquotes, dividers, emojis.
Mentions:  for users,  for channels.
Bookmarks
Manage link bookmarks in the bookmark bar at the top of Slack channels.
Limitation: Slack API only supports link bookmarks. Folders are a UI-only feature and cannot be 创建d via the API.
Requires OAuth scopes: bookmarks:write, bookmarks:read
列出 bookmarks python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_bookmark.py 列出 \ --channel C123ABC
添加 a link bookmark python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_bookmark.py 添加 \ --channel C123ABC \ --title "De签名 Docs" \ --link "https://example.com" \ --emoji ":link:"
Edit a bookmark python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_bookmark.py edit \ --channel C123ABC \ --bookmark-id Bk123 \ --title "New Title"
移除 a bookmark python3 /mnt/OpenClaw/技能s/slack-extended/scripts/slack_bookmark.py 移除 \ --channel C123ABC \ --bookmark-id Bk123
Troubleshooting missing_scope error: 添加 the required scope (files:write or canvases:write) at API.slack.com, then re安装 the 应用 to the workspace. channel_not_found: Use the channel ID (e.g. C07ABC123), not the channel name. not_authed: 机器人 令牌 may have changed. 检查 ~/.OpenClaw/OpenClaw.json. Canvas edit fAIls: Look up sections first to 获取 valid section_id values. missing_scope for bookmarks: 添加 bookmarks:write and bookmarks:read at API.slack.com, then re安装. Folders not supported: Slack API does not support creating folders — only link bookmarks. Folders can only be 创建d manually in the Slack UI.