Skip to content

Commit ae652db

Browse files
isaacrowntreeclaude
andcommitted
docs: add user lookup guidance for @mentions in skill
Plain @name text in message bodies doesn't ping anyone in Slack. The skill now documents the required workflow: look up user IDs with `slackbuzz user list --json`, then use `<@userid>` format. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 51b239f commit ae652db

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

skills/slackbuzz-cli/SKILL.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,39 @@ slackbuzz user info @alice
200200
| `--since <duration>` | Time filter (2h, 1d, 7d, 2w, or YYYY-MM-DD) |
201201
| `--limit <n>` | Max results |
202202

203+
## @Mentioning Users in Messages
204+
205+
**IMPORTANT**: When mentioning users in channel messages, you MUST look up their Slack user ID first and use the `<@USERID>` format. Plain `@name` text will NOT ping anyone — it renders as literal text.
206+
207+
### Step 1: Look up the user
208+
209+
```bash
210+
# Search by name (case-insensitive, matches username and display name)
211+
slackbuzz user list --json | jq '.[] | select(.real_name | test("michelle"; "i")) | {name, real_name, id}'
212+
213+
# Or list all users and grep
214+
slackbuzz user list --json | jq '.[] | {name, real_name, id}'
215+
```
216+
217+
### Step 2: Use `<@USERID>` in the message
218+
219+
```bash
220+
# Correct — will actually ping the user
221+
slackbuzz message send '#channel' '<@U01LM9D2MPU> <@U02P3QC5H24> please review this'
222+
223+
# WRONG — renders as plain text, no ping
224+
slackbuzz message send '#channel' '@michelle @herman please review this'
225+
```
226+
227+
The `<@USERID>` format is Slack's native mention syntax. Always resolve names to IDs before composing messages that need to notify someone.
228+
229+
**When the user says "message @someone"**: First run `slackbuzz user list --json | jq` to find the matching user ID, then use `<@ID>` in the message body.
230+
203231
## Key Behaviors
204232

205-
- **DM auto-detection**: `@user`, `U...` IDs, and bare names auto-resolve to DM channels
233+
- **DM auto-detection**: `@user`, `U...` IDs, and bare names auto-resolve to DM channels (for the channel/target argument, not message body)
234+
- **@mentions in message body**: Must use `<@USERID>` format — look up IDs with `slackbuzz user list --json` first
206235
- **Case-insensitive resolution**: User lookup matches display names and usernames regardless of case
207236
- **Dual tokens**: Bot token for channel ops, user token for search/DMs/status
208237
- **Deeplinks**: Output includes clickable Slack deeplinks
209238
- **Cross-tool**: Digest combines Slack, ClickUp, and GitHub activity
210-
- **@mentions**: Works naturally in messages — `slackbuzz message send @alice "text"`

0 commit comments

Comments
 (0)