Skip to content
All Skills

Slack Messaging via slackcli

Use when asked to send or read Slack messages, check Slack channels, test Slack integrations, or interact with a Slack workspace from the command line.

Business, Marketing & Sales|v1|Updated 5/18/2026|GitHub source
MCP get_skill({ skillId: "slack-messaging-via-slackcli-00384be3" })

Use this skill with your agent

Create a free account and connect via MCP

Get Started Free
# Slack Messaging via slackcli

Send and read Slack messages from the command line using `slackcli` (shaharia-lab/slackcli).

## Installation

Download the binary:

```bash
curl -sL -o /usr/local/bin/slackcli \
  "https://github.com/shaharia-lab/slackcli/releases/download/v0.1.1/slackcli-linux"
chmod +x /usr/local/bin/slackcli
```

macOS (Intel): replace `slackcli-linux` with `slackcli-macos`
macOS (Apple Silicon): replace with `slackcli-macos-arm64`

## Authentication

slackcli uses browser session tokens (xoxc + xoxd) - no Slack app creation required.

### Interactive Setup

```bash
./scripts/extract-tokens <workspace-url>
```

This walks the user through extracting tokens from browser DevTools.

### Manual Setup

```bash
slackcli auth login-browser \
  --xoxd="xoxd-..." \
  --xoxc="xoxc-..." \
  --workspace-url=https://your-workspace.slack.com
```

### Verify Auth

```bash
slackcli auth list
```

## Finding Channels

Use `slackcli conversations list` to discover channels and their IDs:

```bash
# List all channels
slackcli conversations list

# Filter output
slackcli conversations list | grep -i "channel-name"
```

## Sending Messages

```bash
# Send to a channel (use channel ID from conversations list)
slackcli messages send --recipient-id=C0XXXXXXXX --message="Hello from CLI"

# Send to a DM (use user's DM channel ID)
slackcli messages send --recipient-id=D0XXXXXXXX --message="Hey"

# Reply in a thread
slackcli messages send --recipient-id=C0XXXXXXXX --message="Thread reply" --thread-ts=1769756026.624319
```

The `--recipient-id` is always a channel ID (C...) or DM channel ID (D...).

## Reading Messages

```bash
# Read last N messages from a channel
slackcli conversations read C0XXXXXXXX --limit=10

# Read as JSON (for parsing)
slackcli conversations read C0XXXXXXXX --limit=10 --json

# Read a thread
slackcli conversations read C0XXXXXXXX --thread-ts=1769756026.624319
```

## Listing Channels

```bash
slackcli conversations list
```

Returns all public channels, private channels, and DMs with their IDs.

## Testing Slack Integrations

To verify a bot or integration posted a message correctly:

```bash
# Read the channel, check for the expected message
slackcli conversations read CHANNEL_ID --limit=5 --json | jq '.messages[] | select(.text | contains("expected text"))'
```

To send a test message and verify the round-trip:

```bash
# Send
slackcli messages send --recipient-id=CHANNEL_ID --message="integration test $(date +%s)"

# Read back
slackcli conversations read CHANNEL_ID --limit=1 --json
```

## Multiple Workspaces

slackcli supports multiple workspaces. Run the auth flow for each workspace you need:

```bash
# Add first workspace
./scripts/extract-tokens https://workspace-one.slack.com

# Add second workspace
./scripts/extract-tokens https://workspace-two.slack.com

# List all authenticated workspaces
slackcli auth list
```

When sending messages, slackcli automatically routes to the correct workspace based on the channel ID.

## Token Notes

- Browser tokens (xoxc/xoxd) act as the logged-in user, not a bot
- Messages sent appear as the user, not an app
- Tokens expire when the user logs out of the browser session
- To refresh: re-extract tokens from a logged-in browser session
- All workspace credentials are stored at `~/.config/slackcli/workspaces.json`
#broad-capability#github#external#license-mit#obra-superpowers-lab#experimental#slack#messaging

Related Skills

More skills in Business, Marketing & Sales

Ab Testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics. For page-level conversion optimization, see cro.

#work-life#productivityMIT

Ab Test Setup

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

#work-life#productivityMIT

Ab Test Setup

Ab Test Setup linked from Corey Haines marketing skills, with the upstream skill instructions available on GitHub.

#work-life#productivityMIT

Ab Test Store Listing

When the user wants to A/B test App Store product page elements to improve conversion rate. Also use when the user mentions "A/B test", "product page optimization", "test my screenshots", "test my icon", "conversion rate optimization", "CPP", or "custom product pages". For screenshot design, see screenshot-optimization. For metadata optimization, see metadata-optimization.

#work-life#productivityMIT

Account Research

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

#work-life#productivityApache-2.0

Account Research

Research a company using Common Room data. Triggers on 'research [company]', 'tell me about [domain]', 'pull up signals for [account]', 'what's going on with [company]', or any account-level question.

#work-life#productivityApache-2.0