
Slack Messaging
Post updates and read Slack threads from agent workflows with structured messaging patterns.
Install
npx skills add https://github.com/obra/superpowers-lab --skill slack-messagingWhat is this skill?
- Structured Slack post templates for agent status.
- Thread-aware read/reply guidance.
- Superpowers lab notification patterns.
Adoption & trust: 227 installs on skills.sh; 364 GitHub stars; 1/3 security scanners passed (skills.sh audits).
Recommended Skills
Agent Browservercel-labs/agent-browser
Lark Imlarksuite/cli
Lark Calendarlarksuite/cli
Lark Sheetslarksuite/cli
Lark Vclarksuite/cli
Lark Contactlarksuite/cli
Journey fit
Common Questions / FAQ
Is Slack Messaging safe to install?
skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Slack Messaging
#!/usr/bin/env bash # Extract Slack browser tokens (xoxc + xoxd) for slackcli authentication. # Opens the Slack workspace in a browser and guides the user through extraction. set -euo pipefail if [[ $# -lt 1 ]]; then echo "Usage: $0 <workspace-url>" >&2 echo " Example: $0 https://your-workspace.slack.com" >&2 exit 1 fi WORKSPACE_URL="$1" echo "=== Slack Browser Token Extraction ===" echo "" echo "This script helps you extract browser tokens for slackcli." echo "These tokens let you use Slack from the CLI without creating a Slack app." echo "" echo "Step 1: Open your Slack workspace in a browser:" echo " $WORKSPACE_URL" echo "" echo "Step 2: Open DevTools (F12) -> Network tab" echo "" echo "Step 3: Refresh the page or send a message" echo "" echo "Step 4: Click any request to api.slack.com (e.g., client.boot, conversations.list)" echo "" echo "Step 5: From the Request Headers, find the Cookie header." echo " Look for: d=xoxd-..." echo " Copy the full xoxd value (starts with 'xoxd-', ends before the next ';')" echo "" echo "Step 6: From the Request Body (or Form Data), find:" echo " token=xoxc-..." echo " Copy the full xoxc value" echo "" read -rp "Paste your xoxc token: " XOXC if [[ ! "$XOXC" =~ ^xoxc- ]]; then echo "Error: Token must start with 'xoxc-'" >&2 exit 1 fi read -rp "Paste your xoxd token (URL-encoded is fine): " XOXD if [[ ! "$XOXD" =~ ^xoxd- ]]; then echo "Error: Token must start with 'xoxd-'" >&2 exit 1 fi echo "" echo "Authenticating with slackcli..." slackcli auth login-browser \ --xoxd="$XOXD" \ --xoxc="$XOXC" \ --workspace-url="$WORKSPACE_URL" echo "" echo "Verifying..." slackcli auth list --- name: slack-messaging description: 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. user-invocable: false allowed-tools: Bash(slackcli:*, curl:*) --- # 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 Integratio