slack-cli-read
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseslack-cli-read
slack-cli-read
Use this skill to read Slack content via the global command.
slack通过全局命令使用此技能读取Slack内容。
slackScope
适用范围
- Read-only commands are supported.
- Writing/sending/replying is not implemented yet. If asked to write, state that it is not available yet and offer to draft message text only.
- 支持只读命令。
- 暂未实现写入/发送/回复功能。如果被要求执行写入操作,请告知该功能暂不可用,并仅提供草拟消息文本的服务。
Environment
环境要求
- Assume is available as a global command.
slack - Slack credentials are expected at .
~/.config/slack/slack.env - Required variables:
SLACK_WORKSPACETOKEND_COOKIE
- If auth fails or env vars are missing, help the user populate that file.
- 假设已作为全局命令可用。
slack - Slack凭证需存放在路径下。
~/.config/slack/slack.env - 必填变量:
SLACK_WORKSPACETOKEND_COOKIE
- 如果认证失败或缺少环境变量,协助用户填充该文件。
Command Map
命令映射
- Login bootstrap (interactive):
slack auth login <workspace> - Auth diagnostics:
slack auth status - Verify auth/workspace:
slack me - List all conversations:
slack chat list - List unread conversations:
slack chat list --unread - List DM inbox:
slack dm list - List unread DMs:
slack dm list --unread - Read chat history:
slack chat history "<chat>" --limit 30 - Read DM history:
slack dm history <user_or_dm_id> --limit 30 - Read full thread:
slack thread show <chat_or_dm> <thread_ts> - Read one full message:
slack chat message <chat_or_dm> <ts> - Search users:
slack users list --query <text> - Raw API call (expert mode):
slack api call <endpoint> -p key=value - Raw API curl wrapper (expert mode):
slack api curl <endpoint> -- [curl args]
- 登录引导(交互式):
slack auth login <workspace> - 认证诊断:
slack auth status - 验证认证/工作区:
slack me - 列出所有对话:
slack chat list - 列出未读对话:
slack chat list --unread - 列出私信收件箱:
slack dm list - 列出未读私信:
slack dm list --unread - 查看聊天历史:
slack chat history "<chat>" --limit 30 - 查看私信历史:
slack dm history <user_or_dm_id> --limit 30 - 查看完整线程:
slack thread show <chat_or_dm> <thread_ts> - 查看单条完整消息:
slack chat message <chat_or_dm> <ts> - 搜索用户:
slack users list --query <text> - 原始API调用(专家模式):
slack api call <endpoint> -p key=value - 原始API curl包装器(专家模式):
slack api curl <endpoint> -- [curl args]
Working Style
工作流程
- Start broad with or
chat listwhen intent is vague.dm list - Narrow into history with a bounded .
--limit - Expand parent threads via when inline replies are truncated.
thread show - Fetch exact messages with when full text is needed.
chat message
- 当意图不明确时,先使用或
chat list进行大范围查询。dm list - 通过设置参数缩小范围查看历史记录。
--limit - 当内嵌回复被截断时,使用展开父线程。
thread show - 当需要完整文本时,使用获取特定消息。
chat message
Command Hygiene
命令规范
- Quote names starting with in shell commands, for example:
#.slack chat history "#general" - Prefer IDs when names are ambiguous.
- Keep commands bounded with unless the user asks for more.
--limit - Use pretty output for human reading.
- Use or
--format jsonfor structured parsing.--format jsonl - Use /
slack api callonly when typed commands do not cover the needed endpoint behavior.slack api curl - If auth fails, run before retrying read commands.
slack auth status
- 在shell命令中,对以开头的名称添加引号,例如:
#。slack chat history "#general" - 当名称存在歧义时,优先使用ID。
- 除非用户要求更多内容,否则使用限制命令返回结果。
--limit - 为方便人类阅读,使用美观的输出格式。
- 使用或
--format json进行结构化解析。--format jsonl - 仅当现有命令无法满足所需端点行为时,才使用/
slack api call。slack api curl - 如果认证失败,在重试读取命令前先运行。
slack auth status
Response Guidance
响应指引
- Summarize key findings instead of dumping raw command output.
- Keep timestamps and IDs in results when they help the user drill down.
- Treat attachment lines () as message context.
📎 ...
- 总结关键发现,而非直接输出原始命令结果。
- 当时间戳和ID有助于用户深入查询时,保留在结果中。
- 将附件行()视为消息上下文。
📎 ...