Skip to content
Back to skills

Slack Connector

ASecurity

A skill to interact with Slack, allowing listing channels and reading message history.

  • 33 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 23, 2026
ai-agentspythonshellbash

Works with

  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 23, 2026

npx -y skills add BrianArfi/ai-second-brain --skill slack-connector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Slack Connector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Slack Connector
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/brianarfi-slack-connector/badge)](https://www.skillsdirectory.com/skills/brianarfi-slack-connector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Slack Connector
description: A skill to interact with Slack, allowing listing channels and reading message history.
---

# Slack Connector Skill

This skill allows the agent to interact with a Slack workspace using a Bot Token.

## Capabilities

1.  **List Channels**: Retrieve a list of public channels in the workspace.
2.  **Read History**: Retrieve message history from a specific channel.

## Prerequisites

-   A Slack Bot Token (starting with `xoxb-`) with the following scopes:
    -   `channels:read`
    -   `channels:history`
    -   (Optional) `groups:read`, `groups:history`, `im:read`, `im:history`, `mpim:read`, `mpim:history` for private channels/DMs.
-   Python 3 installed.
-   `requests` library (`pip install requests`).
-   **Timeouts**: The script has a built-in **180-second global timeout**. Always wrap background calls in `timeout 180s` for safety.

## Usage

The skill uses a helper script located at `scripts/slack_client.py`.

### List Channels

```bash
timeout 180s python3 .agent/skills/slack-connector/scripts/slack_client.py --action list_channels --token <YOUR_SLACK_TOKEN>
```

### Read Channel History

```bash
timeout 180s python3 .agent/skills/slack-connector/scripts/slack_client.py --action history --channel <CHANNEL_ID> --token <YOUR_SLACK_TOKEN> [--replies]
```
Use `--replies` to fetch thread replies for each message.

You can also set the `SLACK_BOT_TOKEN` environment variable to avoid passing `--token` every time.

```bash
export SLACK_BOT_TOKEN="xoxb-..."
python .agent/skills/slack-connector/scripts/slack_client.py --action list_channels
```

### Send Approval Gate

`post`, `upload`, `update`, `delete`, and `invite` mutate outbound Slack state
(they post, edit, or delete messages, post files, or add channel members), so
they are default-blocked. The gate itself
lives in `.agent/scripts/file_utils.py` as `require_send_approval()` and is
imported by both this connector and `secondary-slack-connector`, so there is one
implementation and no ungated twin.

The command refuses before touching the network unless `--approved` is passed,
and approval is per message: pass it only once the owner has explicitly signed off on
that specific draft.

```bash
python3 .agent/skills/slack-connector/scripts/slack_client.py --action post \
  --channel <CHANNEL_ID> --text "Your message" --approved
```

There is deliberately no environment escape hatch. An env flag would be
process-wide and permanent, so exporting it once into a shell or cron
environment would un-gate every later send in that process tree, which is the
opposite of the per-message approval the rule requires. Unattended callers pass
approval explicitly at their own call site; `dashboard/server.py` does this on
the click path.

`token.env` supplies credentials only. The loader refuses any key that would
relax the gate, so a credentials file can never grant send authorization.

Without `--approved`, the command exits nonzero. Never retry a refused send by
adding `--approved` on a guess; only pass it once the owner has actually approved
the message.

Files in this skill

  • SKILL.md3 KB
  • scripts/slack_client.py50.3 KB
  • tests/test_incomplete_read_resilience.py2.8 KB
  • tests/test_length_guard.py2.5 KB
  • tests/test_shell_mangle_guard.py1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.