AI agents
Using with AI agents
The CLI is designed to work with AI coding agents like Claude Code, GitHub Copilot, and Cursor. Every command supports structured output, so an agent can read Slack context, send messages, and manage tasks — all without leaving the terminal.
Why this matters
AI agents work best when they have full context. Instead of asking a developer to copy-paste Slack messages into a chat window, the agent can pull context directly from Slack, understand team discussions, and take action.
Typical AI workflow
# 1. Agent checks what needs attentionslackbuzz activity --json
# 2. Agent reads messages in a specific channelslackbuzz message list #engineering --json --limit 10
# 3. Agent searches for relevant discussionsslackbuzz message search "deployment" --json
# 4. Agent reads a specific thread for contextslackbuzz message list #engineering --thread-ts 1706000000.000000 --json
# 5. Agent implements the fix...
# 6. Agent replies to the threadslackbuzz thread #engineering 1706000000.000000 "Fix deployed, see PR #42"
# 7. Agent reacts to acknowledgeslackbuzz react #engineering 1706000000.000000 :white_check_mark:
# 8. Agent edits a message if neededslackbuzz message edit #engineering 1706000000.000000 "Updated: fix deployed in PR #43"
# 9. Agent searches for relevant filesslackbuzz file search "API spec" --type pdf --jsonKey features for AI agents
Structured JSON output
All list and view commands support --json for machine-readable output:
# Get activity as JSONslackbuzz activity --json
# Get channel listslackbuzz channel list --json
# Filter with jq expressionsslackbuzz activity --json --jq '[.[] | select(.type == "mention")]'Cross-tool context
The digest command gives agents a complete picture across Slack, ClickUp, and GitHub:
# Get cross-tool context in one callslackbuzz digest --json
# Slack mentions onlyslackbuzz digest --slack-only --jsonClickUp and GitHub enrichment
Activity views auto-detect ClickUp task IDs and GitHub PR URLs. The JSON output includes these references, allowing agents to follow up with the appropriate CLI:
# Agent reads activity, finds CU-abc123 and PR #42 referencesslackbuzz activity --json
# Agent can then check the ClickUp taskclickup task view CU-abc123 --json
# And the GitHub PRgh pr view 42 --json title,body,reviewsStatus management
Agents can manage the developer’s Slack status as part of a workflow:
# Set status while working on a taskslackbuzz status set "Deep work" :headphones: --until 2h
# Clear when doneslackbuzz status clearSaved items
Agents can save important messages for later follow-up:
# Save a message for laterslackbuzz later add #engineering 1706000000.000000
# Check saved itemsslackbuzz later list --jsonExample: Claude Code integration
When using Claude Code, the agent can be instructed to use the CLI as part of its workflow:
Task: Respond to the Slack thread about the API bug
1. Run `slackbuzz activity --json` to find the thread2. Run `slackbuzz message list #backend --thread-ts <ts> --json` to read the discussion3. Investigate and fix the bug4. Run `slackbuzz thread #backend <ts> "Fixed in PR #42, the issue was..."`5. Run `slackbuzz react #backend <ts> :white_check_mark:`The CLI handles authentication via the system keyring, so no tokens need to be passed in prompts.
Example: Morning standup automation
An agent can prepare a morning standup summary:
# Get everything from the last dayslackbuzz digest --since 1d --json
# Check saved items that need follow-upslackbuzz later list --json
# Check threads you're inslackbuzz threads --since 1d --jsonClaude Code skill (plugin marketplace)
Install the SlackBuzz CLI skill into Claude Code so it automatically uses the CLI for Slack operations. No need to clone this repo.
# In Claude Code, run:/plugin marketplace add triptechtravel/slackbuzz-cli/plugin install slackbuzz-cli@slackbuzz-cliOnce installed, Claude Code will automatically use slackbuzz commands when you ask it to send messages, check activity, search Slack, manage reactions, or set your status.
If you have the repo cloned locally, you can alternatively symlink the skill:
make install-skill@mention resolution
@name mentions in message bodies are resolved automatically to Slack’s <@USERID> format before posting. Agents can write natural @username mentions without manually looking up user IDs:
# Mentions are resolved automaticallyslackbuzz message send '#engineering' '@alice @bob please review PR #42'
# Also works in notifyslackbuzz notify #releases --message '@team v2.0 is live'Unrecognized names pass through as-is. Use slackbuzz user list --json to discover available usernames.
Tips
- Use
--jsonoutput when you need the agent to parse data programmatically - Use
slackbuzz activity --jsonto discover what needs attention - Use
slackbuzz message list --jsonto give the agent context from channel discussions - Use
slackbuzz digest --jsonto give the agent cross-tool context - The activity view includes channel IDs, timestamps, and permalinks that agents can use to take action
- Use
slackbuzz message editandslackbuzz message deleteto correct mistakes - Use
slackbuzz file searchto find shared files and documents - Use
slackbuzz react removeto undo reactions - All commands are safe to run multiple times (reads are idempotent, sends create new messages)
- Combine with
clickupandghCLIs for full cross-tool agent workflows