Skip to main content

slack-setup

Set up the Slack plugin — verify bot token, confirm active workspace. Run when starting fresh, switching workspaces, or troubleshooting auth.

소스 정보

저장소
JCodesMore/slack-for-ai-agents
최근 소스 활동
2026년 5월 4일 08:46
감지된 SKILL.md 언어
영어
스타
4
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
slack:setup
description
Set up the Slack plugin — verify bot token, confirm active workspace. Run when starting fresh, switching workspaces, or troubleshooting auth.
# Slack Plugin Setup You are walking the user through a conversational setup for the Slack plugin. Be friendly and concise. Speak in first person ("I'll check your bot…"), not robot-style. Slack bot tokens are workspace-scoped — one token = one workspace — so this is shorter than the Discord equivalent. There's no "list and pick" step. ## Step 1 — Verify token & identify workspace Call `mcp__slack__slack_whoami`. **Possible outcomes:** - **Returns bot identity** (`ok: true`, with `bot.username`, `team.id`, `team.name`) → token works. The active workspace is now persisted in plugin state. Greet the user and continue to Step 2. > Connected as **`<bot.username>`** in the **`<team.name>`** workspace. I've recorded that as the active workspace — every channel, message, usergroup, etc. I create or modify will go there. - **Returns `isError: true` with "token is not configured"** → user hasn't filled the token field. Tell the user verbatim: > The Slack plugin needs a bot token before I can do anything. > > 1. Open the `/plugin` menu in Claude Code, find **slack**, and paste your bot token (starts with `xoxb-`) into the **Slack Bot Token** field. Get one at https://api.slack.com/apps → your app → **OAuth & Permissions** → **Bot User OAuth Token**. (If you don't have an app yet, click **Create New App** → **From scratch**.) > 2. **Fully restart Claude Code** (quit, reopen) — the MCP server only reads the token at startup. > 3. Then run `/slack:setup` again. Then **stop**. Don't continue to Step 2. - **Returns `isError: true` with `[invalid_auth]` or `[token_revoked]` / `[token_expired]`** → token is set but rejected. > The token Claude Code has stored doesn't work — Slack rejected it (`<error code>`). Most likely it was rotated or the app was uninstalled. Regenerate it at https://api.slack.com/apps → your app → **OAuth & Permissions** → **Reinstall to Workspace**, copy the new **Bot User OAuth Token**, paste it into `/plugin` → **slack** → **Slack Bot Token**, then **fully restart Claude Code**. Then **stop**. - **Returns `isError: true` with `[missing_scope]`** → the bot user works but the scopes the API call requires aren't granted. The error message includes a `needs scope:` hint with the missing scope name. > The bot is missing the scope **`<scope>`**. Open https://api.slack.com/apps → your app → **OAuth & Permissions** → **Scopes** → **Bot Token Scopes**, add `<scope>`, click **Reinstall to Workspace**, copy the regenerated token into `/plugin` → **slack**, and fully restart Claude Code. Then **stop**. - **Other error** → relay the error code and message clearly. Suggest the user check the app exists at https://api.slack.com/apps and that the bot is installed to a workspace. ## Step 2 — Recap If `slack_whoami` succeeded, give the user a short next-steps list: > Setup is done. Try things like: > > - *"Make a #general channel"* > - *"Create a 'Mods' user group"* > - *"Post an announcement to #general with a header, divider, and two buttons"* > - *"Schedule a kickoff message in #project-alpha for tomorrow at 9am"* > > If you ever need to switch to a different workspace, install your bot to that workspace, paste the new bot token into `/plugin`, restart Claude Code, and re-run `/slack:setup`. ## Switching workspaces later If the user runs `/slack:setup` and is already configured, jump straight to Step 1 — the new `slack_whoami` call will overwrite the active-workspace state with whatever workspace the current token belongs to. ## Important rules - **Never paste the user's bot token into chat or any tool argument.** It lives in the keychain via `userConfig`. Only the MCP server subprocess reads it. - **Surface error codes clearly.** Slack's error strings (`invalid_auth`, `missing_scope`, `not_in_channel`, `channel_not_found`, etc.) are well-documented — give the user a copyable code, don't paraphrase it away. - **The session banner already reflects active-workspace state on session start** — you don't need to repeat it unless the user asks. - If a tool call returns `isError: true`, surface the message clearly. Don't retry blindly.
GitHub에서 보기