Skip to content

dpaluy/slack-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-msg

Claude Code skill for reading and responding to Slack messages as yourself.

How It Works

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.

Setup (~2 minutes)

Requires curl and jq (both likely already installed).

1. Create a Slack App

  1. Go to api.slack.com/apps
  2. Click Create New AppFrom an app manifest
  3. Select your workspace → paste the contents of manifest.yml
  4. Click through → CreateInstall to WorkspaceAllow
  5. Copy the User OAuth Token (starts with xoxp-)

2. Store Your Token

mkdir -p ~/.local/dotfiles
echo 'export SLACK_USER_TOKEN="xoxp-your-token-here"' > ~/.local/dotfiles/slack.local

If 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

3. Install

./install.sh

This symlinks slack-api to /usr/local/bin and the skill to ~/.claude/skills/slack-msg.

4. Verify

slack-api channels

You should see a JSON array of your Slack channels.

Usage

# 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 U028N2BH1V1

With Claude Code

Invoke the skill: /slack-msg

Claude will be able to read your Slack channels, understand conversation context, and draft replies for your approval before sending.

Security Notes

  • 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

About

Skills for Slack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages