Token导航 LogoToken导航

Agent Skill · 研究检索

slack-cli(Slack CLI 搜索)

用于处理 Slack 工作区里的频道、消息、线程、用户和通知信息。它适合让 Agent 查询团队沟通记录、整理上下文、回复线程或辅助协作提醒。使用时需要确认机器人或用户 token 是否具备目标频道访问权,私有频道和历史消息通常有额外权限限制;发送消息、@成员或批量读取对话时,应避免泄露内部讨论和敏感工作信息。

slack-cli 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 61,880。

总安装 346周安装 14GitHub Stars 3下载 109核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:slack-cli(Slack CLI 搜索)
来源仓库:https://github.com/michaelliv/dotskills
仓库路径:skills/slack-cli
安装命令:
npx skills add https://github.com/michaelliv/dotskills --skill slack-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/michaelliv/dotskills --skill slack-cli

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

封装 Slack CLI 工具调用能力,便于在终端环境中执行命令式操作。适合批量管理频道、用户或进行快速查询的研究型任务。通过 GitHub 安装,兼容 Codex、Claude、Cursor 和 Gemini CLI。依赖本地安装的 Slack CLI 工具及有效登录会话。

执行敏感操作前建议二次确认,防止误删或修改关键配置。

来源仓库内路径:skills/slack-cli

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/michaelliv/dotskills --skill slack-cli;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

slack-cli 怎么安装?

在终端执行 npx skills add https://github.com/michaelliv/dotskills --skill slack-cli。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

slack-cli 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

slack-cli 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

slack-cli 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

slack-cli 用的人多吗?

公开数据是累计安装 346 次,近一周安装 14 次,下载 109 次,GitHub 3 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

slack-cli 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
slack-cli

Slack CLI 搜索 · 本页

3463接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Slack CLI

Interact with Slack workspaces from the command line using slack-cli and direct Slack API calls.

Assume slack-cli is already installed and configured. If the slack command is not found or returns not_inited, refer to references/INSTALLATION.md for setup instructions.

When to Use

  • User wants to send, update, or delete Slack messages
  • User wants to read channel history or search messages
  • User wants to list channels, users, or conversations
  • User wants to upload files to Slack
  • User wants to manage reminders, snooze, or presence
  • User wants to automate Slack workflows

Setup

If slack is not available or not configured, see references/INSTALLATION.md for full setup instructions.

The token is stored at the path configured in the slack binary's etcdir variable (typically /opt/homebrew/etc/slack-cli/.slack on macOS). You can also use the SLACK_CLI_TOKEN environment variable.

Credential Management with psst

Store the Slack token in the global psst vault:

psst --global set SLACK_CLI_TOKEN --tag slack

For built-in commands, inject the token via psst:

psst --global SLACK_CLI_TOKEN -- slack chat send 'Hello!' '#channel'

For direct API calls, use inline psst get:

curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" "https://slack.com/api/..."

Built-in Commands

The slack CLI supports these commands natively:

Chat

# Send a message
slack chat send 'Hello world!' '#channel'

# Send with rich formatting
slack chat send --text 'text' --channel '#channel' --color good --title 'Title' --pretext 'Pretext'

# Pipe content as a message
echo "some output" | slack chat send --channel '#channel'

# Update a message (requires timestamp and channel)
slack chat update 'Updated text' 1405894322.002768 '#channel'

# Delete a message
slack chat delete 1405894322.002768 '#channel'

# Chain: send, capture ts+channel, then update
slack chat send 'hello' '#general' --filter '.ts + "\n" + .channel' | \
  xargs -n2 slack chat update 'goodbye'

Files

# Upload a file
slack file upload README.md '#channel'

# Upload with metadata
slack file upload README.md '#channel' --comment 'See attached' --title 'README'

# Create a Slack post from markdown
slack file upload --file post.md --filetype post --title 'Post Title' --channels '#channel'

# List files
slack file list
slack file list --filter '[.files[] | {id, name, size}]'

# File info / delete
slack file info F2147483862
slack file delete F2147483862

Reminders

# Add a reminder
slack reminder add 'lunch' $(date -v +30M "+%s")

# List / complete / delete
slack reminder list
slack reminder complete Rm7MGABKT6
slack reminder delete Rm7MGABKT6

Snooze (Do Not Disturb)

slack snooze start 60          # Start snooze for 60 minutes
slack snooze info              # Check your snooze status
slack snooze end               # End snooze

Presence

slack presence active
slack presence away

Global Options

All commands support:

  • --filter|-f <jq-filter> — Apply a jq filter to the JSON response
  • --compact|-cp — Compact JSON output
  • --monochrome|-m — No color in jq output
  • --trace|-x — Enable bash trace for debugging

Known Limitations

  • DMs via built-in CLI don't work reliably. slack chat send 'msg' '@user' often fails with channel_not_found. Use the direct API pattern below instead.
  • Messages sent via chat:write appear as the Slack App, not as your user. This is a Slack API limitation — even with a user token, the app identity is used.

Direct API Calls

The slack CLI doesn't cover all Slack API methods. For anything beyond the built-in commands, call the Slack API directly using curl. Read the token from the CLI's config file.

Sending Direct Messages

The built-in slack chat send doesn't handle DMs well. Use the API directly:

# Step 1: Open (or find) the DM channel with a user
DM_CHANNEL=$(curl -s -X POST \
  -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  -H "Content-Type: application/json" \
  -d '{"users":"USER_ID"}' \
  "https://slack.com/api/conversations.open" | jq -r '.channel.id')

# Step 2: Send the message
curl -s -X POST \
  -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  -H "Content-Type: application/json" \
  -d "{\"channel\":\"${DM_CHANNEL}\",\"text\":\"Hello!\"}" \
  "https://slack.com/api/chat.postMessage"
Requires im:write scope. Without it, conversations.open will fail. If you don't have im:write, you can work around it by finding an existing DM channel: ``bash DM_CHANNEL=$(curl -s \ -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \ "https://slack.com/api/conversations.list?types=im&limit=200" | \ jq -r '.channels[] | select(.user == "USER_ID") | .id') ``

List Channels

curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/conversations.list?types=public_channel,private_channel&limit=200" | \
  jq '[.channels[] | {name, id, is_private}]'

Read Channel History

# Get recent messages from a channel (use channel ID)
curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/conversations.history?channel=CHANNEL_ID&limit=20" | \
  jq '[.messages[] | {user, text, ts}]'

# Get messages from last 7 days
OLDEST=$(date -v -7d +%s)
curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/conversations.history?channel=CHANNEL_ID&oldest=${OLDEST}&limit=100" | \
  jq '[.messages[] | {user, text, ts}]'

# Get messages within a specific date range (oldest and latest are unix timestamps)
curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/conversations.history?channel=CHANNEL_ID&oldest=${START_TS}&latest=${END_TS}&limit=100" | \
  jq '[.messages[] | {user, text, ts}]'

List Users

curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/users.list" | \
  jq '[.members[] | {name, id, real_name}]'

# Resolve multiple user IDs (no batch endpoint — fetch all and filter)
curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/users.list" | \
  jq '[.members[] | select(.id == "U1234" or .id == "U5678") | {id, name: .real_name}]'

Workspace Info

# Use auth.test (not team.info — team.info requires a scope we don't have)
curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/auth.test" | \
  jq '{team, team_id, url}'

Search Messages

curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/search.messages?query=keyword&count=10" | \
  jq '[.messages.matches[] | {channel: .channel.name, text, ts}]'

Reactions

# Add a reaction
curl -s -X POST \
  -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  -H "Content-Type: application/json" \
  -d '{"channel":"CHANNEL_ID","timestamp":"1234567890.123456","name":"thumbsup"}' \
  "https://slack.com/api/reactions.add"

# Get reactions on a message
curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/reactions.get?channel=CHANNEL_ID&timestamp=1234567890.123456"

Thread Replies

# Get replies in a thread (use the parent message ts)
curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  "https://slack.com/api/conversations.replies?channel=CHANNEL_ID&ts=1234567890.123456" | \
  jq '[.messages[] | {user, text, ts}]'

Post to a Thread

curl -s -X POST \
  -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" \
  -H "Content-Type: application/json" \
  -d '{"channel":"CHANNEL_ID","text":"reply text","thread_ts":"1234567890.123456"}' \
  "https://slack.com/api/chat.postMessage"

Tips

  • Channel arguments accept #name format for built-in commands, but direct API calls require channel IDs (e.g. CHANNEL_ID)
  • Use --filter with any built-in command to extract specific fields via jq
  • Pipe commands together using --filter '.ts + "\n" +.channel' to chain send/update/delete
  • For direct API calls, always quote the URL to prevent shell glob expansion
  • Pagination: most list endpoints support cursor and limit parameters — check response_metadata.next_cursor in the response
  • To look up a user ID by name: curl -s -H "Authorization: Bearer $(psst --global get SLACK_CLI_TOKEN)" "https://slack.com/api/users.list" | jq -r '.members[] | select(.real_name | test("Name"; "i")) | {name, id, real_name}'
  • Message permalinks: https://<workspace>.slack.com/archives/<channel_id>/p<ts_without_dot> — remove the dot from the message timestamp (e.g. ts 1769935497.539749 becomes p1769935497539749)

平台分布

Codex

36.96%
按下载量换算40

Claude

29.16%
按下载量换算32

Cursor

20.57%
按下载量换算22

Gemini CLI

10.08%
按下载量换算11

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills