Skip to content
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ See [`mcps/README.md`](mcps/README.md) and [`automations/README.md`](automations
## Extensions Catalog

<!-- BEGIN AUTO-GENERATED CATALOG -->
This repository contains **2 marketplace(s)** with **48 extensions** (38 skills, 10 plugins).
This repository contains **2 marketplace(s)** with **49 extensions** (39 skills, 10 plugins).

### large-codebase

Expand All @@ -69,7 +69,7 @@ OpenHands skills for interacting, improving, and refactoring large codebases

Official skills and plugins for OpenHands — the open-source AI software engineer.

**44 extensions** (36 skills, 8 plugins)
**45 extensions** (37 skills, 8 plugins)

| Name | Type | Description | Commands |
|------|------|-------------|----------|
Expand Down Expand Up @@ -111,6 +111,7 @@ Official skills and plugins for OpenHands — the open-source AI software engine
| release-notes | plugin | Generate consistent, well-structured release notes from git history. Produces categorized changelog with breaking cha... | `/release-notes` |
| security | skill | Security best practices for secure coding, authentication, authorization, and data protection. Use when developing fe... | — |
| skill-creator | skill | Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an ex... | — |
| slack-channel-monitor | skill | Create a cron automation that polls up to 10 Slack channels every minute and starts an OpenHands conversation when a ... | — |
| ssh | skill | Establish and manage SSH connections to remote machines, including key generation, configuration, and file transfers.... | — |
| swift-linux | skill | Install and configure Swift programming language on Debian Linux for server-side development. Use when building Swift... | — |
| theme-factory | skill | Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc.... | — |
Expand Down
15 changes: 15 additions & 0 deletions marketplaces/openhands-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,21 @@
"create"
]
},
{
"name": "slack-channel-monitor",
"source": "./skills/slack-channel-monitor",
"description": "Create a cron automation that polls up to 10 Slack channels every minute and starts an OpenHands conversation when a configurable trigger phrase is detected. Forwards thread replies to running conversations and posts summaries back to Slack when the agent finishes.",
"category": "productivity",
"keywords": [
"slack",
"monitor",
"channel",
"trigger",
"cron",
"automation",
"integration"
]
},
{
"name": "ssh",
"source": "./skills/ssh",
Expand Down
1 change: 1 addition & 0 deletions skills/slack-channel-monitor/.claude-plugin
1 change: 1 addition & 0 deletions skills/slack-channel-monitor/.codex-plugin
21 changes: 21 additions & 0 deletions skills/slack-channel-monitor/.plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "slack-channel-monitor",
"version": "1.0.0",
"description": "Create a cron automation that polls up to 10 Slack channels every minute and starts an OpenHands conversation when a configurable trigger phrase is detected. Forwards thread replies to running conversations and posts summaries back to Slack when the agent finishes.",
"author": {
"name": "OpenHands",
"email": "contact@all-hands.dev"
},
"homepage": "https://github.com/OpenHands/extensions",
"repository": "https://github.com/OpenHands/extensions",
"license": "MIT",
"keywords": [
"slack",
"monitor",
"channel",
"trigger",
"cron",
"automation",
"integration"
]
}
91 changes: 91 additions & 0 deletions skills/slack-channel-monitor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Slack Channel Monitor

Create a cron automation that polls up to 10 Slack channels every minute and
starts an OpenHands conversation whenever a configurable trigger phrase is
detected.

## Triggers

This skill is activated by keywords:

- `monitor a Slack channel`
- `watch Slack for messages`
- `Slack bot that responds to mentions`
- `OpenHands Slack integration`
- `trigger OpenHands from Slack`
- `respond to @openhands in Slack`
- `poll Slack channels`

## Features

- **Token auto-detection**: works with a bot token (`SLACK_BOT_TOKEN`) or a
user token (`SLACK_USER_TOKEN`); informs the user if neither is present
- **Channel name resolution**: resolves `#channel-name` to IDs, with graceful
handling of permission errors
- **Configurable trigger phrase**: defaults to `@openhands`; any low-collision
phrase works (e.g. `jazz hands`, `take-me-to-funky-town`)
- **Efficient polling**: single `search.messages` call for multi-channel user
tokens with `search:read`; falls back to one `conversations.history` call
per channel for bot tokens
- **Thread tracking**: new replies in a triggered thread are forwarded to the
running OpenHands conversation
- **Reaction acknowledgement**: adds a 👀 to every message containing the
trigger phrase
- **Conversation link**: posts a link to the new conversation in the Slack
thread immediately on trigger detection
- **Automatic summaries**: when the conversation reaches a terminal state the
agent's final response is posted back to the thread; error/stuck states
receive a clear error notice
- **Persistent state**: conversation tracking and poll timestamps are stored
in `automation-state/slack_poller_{automation_id}.json` across runs

## Prerequisites

Set at least one of the following in **OpenHands Settings - Secrets**:

| Secret | Token type | Minimum scopes |
|--------|-----------|----------------|
| `SLACK_BOT_TOKEN` | Bot (`xoxb-`) | `channels:history`, `channels:read`, `reactions:write`, `chat:write` |
| `SLACK_USER_TOKEN` | User (`xoxp-`) | Same as bot, plus `search:read` for multi-channel efficiency |

Optional:

| Secret | Default | Purpose |
|--------|---------|---------|
| `OPENHANDS_URL` | `http://localhost:8000` | Base URL for conversation links posted in Slack |

## Quick Start

Ask OpenHands:

> "Monitor the #dev-help and #support Slack channels and start a conversation
> whenever someone says @openhands"

The skill will:

1. Verify your Slack token is available
2. Resolve channel names to IDs
3. Confirm the trigger phrase (or use the default `@openhands`)
4. Generate and upload a customised automation script
5. Create the automation with cron schedule `* * * * *`

## How It Works

Each cron run (every minute):

1. Fetches new messages from all monitored channels
2. Adds 👀 to any message containing the trigger phrase
3. Creates an OpenHands conversation with the message and recent channel
context as the initial prompt; posts a link to the conversation in the
Slack thread
4. Forwards new replies in tracked threads to the running conversation
5. Checks active conversations - posts the agent's final response back to
Slack when the conversation completes

## See Also

- [SKILL.md](SKILL.md) - Full setup workflow and runtime behaviour reference
- [references/slack-api.md](references/slack-api.md) - Token types, required
scopes, endpoint reference, and rate limits
- [references/state-schema.md](references/state-schema.md) - State file schema
and conversation lifecycle diagram
Loading
Loading