dsh-slack: DSH Community Plugin for Bidirectional Communication Between Agents and Slack

Preface

In the DSH (DeepSeek Harness) community, “everything is a plugin” means agents can integrate with external systems through plugins. For developers who need to sync agent output to Slack, or have agents read Slack messages and reply within threads, several specific issues typically arise: how to configure Slack tokens, how to enumerate channels, how to queue Socket Mode messages, and how thread replies carry the ts field.

dsh-slack is a DSH community plugin designed to enable bidirectional communication between agents and Slack. Below, we introduce this plugin in terms of functionality, installation, configuration, and considerations.

What Is This

dsh-slack is positioned to enable bidirectional communication between agents and Slack.

The repository identifier is STARDUSTLC666/dsh-slack, licensed under MIT. It provides four Slack tools:

  • slack_notify
  • slack_channels
  • slack_inbox
  • slack_reply

As noted in verified facts, Socket Mode is used to achieve bidirectional communication; RTM, interactive components (buttons/modals/slash command replies) are not supported. The plugin was validated on @deepseek-ai/dsh@0.1.1-rc.2 (2026-08-26).

Core Features

slack_notify: Sends a Markdown text message to a specified channel or thread and returns the message ts. This ts can be referenced later for thread replies.

slack_channels: Lists the channels currently visible to the bot and automatically paginates through next_cursor to fetch the full list.

slack_inbox: Reads messages received via Socket Mode. Messages are stored in an in-process memory queue with a maximum capacity of 200 messages, supporting deduplication and atomic consumption via markRead.

slack_reply: Replies to a specific inbox message in the form of a thread reply.

Additionally, the plugin caches and reuses the WebClient based on token + slackApiUrl, automatically rebuilding it when configuration changes. Token configuration supports environment variable fallback:

  • DSH_SLACK_TOKEN
  • DSH_SLACK_APP_TOKEN

Installation and Activation

First, set the tokens, then install the plugin, and finally restart the dsh web service.

1. Set Environment Variables

If you want to avoid hardcoding tokens in the configuration file, you can set them in the environment before starting dsh:

export DSH_SLACK_TOKEN=xoxb-your-bot-token
export DSH_SLACK_APP_TOKEN=xapp-your-app-level-token

These two environment variables correspond to the Slack bot token and the App-Level Token, respectively.

2. Install the Plugin

Use the following command to install the plugin into the web profile:

dsh plugin --profile web add dsh-slack

3. Restart dsh Web Service

After installation, restart the dsh web service so the Slack tools provided by the plugin can be invoked by agents.

4. Overriding with Profile Configuration

You can also append a configuration block with id: slack in the profile’s cordis.patch.yml to override config.token, config.appToken, and config.defaultChannel. Example:

- id: slack
  config:
    token: 'xoxb-your-bot-token'
    appToken: 'xapp-your-app-level-token'
    defaultChannel: '#general'

Here, defaultChannel does not replace the required channel parameter; it only serves as descriptive text written into the channel parameter description.

Typical Usage

A common workflow is to first configure the tokens, then install the plugin, and finally restart the dsh web service.

export DSH_SLACK_TOKEN=xoxb-your-bot-token
export DSH_SLACK_APP_TOKEN=xapp-your-app-level-token

Then install:

dsh plugin --profile web add dsh-slack

After installation, restart the dsh web service.

When invoking Slack tools, keep the following in mind:

  • channel is a required parameter.
  • defaultChannel is only written as descriptive text into the channel parameter description and does not replace the required channel.
  • If token is missing, the plugin still loads; calling the send-message, list-channels, or reply tools will return an error message in Chinese.
  • If appToken is missing, only a warning is generated; slack_inbox returns an empty queue without affecting other tools.

Applicable Scenarios and Considerations

Suitable for the following scenarios:

  • The agent needs to send Markdown notifications to a specified Slack channel or thread.
  • The agent needs to list channels visible to the bot.
  • The agent needs to read Slack messages received via Socket Mode.
  • The agent needs to reply to a specific Slack message in a thread.

Before use, note the following:

  • The plugin runs with the permissions of the current dsh process. It is recommended to review the source code and license before installation.
  • slack_inbox uses an in-process memory queue with a maximum capacity of 200 messages; when full, the oldest messages are discarded.
  • After restarting the dsh web service, the memory queue is cleared and messages are not persisted.
  • RTM is not supported.
  • Interactive components, including buttons, modals, and slash command replies, are not supported.
  • Runtime dependencies include @slack/web-api and @slack/socket-mode.
  • Peer dependencies are @deepseek-ai/cordis and @deepseek-ai/dsh-tools.
  • The verified environment is @deepseek-ai/dsh@0.1.1-rc.2, with a validation date of 2026-08-26.

Getting It

dsh-slack can be found at:

  • Directory page: https://www.skillhub.cn/plugins/STARDUSTLC666/dsh-slack
  • GitHub: https://github.com/STARDUSTLC666/dsh-slack

It encapsulates Slack notifications, channel listing, message inbox, and thread replies as DSH plugin capabilities, making it suitable for scenarios where bidirectional Slack communication needs to be integrated into agent workflows. The DSH community directory is an independent site with no official affiliation to DeepSeek / High-Flyer.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye