slack-bot-builder
БесплатноБез исполняемых скриптовНе проверенBuilds Slack bots and integrations using the Slack API (Bolt framework). Use when the user wants to create a Slack bot, build slash commands, handle Slack…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Slack Bot Builder
Overview
Builds production-ready Slack bots and integrations using the Bolt framework. Handles app setup, event subscriptions, slash commands, interactive components (buttons, modals, dropdowns), message formatting with Block Kit, and deployment. Covers both simple webhook-based notifications and full conversational bots.
Instructions
1. App Setup
When creating a new Slack bot:
- Guide the user through https://api.slack.com/apps → Create New App
- Recommend "From a manifest" for faster setup
- Generate the app manifest based on required scopes and features (YAML or JSON; paste it in the app's Settings, or when creating the app "From a manifest"). A Socket Mode starting point:
display_information:
name: Deploy Helper
features:
bot_user:
display_name: Deploy Helper
always_online: false
slash_commands:
- command: /deploy
description: Deploy a service to staging
usage_hint: "[service]"
should_escape: false
oauth_config:
scopes:
bot:
- app_mentions:read
- chat:write
- commands
- channels:history
- im:history
- users:read
settings:
event_subscriptions:
bot_events:
- app_mention
- message.channels
- message.im
interactivity:
is_enabled: true
org_deploy_enabled: false
socket_mode_enabled: true
token_rotation_enabled: false
Reference: https://docs.slack.dev/reference/app-manifest. In HTTP mode, add request_url under event_subscriptions and interactivity, and url on each slash command. After installing, copy the Bot User OAuth Token (xoxb-) from OAuth & Permissions, and create the app-level token (xapp-, scope connections:write) under Basic Information.
- Set up the following based on needs:
- Bot Token Scopes:
chat:write,commands,app_mentions:read,channels:history(formessage.channels),im:history(formessage.im),users:read - Event Subscriptions:
message.channels,app_mention,message.im(in Socket Mode no request URL is needed) - Interactivity: Enable for buttons, modals, dropdowns
- Slash Commands: Register command names and descriptions
- Bot Token Scopes:
2. Project Scaffolding
Use Bolt.js (Node) or Bolt for Python:
# Node.js (run with: node --env-file=.env app.js)
npm init -y && npm install @slack/bolt
# In CI and production, commit package-lock.json and install with `npm ci`,
# which installs the exact, integrity-checked versions from the lockfile.
# Python
pip install slack-bolt
Python equivalent of the Socket Mode setup (tokens from the environment):
import os
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
app = App(token=os.environ["SLACK_BOT_TOKEN"])
@app.command("/deploy")
def deploy(ack, respond, command):
ack() # within 3 seconds
respond(f"Deploying {command['text']} to staging...")
if __name__ == "__main__":
SocketModeHandler(app, os.environ["SLACK_APP_TOKEN"]).start()
Standard project structure:
slack-bot/
├── app.js # Main entry, Bolt app initialization
├── listeners/
│ ├── commands.js # Slash command handlers
│ ├── events.js # Event handlers (messages, mentions)
│ ├── actions.js # Interactive component handlers
│ └── views.js # Modal submission handlers
├── services/ # Business logic
├── blocks/ # Block Kit message templates
├── .env # SLACK_BOT_TOKEN (xoxb-), SLACK_SIGNING_SECRET, SLACK_APP_TOKEN (xapp-); gitignored
└── package.json
3. Core Patterns
Sending messages:
await client.chat.postMessage({
channel: channelId,
blocks: [/* Block Kit blocks */],
text: "Fallback text for notifications"
});
Slash commands:
app.command('/deploy', async ({ command, ack, respond }) => {
await ack();
await respond({
blocks: buildDeployConfirmation(command.text),
response_type: 'ephemeral'
});
});
Interactive modals:
app.action('button_click', async ({ body, ack, client }) => {
await ack();
await client.views.open({
trigger_id: body.trigger_id,
view: buildModalView()
});
});
Event handling:
app.event('app_mention', async ({ event, say }) => {
await say(`Hey <@${event.user}>! How can I help?`);
});
4. Block Kit Messages
Always use Block Kit for rich messages. Key block types:
section— text with optional accessory (button, image, overflow)actions— row of interactive elementsinput— form fields in modalsdivider— visual separatorcontext— small metadata textheader— bold large text
Use https://app.slack.com/block-kit-builder for visual design.
5. Socket Mode vs HTTP
- Socket Mode (recommended for internal bots and local development): no public URL needed, uses a WebSocket
- Create an app-level token (
xapp-) with theconnections:writescope and
- Create an app-level token (
Установить slack-bot-builder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл slack-bot-builder?
Builds Slack bots and integrations using the Slack API (Bolt framework). Use when the user wants to create a Slack bot, build slash commands, handle Slack events, send messages to channels, build interactive modals/blocks, create Slack workflows, or integrate services with Slack. Trigger words: slack bot, slack integration, slash command, slack app, slack webhook, slack blocks, slack modal, bolt framework, slack events, slack notification, slack automation.
Как установить скилл slack-bot-builder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл slack-bot-builder запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic