slack-notifications by oimiragieo/agent-studio
npx skills add https://github.com/oimiragieo/agent-studio --skill slack-notificationsMode: Cognitive/Prompt-Driven — 无独立实用脚本;通过代理上下文使用。
此技能提供 Slack API 操作,采用渐进式披露以优化上下文使用。
上下文节省:约减少 90%
chat:write - 发送消息channels:read - 列出频道channels:history - 读取频道历史记录广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
users:read - 列出用户files:write - 上传文件reactions:write - 添加反应SLACK_BOT_TOKEN 环境变量此技能提供 5 个类别共 14 个工具:
| 类别 | 工具 | 需要确认 |
|---|---|---|
| 消息 | post-message, post-thread, update-message, delete-message | 是(全部) |
| 频道 | list-channels, get-channel, channel-history | 否 |
| 用户 | list-users, get-user, user-presence | 否 |
| 文件 | upload-file, list-files | 是(仅上传) |
| 反应 | add-reaction, get-reactions | 否 |
# 向频道发送消息
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel": "C1234567890", "text": "Hello from Claude!"}'
# 列出频道
curl -X GET "https://slack.com/api/conversations.list" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
# 上传文件
curl -X POST https://slack.com/api/files.upload \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-F "channels=C1234567890" \
-F "file=@report.pdf" \
-F "title=Weekly Report"
向 Slack 频道发送消息。
参数:
channel(必需):频道 ID 或名称(例如 "C1234567890" 或 "#general")text(必需):消息文本(支持 Slack markdown)thread_ts(可选):用于线程化的父消息时间戳blocks(可选):富消息块(JSON 数组)示例:
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"text": "Deployment successful!",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Deployment Status*\n:white_check_mark: Production deployed successfully"
}
}
]
}'
在主题中回复消息。
参数:
channel(必需):频道 IDthread_ts(必需):父消息时间戳text(必需):回复文本示例:
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"thread_ts": "1234567890.123456",
"text": "Thread reply here"
}'
更新现有消息。
参数:
channel(必需):频道 IDts(必需):消息时间戳text(必需):新消息文本示例:
curl -X POST https://slack.com/api/chat.update \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"ts": "1234567890.123456",
"text": "Updated message"
}'
删除消息。
参数:
channel(必需):频道 IDts(必需):消息时间戳示例:
curl -X POST https://slack.com/api/chat.delete \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"ts": "1234567890.123456"
}'
列出工作区中的所有频道。
参数:
types(可选):逗号分隔的频道类型(默认:"public_channel")
limit(可选):返回的最大频道数(默认:100)示例:
curl -X GET "https://slack.com/api/conversations.list?types=public_channel,private_channel" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
获取频道信息。
参数:
channel(必需):频道 ID示例:
curl -X GET "https://slack.com/api/conversations.info?channel=C1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
获取频道消息历史记录。
参数:
channel(必需):频道 IDlimit(可选):返回的最大消息数(默认:100)oldest(可选):时间范围的开始(Unix 时间戳)latest(可选):时间范围的结束(Unix 时间戳)示例:
curl -X GET "https://slack.com/api/conversations.history?channel=C1234567890&limit=50" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
安全注意事项:频道历史记录可能包含敏感信息。请谨慎使用。
列出工作区中的所有用户。
参数:
limit(可选):返回的最大用户数(默认:100)示例:
curl -X GET "https://slack.com/api/users.list" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
获取用户个人资料信息。
参数:
user(必需):用户 ID示例:
curl -X GET "https://slack.com/api/users.info?user=U1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
获取用户在线状态。
参数:
user(必需):用户 ID示例:
curl -X GET "https://slack.com/api/users.getPresence?user=U1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
上传文件到 Slack 频道。
参数:
channels(必需):逗号分隔的频道 IDfile(必需):要上传的文件路径title(可选):文件标题initial_comment(可选):消息文本示例:
curl -X POST https://slack.com/api/files.upload \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-F "channels=C1234567890" \
-F "file=@C:\reports\weekly.pdf" \
-F "title=Weekly Report" \
-F "initial_comment=Here is this week's report"
列出频道中的文件。
参数:
channel(可选):用于筛选的频道 IDuser(可选):用于筛选的用户 IDcount(可选):返回的最大文件数(默认:100)示例:
curl -X GET "https://slack.com/api/files.list?channel=C1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
向消息添加表情符号反应。
参数:
channel(必需):频道 IDtimestamp(必需):消息时间戳name(必需):表情符号名称(不带冒号,例如 "thumbsup")示例:
curl -X POST https://slack.com/api/reactions.add \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"timestamp": "1234567890.123456",
"name": "thumbsup"
}'
获取消息上的反应。
参数:
channel(必需):频道 IDtimestamp(必需):消息时间戳示例:
curl -X GET "https://slack.com/api/reactions.get?channel=C1234567890×tamp=1234567890.123456" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
# 通知频道部署成功
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "#deployments",
"text": ":rocket: Production deployment completed",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Production Deployment*\n:white_check_mark: v1.2.3 deployed successfully\n*Duration:* 5m 23s"
}
}
]
}'
# 向值班团队发出事件警报
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "#incidents",
"text": "<!channel> :rotating_light: High severity incident detected",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Incident INC-1234*\n:rotating_light: *Severity:* P1\n*Service:* API Gateway\n*Status:* 503 errors increasing"
}
}
]
}'
# 发布测试结果
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "#qa",
"text": "Test suite completed",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Test Results*\n:white_check_mark: 245 passed\n:x: 3 failed\n:warning: 2 skipped"
}
}
]
}'
| 错误 | 原因 | 解决方案 |
|---|---|---|
not_authed | 缺少或无效的令牌 | 检查 SLACK_BOT_TOKEN 是否正确设置 |
channel_not_found | 无效的频道 ID | 使用 list-channels 验证频道 ID |
missing_scope | 机器人缺少所需权限 | 在 Slack 应用设置中添加范围 |
rate_limited | 请求过多 | 实现指数退避 |
message_not_found | 无效的时间戳 | 检查消息时间戳是否正确 |
对于速率限制错误,实现指数退避:
Slack API 速率限制:
按层级划分的方法:
chat.postMessage:层级 3(50/分钟)conversations.list:层级 2(20/分钟)users.list:层级 2(20/分钟)files.upload:层级 4(100/分钟)开始前: 阅读 .claude/context/memory/learnings.md
完成后:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.md假设中断:如果不在记忆中,则未发生。
每周安装数
116
仓库
GitHub 星标数
17
首次出现
2026年1月27日
安全审计
安装于
github-copilot114
codex113
gemini-cli113
cursor113
opencode113
kimi-cli112
Mode: Cognitive/Prompt-Driven — No standalone utility script; use via agent context.
This skill provides Slack API operations with progressive disclosure for optimal context usage.
Context Savings : ~90% reduction
chat:write - Send messageschannels:read - List channelschannels:history - Read channel historyusers:read - List usersfiles:write - Upload filesreactions:write - Add reactionsSLACK_BOT_TOKEN environment variableThe skill provides 14 tools across 5 categories:
| Category | Tools | Confirmation Required |
|---|---|---|
| Messaging | post-message, post-thread, update-message, delete-message | Yes (all) |
| Channels | list-channels, get-channel, channel-history | No |
| Users | list-users, get-user, user-presence | No |
| Files | upload-file, list-files | Yes (upload only) |
| Reactions | add-reaction, get-reactions | No |
# Post message to channel
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel": "C1234567890", "text": "Hello from Claude!"}'
# List channels
curl -X GET "https://slack.com/api/conversations.list" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
# Upload file
curl -X POST https://slack.com/api/files.upload \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-F "channels=C1234567890" \
-F "file=@report.pdf" \
-F "title=Weekly Report"
Send a message to a Slack channel.
Parameters :
channel (required): Channel ID or name (e.g., "C1234567890" or "#general")text (required): Message text (supports Slack markdown)thread_ts (optional): Parent message timestamp for threadingblocks (optional): Rich message blocks (JSON array)Example :
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"text": "Deployment successful!",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Deployment Status*\n:white_check_mark: Production deployed successfully"
}
}
]
}'
Reply to a message in a thread.
Parameters :
channel (required): Channel IDthread_ts (required): Parent message timestamptext (required): Reply textExample :
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"thread_ts": "1234567890.123456",
"text": "Thread reply here"
}'
Update an existing message.
Parameters :
channel (required): Channel IDts (required): Message timestamptext (required): New message textExample :
curl -X POST https://slack.com/api/chat.update \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"ts": "1234567890.123456",
"text": "Updated message"
}'
Delete a message.
Parameters :
channel (required): Channel IDts (required): Message timestampExample :
curl -X POST https://slack.com/api/chat.delete \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"ts": "1234567890.123456"
}'
List all channels in workspace.
Parameters :
types (optional): Comma-separated channel types (default: "public_channel")
limit (optional): Max channels to return (default: 100)Example :
curl -X GET "https://slack.com/api/conversations.list?types=public_channel,private_channel" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
Get channel information.
Parameters :
channel (required): Channel IDExample :
curl -X GET "https://slack.com/api/conversations.info?channel=C1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
Get channel message history.
Parameters :
channel (required): Channel IDlimit (optional): Max messages to return (default: 100)oldest (optional): Start of time range (Unix timestamp)latest (optional): End of time range (Unix timestamp)Example :
curl -X GET "https://slack.com/api/conversations.history?channel=C1234567890&limit=50" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
Security Note : Channel history may contain sensitive information. Use with caution.
List all users in workspace.
Parameters :
limit (optional): Max users to return (default: 100)Example :
curl -X GET "https://slack.com/api/users.list" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
Get user profile information.
Parameters :
user (required): User IDExample :
curl -X GET "https://slack.com/api/users.info?user=U1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
Get user online status.
Parameters :
user (required): User IDExample :
curl -X GET "https://slack.com/api/users.getPresence?user=U1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
Upload a file to Slack channel.
Parameters :
channels (required): Comma-separated channel IDsfile (required): File path to uploadtitle (optional): File titleinitial_comment (optional): Message textExample :
curl -X POST https://slack.com/api/files.upload \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-F "channels=C1234567890" \
-F "file=@C:\reports\weekly.pdf" \
-F "title=Weekly Report" \
-F "initial_comment=Here is this week's report"
List files in channel.
Parameters :
channel (optional): Channel ID to filter byuser (optional): User ID to filter bycount (optional): Max files to return (default: 100)Example :
curl -X GET "https://slack.com/api/files.list?channel=C1234567890" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
Add emoji reaction to a message.
Parameters :
channel (required): Channel IDtimestamp (required): Message timestampname (required): Emoji name (without colons, e.g., "thumbsup")Example :
curl -X POST https://slack.com/api/reactions.add \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "C1234567890",
"timestamp": "1234567890.123456",
"name": "thumbsup"
}'
Get reactions on a message.
Parameters :
channel (required): Channel IDtimestamp (required): Message timestampExample :
curl -X GET "https://slack.com/api/reactions.get?channel=C1234567890×tamp=1234567890.123456" \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
# Notify channel of successful deployment
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "#deployments",
"text": ":rocket: Production deployment completed",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Production Deployment*\n:white_check_mark: v1.2.3 deployed successfully\n*Duration:* 5m 23s"
}
}
]
}'
# Alert on-call team of incident
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "#incidents",
"text": "<!channel> :rotating_light: High severity incident detected",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Incident INC-1234*\n:rotating_light: *Severity:* P1\n*Service:* API Gateway\n*Status:* 503 errors increasing"
}
}
]
}'
# Post test results
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "#qa",
"text": "Test suite completed",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Test Results*\n:white_check_mark: 245 passed\n:x: 3 failed\n:warning: 2 skipped"
}
}
]
}'
| Error | Cause | Solution |
|---|---|---|
not_authed | Missing or invalid token | Check SLACK_BOT_TOKEN is set correctly |
channel_not_found | Invalid channel ID | Verify channel ID with list-channels |
missing_scope | Bot lacks required permission | Add scope in Slack App settings |
rate_limited | Too many requests |
For rate limiting errors, implement exponential backoff:
Slack API rate limits:
Methods by tier:
chat.postMessage: Tier 3 (50/min)conversations.list: Tier 2 (20/min)users.list: Tier 2 (20/min)files.upload: Tier 4 (100/min)Before starting: Read .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
Weekly Installs
116
Repository
GitHub Stars
17
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykFail
Installed on
github-copilot114
codex113
gemini-cli113
cursor113
opencode113
kimi-cli112
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
44,900 周安装
SwiftUI 视图重构指南:轻量级 MV 架构与最佳实践
1,100 周安装
韩语AI写作检测与校正器humanizer - 基于科学研究的自然语言优化工具
1,100 周安装
AntV 图表可视化技能 - 智能图表选择与数据可视化生成工具
1,100 周安装
Scrapling官方网络爬虫框架 - 自适应解析、绕过Cloudflare、Python爬虫库
1,100 周安装
Theme Factory - 专业字体色彩主题库,一键应用设计风格到演示文稿和作品
1,100 周安装
Base44 CLI 工具 - 创建和管理 Base44 应用项目 | 命令行开发工具
1,100 周安装
| Implement exponential backoff |
message_not_found | Invalid timestamp | Check message timestamp is correct |