skills/slack/SKILL.md
Read channels, DMs, and threads; post and edit messages; search messages and users; add reactions; upload custom emojis — all via the Slack Web API.
npx skillsauth add boazy/skills slackInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Interact with Slack workspaces via the Slack Web API. All operations run as the authenticated user (not a bot) — messages you send appear under your name.
App credentials are stored in ~/.local/secrets/slack/skill-credentials.json.
The user token is stored in ~/.local/secrets/slack/skill.env.
The setup process creates a Slack app and authenticates via OAuth — all automated.
Step 1 — Get a configuration token:
xoxe.xoxp-)Step 2 — Create the Slack app:
bunx tsx scripts/slack-app-create.ts <configToken>
This creates the app on the selected workspace and saves credentials locally.
Step 3 — Authenticate:
bunx tsx scripts/slack-auth.ts
This opens your browser for Slack OAuth. Authorize the app and the token is saved automatically.
bunx tsx scripts/slack-auth.ts --force
If you already have a user token, you can skip the above and set it directly:
# ~/.local/secrets/slack/skill.env
SLACK_USER_TOKEN=xoxp-your-token-here
When the user invokes /slack-setup, follow this workflow:
Check if ~/.local/secrets/slack/skill-credentials.json exists with an app_id:
app_id). If they want to recreate, they must delete the credentials file first.Guide the user to obtain a configuration token:
xoxe.xoxp-)Once the user provides the token, create the app:
bunx tsx scripts/slack-app-create.ts <configToken>
After successful creation, proceed to authentication by running /slack-auth.
/slack-auth again once approved.When the user invokes /slack-auth, follow this workflow:
Check if ~/.local/secrets/slack/skill-credentials.json exists with app credentials (app_id, client_id, client_secret):
/slack-setup first.Check if ~/.local/secrets/slack/skill.env contains SLACK_USER_TOKEN:
--force.Ask the user which mode they need:
Run auth according to mode:
bunx tsx scripts/slack-auth.ts --local./slack-auth again after approval.bunx tsx scripts/slack-auth.ts --remote.WAITING_APPROVAL, or provide OAUTH_ERROR:<message>.--redirected-url <url> or --status WAITING_APPROVAL.Verify token persistence:
~/.local/secrets/slack/skill.env contains SLACK_USER_TOKEN.WAITING_APPROVAL, report pending approval (not a hard failure)./slack-auth.All scripts are run from this skill's directory:
bunx tsx scripts/<script>.ts [args]
bunx tsx scripts/slack-channels.ts list [types] [cursor]
bunx tsx scripts/slack-channels.ts info <channelId>
list — List conversations in the workspace.
types: Comma-separated filter (default: public_channel,private_channel). Options: public_channel, private_channel, im, mpim.cursor: Pagination cursor from previous response.info — Get details about a specific channel.
Examples:
bunx tsx scripts/slack-channels.ts list — list public and private channelsbunx tsx scripts/slack-channels.ts list "im,mpim" — list DMs and group DMsbunx tsx scripts/slack-channels.ts info C01ABC123 — get channel detailsbunx tsx scripts/slack-history.ts <channelId> [limit] [cursor] [oldest] [latest]
Read messages from any conversation (channel, DM, or group DM).
channelId: Channel or DM IDlimit: Max messages (default: 50, max: 1000)cursor: Pagination cursoroldest/latest: Unix timestamps to bound the time rangeExamples:
bunx tsx scripts/slack-history.ts C01ABC123 — latest 50 messagesbunx tsx scripts/slack-history.ts D01ABC123 100 — latest 100 DM messagesbunx tsx scripts/slack-history.ts C01ABC123 50 "" "1700000000" — messages since timestampbunx tsx scripts/slack-threads.ts <channelId> <threadTs> [limit] [cursor]
Read all replies in a thread.
channelId: Channel where the thread livesthreadTs: Timestamp of the parent message (from history output)limit: Max replies (default: 100)Examples:
bunx tsx scripts/slack-threads.ts C01ABC123 1700000000.000001bunx tsx scripts/slack-threads.ts C01ABC123 1700000000.000001 200bunx tsx scripts/slack-send.ts <channelId> <text> [threadTs]
Post a message to a channel, DM, or thread.
channelId: Target channel or DM ID. Use slack-dm-open.ts to get DM channel IDs.text: Message text with Slack mrkdwn formatting (see docs/message-formatting.md)threadTs: Optional parent message timestamp to reply in a threadExamples:
bunx tsx scripts/slack-send.ts C01ABC123 "Hello, team!" — post to channelbunx tsx scripts/slack-send.ts C01ABC123 "Agreed" 1700000000.000001 — reply in threadbunx tsx scripts/slack-send.ts D01ABC123 "Hey, got a minute?" — send DMbunx tsx scripts/slack-dm-open.ts <userIds>
Open a DM or group DM conversation. Returns the channel ID to use with slack-send.ts.
userIds: Comma-separated user IDs. 1 user = DM, 2–8 users = group DM.Examples:
bunx tsx scripts/slack-dm-open.ts U01ABC123 — open DM with one userbunx tsx scripts/slack-dm-open.ts U01ABC123,U02DEF456 — open group DMTo send a DM to a user:
bunx tsx scripts/slack-users.ts search "John"bunx tsx scripts/slack-dm-open.ts U01ABC123bunx tsx scripts/slack-send.ts D01ABC123 "Hey John!"bunx tsx scripts/slack-edit.ts <channelId> <messageTs> <text>
Edit a previously posted message. Note: you can only edit messages that you have posted.
channelId: Channel/DM where the message was postedmessageTs: Timestamp of the message to edit (from send output)text: New message textExamples:
bunx tsx scripts/slack-edit.ts C01ABC123 1700000000.000001 "Updated: correct info here"bunx tsx scripts/slack-react.ts <channelId> <messageTs> <emoji>
Add an emoji reaction to a message.
channelId: Channel/DM where the message ismessageTs: Timestamp of the messageemoji: Emoji name without colons (e.g., thumbsup, white_check_mark)Examples:
bunx tsx scripts/slack-react.ts C01ABC123 1700000000.000001 thumbsupbunx tsx scripts/slack-react.ts C01ABC123 1700000000.000001 eyesbunx tsx scripts/slack-users.ts list [cursor]
bunx tsx scripts/slack-users.ts info <userId>
bunx tsx scripts/slack-users.ts email <email>
bunx tsx scripts/slack-users.ts search <query>
Examples:
bunx tsx scripts/slack-users.ts search "John" — find users matching "John"bunx tsx scripts/slack-users.ts email [email protected] — find user by emailbunx tsx scripts/slack-users.ts info U01ABC123 — get user profilebunx tsx scripts/slack-search.ts <query> [count] [page] [sort] [sortDir]
query: Search query with optional Slack search modifierscount: Results per page (default: 20, max: 100)page: Page number (default: 1)sort: timestamp or score (default: timestamp)sortDir: asc or desc (default: desc)Search modifiers:
from:@username — messages from a specific userin:#channel — messages in a specific channelhas:link / has:reaction — messages with links or reactionsbefore:2024-01-01 / after:2024-01-01 — date filtersduring:january — messages during a time periodExamples:
bunx tsx scripts/slack-search.ts "deployment issue"bunx tsx scripts/slack-search.ts "from:@john in:#engineering" 50bunx tsx scripts/slack-search.ts "has:reaction after:2024-06-01"bunx tsx scripts/slack-emoji-upload.ts <name> <imagePath>
Enterprise Grid only — requires admin.emoji:write scope and org-level installation. Not available on free or standard paid Slack workspaces.
name: Emoji name (lowercase, numbers, hyphens, underscores only)imagePath: Path to image file (PNG, GIF, JPEG; max 128KB; square recommended)Examples:
bunx tsx scripts/slack-emoji-upload.ts party_parrot ./party_parrot.gifbunx tsx scripts/slack-emoji-upload.ts company_logo ./logo.pngSlack uses mrkdwn (not standard Markdown). See docs/message-formatting.md for the full reference.
Quick reference:
*bold*_italic_~strikethrough~`code````code```> quote<https://example.com|Link text><@U01ABC123><#C01ABC123>:emoji_name:bunx tsx scripts/slack-history.ts C01ABC123 20bunx tsx scripts/slack-threads.ts C01ABC123 1700000000.000001bunx tsx scripts/slack-send.ts C01ABC123 "My response" 1700000000.000001bunx tsx scripts/slack-users.ts search "Jane"bunx tsx scripts/slack-dm-open.ts U01ABC123bunx tsx scripts/slack-send.ts D01ABC123 "Hey Jane, quick question..."bunx tsx scripts/slack-search.ts "important announcement in:#general"bunx tsx scripts/slack-react.ts C01ABC123 1700000000.000001 white_check_markts) are used as unique message IDs throughout Slack's API. They look like 1700000000.000001. You receive them from history, thread, send, and search outputs.C (channels), D (DMs), or G (group DMs/private channels). Always use IDs, not names, when calling scripts.chat.update will fail on messages posted by other users.admin.emoji.add requires Enterprise Grid with org-level app installation. Not available on standard workspaces.tools
Create self-contained Python scripts that run with `uv run --script`. Covers PEP 723 inline metadata, ergonomic CLI design (argparse / Cyclopts), rich output formatting, progress bars (alive-progress), interactive prompts (questionary), and fuzzy selection (iterfzf). Use when asked to create a Python script, CLI tool, or automation script.
development
Search and read AI-generated documentation for any public GitHub repository. Use when asked about how an open-source library works, its architecture, API, or internals.
testing
Generate diagrams from declarative text using D2 - modern text-to-diagram language with automatic layouts, themes, and advanced styling. Use when creating architecture diagrams, flowcharts, decision trees, workflow diagrams, sequence flows, or ERDs from text definitions.
development
Interact with Jira and Confluence via REST API - search, create, update issues and pages