Claude Code skill for reading and responding to Slack messages as yourself.
slack-api is a shell script that calls the Slack Web API with curl using a personal user token (xoxp-). Messages appear as coming from you, not a bot.
Requires curl and jq (both likely already installed).
- Go to api.slack.com/apps
- Click Create New App → From an app manifest
- Select your workspace → paste the contents of
manifest.yml - Click through → Create → Install to Workspace → Allow
- Copy the User OAuth Token (starts with
xoxp-)
mkdir -p ~/.local/dotfiles
echo 'export SLACK_USER_TOKEN="xoxp-your-token-here"' > ~/.local/dotfiles/slack.localIf your shell sources ~/.local/dotfiles/*.local, the token will be available automatically. Otherwise add to your shell profile:
echo 'source ~/.local/dotfiles/slack.local' >> ~/.zshrc./install.shThis symlinks slack-api to /usr/local/bin and the skill to ~/.claude/skills/slack-msg.
slack-api channelsYou should see a JSON array of your Slack channels.
# List channels
slack-api channels
# Read last 10 messages from a channel
slack-api history C028N1ZCPR9 10
# Read a thread
slack-api thread C028N1ZCPR9 1234567890.123456
# Send a message
slack-api send C028N1ZCPR9 "Hello from the CLI!"
# Reply to a thread
slack-api reply C028N1ZCPR9 1234567890.123456 "Thread reply here"
# Search messages
slack-api search "deployment issue" 5
# List users
slack-api users
# Get user profile
slack-api userinfo U028N2BH1V1
# Open a DM
slack-api dm-open U028N2BH1V1Invoke the skill: /slack-msg
Claude will be able to read your Slack channels, understand conversation context, and draft replies for your approval before sending.
- The
xoxp-token acts as you — treat it like a password - Store it in
~/.local/dotfiles/slack.local(gitignored, never committed) - The token does not expire unless you revoke it or uninstall the app
- Claude will always ask for approval before sending messages