💬 Slk — Slack个人工具
v0.1.7通过slk CLI读取、发送、搜索和管理Slack消息和私信。当用户要求检查Slack、阅读频道或私信、发送Slack消息、搜索Slack、检查未读、管理草稿、查看已保存项目或与Slack工作区交互时使用。也用于Slack心跳检查。在'check slack'、'any slack messages'、'send on slack'、'slack unreads'、'search slack'、'slack threads'、'draft on slack'、'read slack dms'、'message on slack'时触发。
详细分析 ▾
运行时依赖
版本
- 向技能清单添加了user-invocable属性。- 将metadata字段provider从'moltbot'更新为'openclaw'。
安装命令
点击复制技能文档
Session-based Slack CLI for macOS. Auto-authenticates from the Slack desktop app — no tokens, no OAuth, no app installs. Acts as your user (xoxc- session tokens).
Commands
# Auth slk auth # Test authentication, show user/team# Read slk channels # List channels (alias: ch) slk dms # List DM conversations with IDs (alias: dm) slk read [count] # Read recent messages, default 20 (alias: r) slk read @username [count] # Read DMs by username slk read --threads # Auto-expand all threads slk read --from 2026-02-01 # Date range filter slk thread [count] # Read thread replies, default 50 (alias: t) slk search [count] # Search messages across workspace slk users # List workspace users (alias: u)
# Activity slk activity # All channels with unread/mention counts (alias: a) slk unread # Only unreads, excludes muted (alias: ur) slk starred # VIP users + starred items (alias: star) slk saved [count] [--all] # Saved for later items (alias: sv) slk pins # Pinned items in a channel (alias: pin)
# Write slk send # Send a message (alias: s) slk react # React to a message
# Drafts (synced to Slack editor UI) slk draft # Draft a channel message slk draft thread # Draft a thread reply slk draft user # Draft a DM slk drafts # List active drafts slk draft drop # Delete a draft
Channel accepts name (general), ID (C08A8AQ2AFP), @username for DMs, or user ID (U07RQTFCLUC).
Auth
Automatic — extracts session token from Slack desktop app's LevelDB + decrypts cookie from macOS Keychain.
第一个 run: macOS 将 show Keychain 对话框 asking 到 allow access 到 "Slack Safe Storage":
- Allow — one-时间 access, prompted again 下一个 时间
- Always Allow — permanent, 否 future prompts (convenient 但是 任何 process running 作为 用户 可以 extract credentials silently)
- Deny — blocks access, slk cannot 认证
令牌 缓存: ~/.local/slk/令牌-缓存.json — auto-validated, auto-refreshed 在...上 invalid_auth.
If auth fails (token rotated, Slack logged out):
rm ~/.local/slk/token-cache.json
slk auth
Slack desktop app must be installed and logged in. Does not need to be running if token is cached.
Reading Threads
Threads require a Slack timestamp. Use --ts to get it, then read the thread:
slk read general 10 --ts # Output: [1/30/2026, 11:41 AM ts:1769753479.788949] User [3 replies]: ...
slk thread general 1769753479.788949
Agent Workflow Examples
- Heartbeat/cron unread check —
slk unread→slk 读取对于 channels 需要 attention - 保存 & pick up — Human saves threads 在...中 Slack ("保存 对于 later"). Agent runs
slk saved期间 heartbeat, reads 满 threads 带有slk thread, summarizes 或 extracts action items - Daily channel digest —
slk 读取 100穿过 键 channels → compile decisions, 打开 questions, action items →slk 发送 daily-digest "📋 ..." - Weekly DM summary —
slk 读取 @boss 200 --从 2026-02-01 --threads→ extract action items, decisions, context - Thread monitoring — Watch specific threads 对于 新的 replies (incidents, PR reviews, decisions)
- Draft 对于 human review —
slk draft "..."posts 到 Slack's editor UI 对于 human 到 review 之前 sending - 搜索-driven context —
slk 搜索 "deployment process"或slk pins到 拉取 context 之前 answering questions
Limitations
- macOS 仅 — uses Keychain + Electron storage paths
- 会话-based — acts 作为 用户, 不 bot. mindful 的 什么 您 发送
- Draft drop 可能 失败 带有
draft_has_conflict如果 Slack 有 conversation 打开 - 会话 令牌 expires 在...上 登出 — keep Slack app running 或 rely 在...上 cached 令牌
Missing Features & Issues
Create PR or Report Issue at: https://github.com/therohitdas/slkcli