brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
slack-bot-builderBuilds 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 w…
Independent GitHub snapshot · Automated classification · Original documentation governs
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.
When creating a new Slack bot:
chat:write, commands, app_mentions:read, channels:history, users:readmessage.channels, app_mention, message.imUse Bolt.js (Node) or Bolt for Python:
# Node.js
npm init -y && npm install @slack/bolt dotenv
# Python
pip install slack-bolt python-dotenv
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, SLACK_SIGNING_SECRET, SLACK_APP_TOKEN
└── package.json
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?`);
});
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 textUse https://app.slack.com/block-kit-builder for visual design.
SLACK_APP_TOKEN (starts with xapp-)const app = new App({ token, signingSecret, socketMode: true, appToken })const app = new App({ token, signingSecret })app.start(3000)AwsLambdaReceiverSlack API rate limits:
Handle 429 responses with exponential backoff. The Bolt framework handles basic retry logic.
Input: "Build a Slack bot that posts daily standup prompts at 9am, collects responses via thread, and summarizes them at 5pm."
Output: A Bolt.js app with:
/standup-skip slash command to mark days offInput: "Create a Slack bot that receives PagerDuty webhooks and creates an incident channel with pre-populated runbook links."
Output: A Bolt.js app with:
#incident-{date}-{title} channel/incident-resolve command to archive channel and post timelinetext fallback alongside blocks (for notifications and accessibility)response_type: 'ephemeral') for user-specific responsesawait ack() within 3 seconds for commands and interactionsapp.error() global handler for uncaught errorsrespond() or chat.postMessage later