Skip to content
Back to skills

Slack

ASecurity

Send and read Slack messages as the user. Use when the user mentions Slack, channels, DMs, or asks to send/read Slack messages.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 9, 2026
ai-agentsshellbashreactapi

Works with

  • cursor
  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned October 9, 2026

npx -y skills add julienR2/jarvis --skill slack --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Slack?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Slack
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/julienr2-slack/badge)](https://www.skillsdirectory.com/skills/julienr2-slack)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: slack
description: Send and read Slack messages as the user. Use when the user mentions Slack, channels, DMs, or asks to send/read Slack messages.
allowed-tools: Bash, Read, Write
---

# Slack Skill

Post and read Slack messages using a **User OAuth Token** (messages appear as the user, not a bot).

## Credentials

Uses the **`slack`** connector → sets `$SLACK_USER_TOKEN` (starts with `xoxp-`). Load it per *Connectors* in CLAUDE.md, in the same shell block as the commands that use it.

- **API base:** `https://slack.com/api/`

All methods are HTTP POST with `Authorization: Bearer ${SLACK_USER_TOKEN}`.

---

## Send a message

```bash
curl -s -X POST https://slack.com/api/chat.postMessage \
  -H "Authorization: Bearer ${SLACK_USER_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"channel": "CHANNEL_ID", "text": "Hello from Jarvis"}'
```

- Use a **channel ID** (e.g. `C0123ABCDEF`), not the channel name.
- To find the channel ID, list channels first (see below).

---

## List channels

```bash
curl -s https://slack.com/api/conversations.list \
  -H "Authorization: Bearer ${SLACK_USER_TOKEN}" \
  -d "types=public_channel,private_channel&limit=100"
```

Returns `channels[]` with `id`, `name`, `is_member`, etc.

---

## Read channel history

```bash
curl -s https://slack.com/api/conversations.history \
  -H "Authorization: Bearer ${SLACK_USER_TOKEN}" \
  -d "channel=CHANNEL_ID&limit=20"
```

Returns `messages[]` with `text`, `user`, `ts`, etc.

---

## Send a DM

First, open a DM channel with the user:

```bash
curl -s -X POST https://slack.com/api/conversations.open \
  -H "Authorization: Bearer ${SLACK_USER_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"users": "USER_ID"}'
```

Then send a message to the returned `channel.id`.

---

## Look up users

```bash
curl -s https://slack.com/api/users.list \
  -H "Authorization: Bearer ${SLACK_USER_TOKEN}" \
  -d "limit=200"
```

Returns `members[]` with `id`, `name`, `real_name`, `profile.email`, etc.

---

## Common use cases

| Task | API method |
|---|---|
| Post to a channel | `chat.postMessage` |
| Read recent messages | `conversations.history` |
| List channels | `conversations.list` |
| Send a DM | `conversations.open` + `chat.postMessage` |
| List users | `users.list` |
| Reply in thread | `chat.postMessage` with `thread_ts` |
| React to a message | `reactions.add` with `channel`, `name`, `timestamp` |

## Notes

- Always use channel IDs, not names, in API calls.
- For paginated results, use the `cursor` field from `response_metadata.next_cursor`.
- Rate limits: Slack allows ~1 req/sec for most methods. Avoid tight loops.
- The user token posts **as the user** — messages show their name and avatar.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.