用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/marktoda/everclaw --skill add-channel-slack命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | add-channel-slack |
| description | Set up Slack as a messaging channel — app creation, Socket Mode, dual tokens, and verification |
Walk the user through connecting a Slack app to everclaw via Socket Mode. This skill is standalone — run it from /setup or anytime to add Slack.
Work through each phase in order. Use TaskCreate to track progress. Be autonomous: detect what's already done, only ask questions when a real choice is needed. NEVER echo secrets to the terminal or pass them as bash arguments — use the Read and Edit tools to modify .env.
Check .env exists in the project root. If not, tell the user to run /setup first and stop.
Read .env and check if CHANNEL_SLACK is already set.
AskUserQuestion:
Slack is already configured (
CHANNEL_SLACKis set in.env). What would you like to do?
- Keep it — Skip to verification
- Reconfigure — Replace with new tokens
Walk the user through creating a Slack app with Socket Mode. This is the most involved token-based setup.
Tell the user:
Create a Slack app:
- Go to Slack API — Your Apps
- Click Create New App → From scratch
- Name it and select your workspace
Enable Socket Mode:
- Go to Settings → Socket Mode (left sidebar)
- Toggle Enable Socket Mode on
- When prompted, create an App-Level Token with the
connections:writescope- Copy the app token (starts with
xapp-)Create a Bot Token:
- Go to OAuth & Permissions (left sidebar)
- Under Scopes → Bot Token Scopes, add:
chat:writeapp_mentions:read- Click Install to Workspace at the top and authorize
- Copy the Bot User OAuth Token (starts with
xoxb-)Subscribe to Events:
- Go to Event Subscriptions (left sidebar)
- Toggle Enable Events on
- Under Subscribe to bot events, add:
message.channels(messages in public channels)message.im(direct messages)- Click Save Changes
You may need to reinstall the app after adding event subscriptions.
Use AskUserQuestion to collect the bot token:
Paste your Slack Bot User OAuth Token (starts with
xoxb-).
Use AskUserQuestion to collect the app token:
Paste your Slack App-Level Token (starts with
xapp-).
Validate both tokens have the expected prefixes. If not, warn the user and ask them to double-check.
Append CHANNEL_SLACK=<bot_token>|<app_token> to .env using the Edit tool (pipe-delimited, no spaces). If reconfiguring, replace the existing line.
Detect the deployment method and tell the user how to restart:
docker-compose.yml exists in the project root.docker compose restart (or docker compose up --build if not running)."node src/index.ts."Tell the user to restart now and wait for them to confirm it's running. The Slack adapter connects via Socket Mode — no public URL needed.
Check if ALLOWED_CHAT_IDS is already configured in .env (uncommented and non-empty).
If not configured (first channel):
Walk the user through discovery mode:
slack:C04ABC123. Copy this value."AskUserQuestion to collect the chat ID.Edit tool to set ALLOWED_CHAT_IDS=<chat_id> in .env. If the line is commented out, uncomment and set it.If already configured (adding another channel):
AskUserQuestion to collect the chat ID.Edit tool to append the new ID to the existing ALLOWED_CHAT_IDS value (comma-separated).After updating, tell the user to restart again (same instructions as Phase 3).
xoxb-, app token starts with xapp-)message.channels, message.im)ALLOWED_CHAT_IDS contains the right prefixed IDTell the user they can add more channels later with /add-channel-telegram, /add-channel-discord, /add-channel-whatsapp, or /add-channel-gmail.
基于 SOC 职业分类