Skip to content
AI & Agents
Skill

/agent-slack

Interact with Slack workspaces - send messages, read channels, manage reactions

From plugin
agent-messenger
26019 skills

Claude Code

$ npx -y skills add agent-messenger/agent-messenger --skill agent-slack --agent claude-code

SKILL.md

agent-slack.SKILL.md
name: agent-slack
description: Interact with Slack workspaces - send messages, read channels, manage reactions
version: 2.43.0
allowed-tools: Bash(agent-slack:*)
metadata:
  openclaw:
    requires:
      bins:
        - agent-slack
    install:
      - kind: node
        package: agent-messenger
        bins: [agent-slack]

Agent Slack

A TypeScript CLI tool that enables AI agents and humans to interact with Slack workspaces through a simple command interface. Features seamless token extraction from the Slack desktop app (with browser fallback) and multi-workspace support.

Quick Start

# Get workspace snapshot (credentials are extracted automatically)
agent-slack snapshot

# Send a message
agent-slack message send general "Hello from AI agent!"

# List channels
agent-slack channel list

Authentication

Credentials are extracted automatically from the Slack desktop app (or Chromium browser as fallback) on first use. No manual setup required — just run any command and authentication happens silently in the background.

On macOS, the system may prompt for your Keychain password the first time (required to decrypt Slack's stored token). This is a one-time prompt.

**Two ways to obtain tokens:**

  • **`agent-slack auth qr` — recommended.** Sign in with a QR code from Slack's "Sign in on mobile" screen. It's the safest and most reliable method: it authenticates through Slack's own login flow over plain HTTP instead of reading credentials off disk, and needs no desktop app or browser.
  • **`agent-slack auth extract`.** Extracts tokens from the Slack desktop app first, falling back to Chromium browsers if the app isn't installed. Best for automated/headless environments.

QR Code Sign-In (Recommended)

Sign in with a QR code from any device where you're already logged into Slack — no desktop app, no browser automation, fully over HTTP:

# In Slack (desktop or web): your name (top-left) → "Sign in on mobile".
# Right-click the QR code → "Copy Image Address", then:
pbpaste | agent-slack auth qr

# Or pass the data URL directly:
agent-slack auth qr "data:image/png;base64,iVBORw0KGgo..."

This decodes the QR's one-time login link, establishes a session, and stores the resulting credentials like `auth extract` does. The QR link is single-use — generate a fresh one if it expires.

Multi-Workspace Support

# List all authenticated workspaces
agent-slack workspace list

# Switch to a different workspace
agent-slack workspace switch <workspace-id>

# Show current workspace
agent-slack workspace current

# Remove a workspace
agent-slack workspace remove <workspace-id>

# Check auth status
agent-slack auth status

# Run one command against another workspace without switching
agent-slack --workspace <workspace-id> channel list
agent-slack --workspace <workspace-id> auth status

The global `--workspace <id>` flag goes before the command and applies to every command that uses a stored workspace, including `auth status` and `auth logout`. It targets that workspace for this one invocation only and does not change the current workspace. If the id is not stored, `auth status` fails with `Workspace not found: <id>`. `auth extract` and `auth qr` discover workspaces instead of targeting one, so the flag does not affect them; they set the current workspace only when none is set yet.

Memory

The agent maintains a `~/.config/agent-messenger/MEMORY.md` file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the `Read` and `Write` tools to manage your memory file.

Reading Memory

At the **start of every task**, read `~/.config/agent-messenger/MEMORY.md` using the `Read` tool to load any previously discovered workspace IDs, channel IDs, user IDs, and preferences.

  • If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
  • If the file can't be read (permissions, missing directory), proceed without memory — don't error out.

Writing Memory

After discovering useful information, update `~/.config/agent-messenger/MEMORY.md` using the `Write` tool. Write triggers include:

  • After discovering workspace IDs (from `workspace list`)
  • After discovering useful channel IDs and names (from `channel list`, `snapshot`, etc.)
  • After discovering user IDs and names (from `user list`, `user me`, etc.)
  • After the user gives you an alias or preference ("call this the deploys channel", "my main workspace is X")
  • After discovering channel structure (sidebar sections, channel categories)

When writing, include the **complete file content** — the `Write` tool overwrites the entire file.

What to Store

  • Workspace IDs with names
  • Channel IDs with names and purpose
  • User IDs with display names
  • User-given aliases ("deploys channel", "main workspace")
  • Commonly used thread timestamps
  • Any user preference expressed during interaction

What NOT to Store

Never store tokens, cookies, credentials, or any sensitive data. Never store full message content (just IDs and channel context). Never store file upload contents.

Handling Stale Data

If a memorized ID returns an error (channel not found, user not found), remove it from `MEMORY.md`. Don't blindly trust memorized data — verify when something seems off. Prefer re-listing over using a memorized ID that might be stale.

Format / Example

# Agent Messenger Memory

## Slack Workspaces

- `T0ABC1234` — Acme Corp (default)
- `T0DEF5678` — Side Project

## Channels (Acme Corp)

- `C012ABC` — #general (company-wide announcements)
- `C034DEF` — #engineering (team discussion)
- `C056GHI` — #deploys (CI/CD notifications)

## Users (Acme Corp)

- `U0ABC123` — Alice (engineering lead)
- `U0DEF456` — Bob (backend)

## Aliases

- "deploys" → `C056GHI` (#deploys in Acme Corp)
- "main workspace" → `T0ABC1234` (Acme Corp)

## Notes

- User prefers --pretty output for snapshots
- Main
Read more
@agent-messenger
Ships withagent-messenger

Your agent messages as you — not as a bot One CLI for Slack, Discord, Teams, Webex, Telegram, WhatsApp, LINE, WeChat, iMessage, Instagram, KakaoTalk, and Channel Talk.

Stars on GitHub

Momentum

stars in total
260
Star history of agent-messenger/agent-messenger on GitHub, a chart by star-history.com

Other skills on agent-messenger.

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw3w393k
@openclaw@openclawInstall Skill

Questions about agent-slack.

Which coding agents can use agent-slack?
agent-slack installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.