agent-slack

📁 stablyai/agent-slack 📅 8 days ago
108
总安装量
108
周安装量
#2172
全站排名
安装命令
npx skills add https://github.com/stablyai/agent-slack --skill agent-slack

Agent 安装分布

opencode 101
codex 96
gemini-cli 95
github-copilot 94
kimi-cli 90
amp 90

Skill 文档

Slack automation with agent-slack

agent-slack is a CLI binary installed on $PATH. Invoke it directly (e.g. agent-slack user list)

Quick start (auth)

Authentication is automatic on macOS (Slack Desktop first, then Chrome fallback).

If credentials aren’t available, run one of:

  • Slack Desktop (default):
agent-slack auth import-desktop
agent-slack auth test
  • Chrome fallback:
agent-slack auth import-chrome
agent-slack auth test
  • Or set env vars (browser tokens; avoid pasting these into chat logs):
export SLACK_TOKEN="xoxc-..."
export SLACK_COOKIE_D="xoxd-..."
agent-slack auth test
  • Or set a standard token:
export SLACK_TOKEN="xoxb-..."  # or xoxp-...
agent-slack auth test

Check configured workspaces:

agent-slack auth whoami

Canonical workflow (given a Slack message URL)

  1. Fetch a single message (plus thread summary, if any):
agent-slack message get "https://workspace.slack.com/archives/C123/p1700000000000000"
  1. If you need the full thread:
agent-slack message list "https://workspace.slack.com/archives/C123/p1700000000000000"

Attachments (snippets/images/files)

message get/list and search auto-download attachments and include absolute paths in JSON output (typically under message.files[].path / files[].path).

Reply or react (does the right thing)

agent-slack message send "https://workspace.slack.com/archives/C123/p1700000000000000" "I can take this."
agent-slack message react add "https://workspace.slack.com/archives/C123/p1700000000000000" "eyes"
agent-slack message react remove "https://workspace.slack.com/archives/C123/p1700000000000000" "eyes"

Search (messages + files)

Prefer channel-scoped search for reliability:

agent-slack search all "smoke tests failed" --channel "#alerts" --after 2026-01-01 --before 2026-02-01
agent-slack search messages "stably test" --user "@alice" --channel general
agent-slack search files "testing" --content-type snippet --limit 10

Multi-workspace guardrail (important)

If you have multiple workspaces configured and you use a channel name (#general / general), pass --workspace (or set SLACK_WORKSPACE_URL) to avoid ambiguity:

agent-slack message get "#general" --workspace "https://myteam.slack.com" --ts "1770165109.628379"

Canvas + Users

agent-slack canvas get "https://workspace.slack.com/docs/T123/F456"
agent-slack user list --workspace "https://workspace.slack.com" --limit 100
agent-slack user get "@alice" --workspace "https://workspace.slack.com"

References