Catalog
obra/slack-messaging

obra

slack-messaging

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.

global
Allowed Tools
Bash(slackcli:*curl:*)
0installs0uses~870
v1.0Saved May 2, 2026

Slack Messaging via slackcli

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

Installation

Download the binary:

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

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

This walks the user through extracting tokens from browser DevTools.

Manual Setup

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

Verify Auth

slackcli auth list

Finding Channels

Use slackcli conversations list to discover channels and their IDs:

# List all channels
slackcli conversations list

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

Sending Messages

# 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

# 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

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:

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

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

# 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
Files2
2 files · 2.7 KB

Select a file to preview

Overall Score

72/100

Grade

B

Good

Safety

68

Quality

75

Clarity

82

Completeness

65

Summary

This skill enables an AI agent to send and read Slack messages, discover channels, and test Slack integrations via the command line using the slackcli tool. It supports multiple workspaces through browser-based token authentication (xoxc/xoxd tokens) and provides structured guidance for channel discovery, message sending/reading, and integration testing.

Detected Capabilities

Download and install slackcli binary from GitHub releasesExtract browser session tokens (xoxc/xoxd) from DevToolsAuthenticate to Slack workspaces without creating a Slack appList channels and discover channel IDsSend messages to channels, DMs, and threadsRead messages from channels with JSON output for parsingQuery messages by content using jq filtersManage multiple workspace credentialsVerify integration test messages round-trip successfully

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

send slack messageread slack channelslack integration testlist slack channelsslack notificationverify bot post

Risk Signals

WARNING

Browser session token extraction and storage

SKILL.md: Authentication section, Token Notes
WARNING

Credentials stored in plaintext at ~/.config/slackcli/workspaces.json

SKILL.md: Token Notes
INFO

Download and execute binary from GitHub releases

SKILL.md: Installation section
WARNING

Script file 'scripts/extract-tokens' (1.6 KB, binary/octet-stream) not provided for inspection

File Manifest
INFO

Curl piped to shell not present; however, curl used to download binary without checksum verification

SKILL.md: Installation section
INFO

Network requests to Slack API via slackcli and curl

SKILL.md: multiple sections

Referenced Domains

External domains referenced in skill content, detected by static analysis.

github.comworkspace-one.slack.comworkspace-two.slack.comyour-workspace.slack.com

Use Cases

  • Send notifications or alerts to Slack channels programmatically
  • Read recent messages from a channel to monitor activity or verify bot posts
  • Test Slack integrations by sending test messages and reading them back
  • Discover channel IDs and list available channels in a workspace
  • Manage multi-workspace authentication and route messages to the correct workspace

Quality Notes

  • Positive: Clear, well-organized structure with logical sections for installation, auth, operations, and testing.
  • Positive: Explicit scope boundaries — skill is narrowly focused on Slack messaging, not general-purpose.
  • Positive: Practical examples for every major operation (sending, reading, filtering, multi-workspace).
  • Positive: Token lifecycle documented, including expiry and refresh strategy.
  • Positive: allowed-tools field correctly specifies Bash with restricted slackcli:* and curl:* permissions.
  • Negative: The scripts/extract-tokens file is referenced but not provided for review — its behavior and security posture cannot be verified.
  • Negative: No explicit error handling guidance — what should the agent do if token extraction fails, channel not found, or send fails?
  • Negative: No security best-practice section advising on token storage, log scrubbing, or preventing token leakage in transcripts.
  • Negative: No mention of rate limiting or Slack API quotas — agent could spam channels if looping logic fails.
  • Negative: Credentials stored in plaintext at ~/.config/slackcli/workspaces.json — no guidance on file permissions or encryption.
  • Positive: Multi-workspace routing is automatic and well-explained.
  • Positive: JSON output and jq integration enables integration testing workflows.
Model: claude-haiku-4-5-20251001Analyzed: May 2, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Add obra/slack-messaging to your library

Command Palette

Search for a command to run...