Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

slack-notificationsSlack notifications 开发

Agent Skill

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

总安装

5,924

周安装

242

GitHub Stars

25

下载量

1,917
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill slack-notifications

简介

实现基于事件驱动的 Slack 通知推送机制。

  • 适用于监控系统告警、任务完成提醒或审批流程触发等场景。
  • 通过 GitHub 安装,支持自定义通知模板与路由规则。
  • 必须精确控制通知粒度,防止信息过载干扰用户。slack-notifications 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 建议设置静默时段与优先级分级策略提升可用性。

SKILL.md

Mode: Cognitive/Prompt-Driven — No standalone utility script; use via agent context.

Slack Notifications Skill

Overview

This skill provides Slack API operations with progressive disclosure for optimal context usage.

Context Savings: ~90% reduction

  • MCP Mode: ~15,000 tokens always loaded (30+ tools)
  • Skill Mode: ~500 tokens metadata + on-demand loading

Requirements

  • SLACK_BOT_TOKEN environment variable (required)
  • SLACK_SIGNING_SECRET environment variable (optional, for event verification)
  • SLACK_APP_TOKEN environment variable (optional, for Socket Mode)

Setting up Slack Bot Token

  1. Create a Slack App at https://api.slack.com/apps
  2. Navigate to "OAuth & Permissions"
  3. Add required bot token scopes:

- chat:write - Send messages - channels:read - List channels - channels:history - Read channel history - users:read - List users - files:write - Upload files - reactions:write - Add reactions

  1. Install app to workspace
  2. Copy "Bot User OAuth Token" to SLACK_BOT_TOKEN environment variable

Tools

The skill provides 14 tools across 5 categories:

CategoryToolsConfirmation Required
Messagingpost-message, post-thread, update-message, delete-messageYes (all)
Channelslist-channels, get-channel, channel-historyNo
Userslist-users, get-user, user-presenceNo
Filesupload-file, list-filesYes (upload only)
Reactionsadd-reaction, get-reactionsNo

Quick Reference

# 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"

Tool Details

Messaging Tools (Confirmation Required)

post-message

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 threading
  • blocks (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"
        }
      }
    ]
  }'

post-thread

Reply to a message in a thread.

Parameters:

  • channel (required): Channel ID
  • thread_ts (required): Parent message timestamp
  • text (required): Reply text

Example:

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-message

Update an existing message.

Parameters:

  • channel (required): Channel ID
  • ts (required): Message timestamp
  • text (required): New message text

Example:

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-message

Delete a message.

Parameters:

  • channel (required): Channel ID
  • ts (required): Message timestamp

Example:

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"
  }'

Channel Tools

list-channels

List all channels in workspace.

Parameters:

  • types (optional): Comma-separated channel types (default: "public_channel")

- Options: "public_channel", "private_channel", "mpim", "im"

  • 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

Get channel information.

Parameters:

  • channel (required): Channel ID

Example:

curl -X GET "https://slack.com/api/conversations.info?channel=C1234567890" \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN"

channel-history

Get channel message history.

Parameters:

  • channel (required): Channel ID
  • limit (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.

User Tools

list-users

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

Get user profile information.

Parameters:

  • user (required): User ID

Example:

curl -X GET "https://slack.com/api/users.info?user=U1234567890" \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN"

user-presence

Get user online status.

Parameters:

  • user (required): User ID

Example:

curl -X GET "https://slack.com/api/users.getPresence?user=U1234567890" \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN"

File Tools

upload-file (Confirmation Required)

Upload a file to Slack channel.

Parameters:

  • channels (required): Comma-separated channel IDs
  • file (required): File path to upload
  • title (optional): File title
  • initial_comment (optional): Message text

Example:

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

List files in channel.

Parameters:

  • channel (optional): Channel ID to filter by
  • user (optional): User ID to filter by
  • count (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"

Reaction Tools

add-reaction

Add emoji reaction to a message.

Parameters:

  • channel (required): Channel ID
  • timestamp (required): Message timestamp
  • name (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

Get reactions on a message.

Parameters:

  • channel (required): Channel ID
  • timestamp (required): Message timestamp

Example:

curl -X GET "https://slack.com/api/reactions.get?channel=C1234567890&timestamp=1234567890.123456" \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN"

Agent Integration

Primary Agents

  • devops: Infrastructure alerts, deployment notifications, monitoring
  • incident-responder: Incident alerts, status updates, escalations

Secondary Agents

  • pm: Sprint notifications, milestone updates, team announcements
  • developer: Build notifications, PR alerts, test results
  • qa: Test failure alerts, quality reports
  • security-architect: Security alerts, vulnerability notifications

Common Use Cases

Deployment Notifications

# 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"
        }
      }
    ]
  }'

Incident Alerts

# 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"
        }
      }
    ]
  }'

Test Results

# 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"
        }
      }
    ]
  }'

Security Considerations

Token Security

  • NEVER expose bot token in logs or error messages
  • Store token in environment variable, not in code
  • Use least-privilege scopes for bot token
  • Rotate tokens periodically

Message Security

  • All message operations require confirmation
  • Channel history may contain sensitive information (PII, credentials, etc.)
  • Validate channel permissions before posting
  • Use private channels for sensitive communications

Data Privacy

  • Comply with workspace data retention policies
  • Avoid posting PII or credentials in messages
  • Use Slack's data export features for compliance
  • Respect user privacy and online status

Error Handling

Common Errors

ErrorCauseSolution
not_authedMissing or invalid tokenCheck SLACK_BOT_TOKEN is set correctly
channel_not_foundInvalid channel IDVerify channel ID with list-channels
missing_scopeBot lacks required permissionAdd scope in Slack App settings
rate_limitedToo many requestsImplement exponential backoff
message_not_foundInvalid timestampCheck message timestamp is correct

Retry Strategy

For rate limiting errors, implement exponential backoff:

  1. Wait 1 second, retry
  2. Wait 2 seconds, retry
  3. Wait 4 seconds, retry
  4. Wait 8 seconds, retry
  5. Give up after 5 attempts

Rate Limits

Slack API rate limits:

  • Tier 1: 1 request per second
  • Tier 2: 20 requests per minute
  • Tier 3: 50 requests per minute
  • Tier 4: 100 requests per minute

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)

Related

Memory Protocol (MANDATORY)

Before starting: Read .claude/context/memory/learnings.md

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.52%
按下载量换算700

Claude

27.87%
按下载量换算534

Cursor

19.67%
按下载量换算377

Gemini CLI

9.46%
按下载量换算181

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills