From 342be8b1d9bb8ec833da75d6c35c161573776e94 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Wed, 20 May 2026 19:59:22 -0700 Subject: [PATCH] docs: clarify file uploads via message send --- README.md | 20 ++++++++++++++++++-- llms.txt | 2 +- skills/agent-slack/SKILL.md | 16 +++++++++++++--- skills/agent-slack/references/commands.md | 8 +++++++- 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7f3cc8f..8ef227f 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ agent-slack ├── message │ ├── get # fetch 1 message (+ thread meta ) │ ├── list # fetch thread or recent channel messages -│ ├── send # send / reply (supports --attach) +│ ├── send [text] # send / reply (supports --attach) │ ├── draft [text] # open Slack-like editor in browser │ ├── edit # edit a message │ ├── delete # delete a message @@ -229,9 +229,25 @@ agent-slack message delete "#general" --workspace "myteam" --ts "1770165109.6283 Attach options for `message send`: -- `--attach ` upload a local file (repeatable) +- `--attach ` upload a local file (repeatable; `` is optional when attaching files) - `--blocks ` send raw [Block Kit](https://docs.slack.dev/block-kit/) blocks from a JSON file (or `-` for stdin). Bypasses the automatic markdown-to-rich-text conversion, unlocking header/divider/section/table blocks and other structured layouts. Cannot be combined with `--attach`. +Upload files through `message send`: + +```bash +# Upload a file without a message +agent-slack message send "#general" --attach ./report.md + +# Upload with an initial comment +agent-slack message send "#general" "Coverage report" --attach ./report.md + +# Upload into a thread +agent-slack message send "https://workspace.slack.com/archives/C123/p1700000000000000" --attach ./report.md + +# Upload multiple files +agent-slack message send "#general" "Reports" --attach ./report.md --attach ./data.csv +``` + Example — post a message with a native Slack table block: ```bash diff --git a/llms.txt b/llms.txt index bbe1f67..298204e 100644 --- a/llms.txt +++ b/llms.txt @@ -12,7 +12,7 @@ - Read Slack messages, threads, and channel history from any URL or channel name - Search Slack messages and files with filters for channel, user, date, and content type -- Send, edit, delete Slack messages and add/remove emoji reactions programmatically +- Send, edit, delete Slack messages, upload local files with `message send --attach`, and add/remove emoji reactions programmatically - Auto-download Slack file attachments (snippets, images, files) to local paths for AI agent consumption - Token-efficient compact JSON output so LLMs can consume Slack data cheaply - Zero-config auth: auto-detects Slack Desktop credentials on macOS, Windows, and Linux — with Chrome, Brave, and Firefox fallbacks diff --git a/skills/agent-slack/SKILL.md b/skills/agent-slack/SKILL.md index 8711385..767fe49 100644 --- a/skills/agent-slack/SKILL.md +++ b/skills/agent-slack/SKILL.md @@ -6,7 +6,8 @@ description: | - Browsing recent channel messages / channel history - Downloading Slack attachments (snippets, images, files) to local paths - Searching Slack messages or files - - Sending, editing, or deleting a message; adding/removing reactions + - Sending messages, including local file uploads via `message send --attach` + - Editing or deleting a message; adding/removing reactions - Listing channels/conversations; creating channels and inviting users - Fetching a Slack canvas as markdown - Looking up Slack users @@ -15,7 +16,7 @@ description: | - Discovering and running Slack workflows - Managing saved-for-later messages (Later tab) - Viewing all unread messages (inbox/unreads view) - Triggers: "slack message", "slack thread", "slack URL", "slack link", "read slack", "reply on slack", "search slack", "channel history", "recent messages", "channel messages", "latest messages", "mark as read", "mark read", "slack later", "saved for later", "save for later", "slack unreads", "slack inbox", "unread slack" + Triggers: "slack message", "slack thread", "slack URL", "slack link", "read slack", "reply on slack", "search slack", "channel history", "recent messages", "channel messages", "latest messages", "mark as read", "mark read", "slack later", "saved for later", "save for later", "slack unreads", "slack inbox", "unread slack", "upload file", "slack file upload", "send file slack" --- # Slack automation with `agent-slack` @@ -160,9 +161,18 @@ agent-slack message delete "general" --workspace "myteam" --ts "1770165109.62837 Attach options for `message send`: -- `--attach ` upload a local file (repeatable) +- `--attach ` upload a local file (repeatable; message text is optional when attaching files) - `--blocks ` send raw [Block Kit](https://docs.slack.dev/block-kit/) blocks from a JSON file (or `-` for stdin). Enables headers, dividers, table blocks, and other structured layouts. Incompatible with `--attach`. +File upload examples: + +```bash +agent-slack message send "general" --attach ./report.md +agent-slack message send "general" "Coverage report" --attach ./report.md +agent-slack message send "https://workspace.slack.com/archives/C123/p1700000000000000" --attach ./report.md +agent-slack message send "general" "Reports" --attach ./report.md --attach ./data.csv +``` + `message send` returns `channel_id` plus the posted `ts` and a `permalink` (for non-attachment sends). `thread_ts` appears only when replying in a thread. Mentions: just write `@U05BRPTKL6A`, `@here`, `@channel`, or `@everyone` — the CLI converts them to real Slack mention tokens and escapes literal `&`/`<`/`>` in your text. You don't need to wrap IDs yourself. diff --git a/skills/agent-slack/references/commands.md b/skills/agent-slack/references/commands.md index 8cb7491..3b0466b 100644 --- a/skills/agent-slack/references/commands.md +++ b/skills/agent-slack/references/commands.md @@ -59,10 +59,16 @@ Run `agent-slack --help` (or `agent-slack --help`) for the full option - `--workspace ` (needed for channel _names_ across multiple workspaces) - `--thread-ts .` (optional, channel mode only) -- `agent-slack message send ` +- `agent-slack message send [text]` - If `` is a Slack message URL, replies in that message’s thread. - Otherwise posts to the channel/DM. + - `[text]` is optional when uploading files with `--attach`; when present, it becomes the initial comment on the first uploaded file. - Bullet lists (`- `, `* `, `• `, `1. `, etc.) are automatically converted to Slack’s native rich text format, so recipients see real editable bullets instead of plain-text dashes. + - Examples: + - `agent-slack message send "general" --attach ./report.md` + - `agent-slack message send "general" "Coverage report" --attach ./report.md` + - `agent-slack message send "https://workspace.slack.com/archives/C123/p1700000000000000" --attach ./report.md` + - `agent-slack message send "general" "Reports" --attach ./report.md --attach ./data.csv` - Options: - `--workspace ` (needed for channel _names_ across multiple workspaces) - `--thread-ts .` (optional, channel mode only)