Repository navigation
Conversation
`agent-slack api <method>` calls any Web API method with the configured workspace auth (including auto-refresh) and prints the raw JSON, like `gh api`. Arguments come from `--params <json>` and repeatable `-f key=value` fields. Useful for methods agent-slack has no command for yet, such as client.counts read markers or subscriptions.thread.getView. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Print Slack's error JSON on stdout (exit 1) instead of only a stderr message, add --multipart for methods that ignore form-urlencoded args, and allow only read methods in safe mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Claude writing on behalf of Ali.
What
agent-slack api <method>calls any Slack Web API method with the configured workspace auth (same--workspaceselection and auto-refresh as every other command) and prints Slack's JSON response unchanged, likegh api.-f key=valueadds a string argument (repeatable);--params '<json>'takes a JSON object for non-string values. Fields win over--params.--paramsand keyless fields are rejected before any call is made.Why
Agents keep hitting methods agent-slack has no command for. My case: per-conversation read markers (
client.countslast_read) and per-thread read markers (subscriptions.thread.getView,conversations.replieslast_read) to show a user a voice-clip transcript the moment they open the conversation. An escape hatch avoids a new command for every such method.Testing
bun test: all pass, including newparseApiParamscases (merge order,=inside values, rejected inputs).bun run typecheckclean; lint has no new warnings.client.counts,subscriptions.thread.getView,conversations.repliesandconversations.historyall return the raw JSON (an 89 KB response piped intact).🤖 Generated with Claude Code