From dispatch-slack
Create and configure a Slack bot using a Slack refresh token with OAuth token rotation. Use when the user wants to set up a new Slack bot, connect to a Slack workspace, configure Slack integration, or troubleshoot Slack token issues. Also use when someone mentions "refresh token", "Slack bot", or "connect to Slack".
npx claudepluginhub runbear-io/skills --plugin dispatch-slackThis skill is limited to using the following tools:
Set up a Slack bot that connects to a workspace using OAuth token rotation (refresh tokens) and routes messages through Claude Code via the Agent SDK.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
Set up a Slack bot that connects to a workspace using OAuth token rotation (refresh tokens) and routes messages through Claude Code via the Agent SDK.
For how token rotation works, see references/token-rotation.md. For bot architecture overview, see references/architecture.md.
Run the install script to check and install any missing packages:
bash ${CLAUDE_SKILL_DIR}/scripts/install-deps.sh
If the user passed a refresh token as $ARGUMENTS, use it directly and skip to Step 3.
Otherwise, ask the user to:
xoxe-...)Run the script to store the refresh token. This will comment out any previous SLACK_REFRESH_TOKEN value:
node ${CLAUDE_SKILL_DIR}/scripts/store-refresh-token.js <refresh-token>
Ask the user only for the bot name (e.g., "Claude Agent"). Do NOT ask for scopes or other configuration — the skill uses a predefined set of scopes.
This single script handles all configuration via the Slack API:
node ${CLAUDE_SKILL_DIR}/scripts/create-slack-app.js "<bot-name>"
The script automatically:
tooling.tokens.rotateSLACK_REFRESH_TOKEN in .env (token rotation — the old one is invalidated)apps.manifest.create with:
app_mention, message.im) configuredSLACK_APP_ID, SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_SIGNING_SECRET in .envRun the install script, which opens the Slack OAuth page directly in the browser and captures the bot tokens via a local redirect:
node ${CLAUDE_SKILL_DIR}/scripts/install-app.js
The user authorizes in the browser. The script captures bot tokens, stores them in .env, and exits.
The app-level token (xapp-...) is needed for Socket Mode. There is no API to generate it — the user must create it in the Slack UI.
Ask the user to:
https://api.slack.com/apps/<APP_ID>/generalSocket Mode, Scope: connections:writexapp-... token and paste it hereThen store it:
node ${CLAUDE_SKILL_DIR}/scripts/store-app-token.js <xapp-token>
Tell the user to run /dispatch-slack:dispatch to start the bot.
After setup, the user can customize bot behavior with env vars:
CLAUDE_CWD — Working directory for Claude Code (defaults to project root)CLAUDE_SYSTEM_PROMPT — Custom system prompt for the bot's Claude instanceIf the user hits issues, check:
node ${CLAUDE_SKILL_DIR}/scripts/verify-token.js to test the bot tokennode ${CLAUDE_SKILL_DIR}/scripts/check-scopes.js to verify scopes