一键导入
slack
Read Slack messages, threads, channels, users, and files via CLI. Use when asked to view Slack URLs, search Slack, look up users, or work with Slack files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Read Slack messages, threads, channels, users, and files via CLI. Use when asked to view Slack URLs, search Slack, look up users, or work with Slack files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | slack |
| description | Read Slack messages, threads, channels, users, and files via CLI. Use when asked to view Slack URLs, search Slack, look up users, or work with Slack files. |
| allowed-tools | Bash(slack-cli:*) |
A CLI for reading Slack content, searching messages, browsing users, and working with files.
If slack-cli is not on PATH, install it:
brew install --cask lox/tap/slack-cli
Or: go install github.com/lox/slack-cli@latest
See https://github.com/lox/slack-cli for setup instructions (Slack app creation and OAuth).
slack-cli view <url> # View any Slack URL (message, thread, or channel)
slack-cli search <query> # Search messages
slack-cli channel list # List channels you're a member of
slack-cli channel read # Read recent messages from a channel name, ID, or URL
slack-cli channel info # Show channel information by name, ID, or URL
slack-cli file list # List recent files
slack-cli file info # Show file metadata
slack-cli file download # Download a file by ID
slack-cli file upload # Upload and share a file
slack-cli file delete # Delete a file by ID
slack-cli thread read # Read a thread by URL or channel+timestamp (supports --markdown)
slack-cli user list # List users in the workspace
slack-cli user info # Show user information
slack-cli auth login # Authenticate with Slack via OAuth
slack-cli auth status # Show authentication status
slack-cli view "https://workspace.slack.com/archives/C123/p1234567890" --markdown
slack-cli search "from:@username keyword"
slack-cli search "in:#channel-name keyword"
slack-cli channel read "#general" --limit 50
slack-cli channel read "https://workspace.slack.com/archives/C123" --markdown
slack-cli file upload "#general" ./report.txt
slack-cli file upload @alice ./report.txt --comment "latest version"
search supports calendar filters: --after, --before, and --on.
channel read and thread read also support rolling windows with --last.
Dates are interpreted in UTC and accept unambiguous calendar-day formats such
as YYYY-MM-DD, YYYY/MM/DD, 18 Apr 2026, and Apr 18 2026. Timestamps,
partial dates, and other inputs with times are rejected.
slack-cli search "deploy" --after 2026-04-01 --before 2026-04-30
slack-cli search "incident" --on "Apr 18 2026"
slack-cli channel read "#general" --last 2w
slack-cli thread read "$URL" --on "18 Apr 2026" --json
These commands support --json (pretty array or object) and --jsonl (one
record per line): search, channel read, channel list, channel info,
file list, file info, thread read, user list, user info.
Message records emit a full normalized shape for machines: ts,
thread_ts (when Slack provides it), type, subtype (when set, e.g.
bot_message, channel_join, channel_archive, huddle_thread),
user, user_id, text (resolver-formatted), text_raw, channel,
workspace, permalink, reply_count, and files when those fields are
available. When Slack channel metadata is available, channel.type is one
of channel, private_channel, im, or mpim.
slack-cli search "deploy" --limit 20 --jsonl | jq -c 'select(.channel.type == "channel")'
slack-cli channel read "#general" --limit 50 --json
slack-cli file list --limit 20 --jsonl
slack-cli thread read "$URL" --json
slack-cli channel list --json
slack-cli user list --json
slack-cli channel info C123 --json
To see available subcommands and flags, run --help on any command:
slack-cli --help
slack-cli view --help
slack-cli search --help
--markdown with view, thread read, or channel read when you need structured terminal outputfile upload accepts channel names, conversation IDs, @username, or U123--json / --jsonl for agent consumption; --jsonl pipes cleanly into jq -cthread_ts parameter are automatically detected# prefixchannel_not_found and multiple workspaces are configured, retry with --workspace <workspace>