{
  "schema": "https://ai-atoms.com/schemas/skill-v1.json",
  "type": "skill",
  "id": "skill/slack-bot-builder",
  "version": "1.0.0",
  "name": "Slack Bot Builder",
  "description": "Build Slack apps using the Bolt framework across Python, JavaScript, and Java. Covers Block Kit for rich UIs, interactive components, slash commands, event handling, OAuth installation flows, and W...",
  "system_prompt_fragment": "# Slack Bot Builder\n\n## Patterns\n\n### Bolt App Foundation Pattern\n\nThe Bolt framework is Slack's recommended approach for building apps.\nIt handles authentication, event routing, request verification, and\nHTTP request processing so you can focus on app logic.\n\nKey benefits:\n- Event handling in a few lines of code\n- Security checks and payload validation built-in\n- Organized, consistent patterns\n- Works for experiments and production\n\nAvailable in: Python, JavaScript (Node.js), Java\n\n\n**When to use**: ['Starting any new Slack app', 'Migrating from legacy Slack APIs', 'Building production Slack integrations']\n\n```python\n# Python Bolt App\nfrom slack_bolt import App\nfrom slack_bolt.adapter.socket_mode import SocketModeHandler\nimport os\n\n# Initialize with tokens from environment\napp = App(\n    token=os.environ[\"SLACK_BOT_TOKEN\"],\n    signing_secret=os.environ[\"SLACK_SIGNING_SECRET\"]\n)\n\n# Handle messages containing \"hello\"\n@app.message(\"hello\")\ndef handle_hello(message, say):\n    \"\"\"Respond to messages containing 'hello'.\"\"\"\n    user = message[\"user\"]\n    say(f\"Hey there <@{user}>!\")\n\n# Handle slash command\n@app.command(\"/ticket\")\ndef handle_ticket_command(ack, body, client):\n    \"\"\"Handle /ticket slash command.\"\"\"\n    # Acknowledge immediately (within 3 seconds)\n    ack()\n\n    # Open a modal for ticket creation\n    client.views_open(\n        trigger_id=body[\"trigger_id\"],\n        view={\n            \"type\": \"modal\",\n            \"callback_id\": \"ticket_modal\",\n            \"title\": {\"type\": \"plain_text\", \"text\": \"Create Ticket\"},\n            \"submit\": {\"type\": \"plain_text\", \"text\": \"Submit\"},\n            \"blocks\": [\n                {\n                    \"type\": \"input\",\n                    \"block_id\": \"title_block\",\n                    \"element\": {\n                        \"type\": \"plain_text_input\",\n                        \"action_id\": \"title_input\"\n                    },\n                    \"label\": {\"type\": \"plain_text\", \"text\": \"Title\"}\n                },\n                {\n                    \"type\": \"input\",\n                    \"block_id\": \"desc_block\",\n                    \"element\": {\n                        \"type\": \"plain_text_input\",\n                        \"multiline\": True,\n                        \"action_id\": \"desc_input\"\n                    },\n                    \"label\": {\"type\": \"plain_text\", \"text\": \"Description\"}\n                },\n                {\n                    \"type\": \"input\",\n                    \"block_id\": \"priority_block\",\n                    \"element\": {\n                        \"type\": \"static_select\",\n                        \"action_id\": \"priority_select\",\n   \n```\n\n### Block Kit UI Pattern\n\nBlock Kit is Slack's UI framework for building rich, interactive messages.\nCompose messages using blocks (sections, actions, inputs) and elements\n(buttons, menus, text inputs).\n\nLimits:\n- Up to 50 blocks per message\n- Up to 100 blocks in modals/Home tabs\n- Block text limited to 3000 characters\n\nUse Block Kit Builder to prototype: https://app.slack.com/block-kit-builder\n\n\n**When to use**: ['Building rich message layouts', 'Adding interactive components to messages', 'Creating forms in modals', 'Building Home tab experiences']\n\n```python\nfrom slack_bolt import App\nimport os\n\napp = App(token=os.environ[\"SLACK_BOT_TOKEN\"])\n\ndef build_notification_blocks(incident: dict) -> list:\n    \"\"\"Build Block Kit blocks for incident notification.\"\"\"\n    severity_emoji = {\n        \"critical\": \":red_circle:\",\n        \"high\": \":large_orange_circle:\",\n        \"medium\": \":large_yellow_circle:\",\n        \"low\": \":white_circle:\"\n    }\n\n    return [\n        # Header\n        {\n            \"type\": \"header\",\n            \"text\": {\n                \"type\": \"plain_text\",\n                \"text\": f\"{severity_emoji.get(incident['severity'], '')} Incident Alert\"\n            }\n        },\n        # Details section\n        {\n            \"type\": \"section\",\n            \"fields\": [\n                {\n                    \"type\": \"mrkdwn\",\n                    \"text\": f\"*Incident:*\\n{incident['title']}\"\n                },\n                {\n                    \"type\": \"mrkdwn\",\n                    \"text\": f\"*Severity:*\\n{incident['severity'].upper()}\"\n                },\n                {\n                    \"type\": \"mrkdwn\",\n                    \"text\": f\"*Service:*\\n{incident['service']}\"\n                },\n                {\n                    \"type\": \"mrkdwn\",\n                    \"text\": f\"*Reported:*\\n<!date^{incident['timestamp']}^{date_short} {time}|{incident['timestamp']}>\"\n                }\n            ]\n        },\n        # Description\n        {\n            \"type\": \"section\",\n            \"text\": {\n                \"type\": \"mrkdwn\",\n                \"text\": f\"*Description:*\\n{incident['description'][:2000]}\"\n            }\n        },\n        # Divider\n        {\"type\": \"divider\"},\n        # Action buttons\n        {\n            \"type\": \"actions\",\n            \"block_id\": f\"incident_actions_{incident['id']}\",\n            \"elements\": [\n                {\n                    \"type\": \"button\",\n                    \"text\": {\"type\": \"plain_text\", \"text\": \"Acknowledge\"},\n                    \"style\": \"primary\",\n                    \"action_id\": \"acknowle\n```\n\n### OAuth Installation Pattern\n\nEnable users to install your app in their workspaces via OAuth 2.0.\nBolt handles most of the OAuth flow, but you need to configure it\nand store tokens securely.\n\nKey OAuth concepts:\n- Scopes define permissions (request minimum needed)\n- Tokens are workspace-specific\n- Installation data must be stored persistently\n- Users can add scopes later (additive)\n\n70% of users abandon installation when confronted with excessive\npermission requests - request only what you need!\n\n\n**When to use**: ['Distributing app to multiple workspaces', 'Building public Slack apps', 'Enterprise-grade integrations']\n\n```python\nfrom slack_bolt import App\nfrom slack_bolt.oauth.oauth_settings import OAuthSettings\nfrom slack_sdk.oauth.installation_store import FileInstallationStore\nfrom slack_sdk.oauth.state_store import FileOAuthStateStore\nimport os\n\n# For production, use database-backed stores\n# For example: PostgreSQL, MongoDB, Redis\n\nclass DatabaseInstallationStore:\n    \"\"\"Store installation data in your database.\"\"\"\n\n    async def save(self, installation):\n        \"\"\"Save installation when user completes OAuth.\"\"\"\n        await db.installations.upsert({\n            \"team_id\": installation.team_id,\n            \"enterprise_id\": installation.enterprise_id,\n            \"bot_token\": encrypt(installation.bot_token),\n            \"bot_user_id\": installation.bot_user_id,\n            \"bot_scopes\": installation.bot_scopes,\n            \"user_id\": installation.user_id,\n            \"installed_at\": installation.installed_at\n        })\n\n    async def find_installation(self, *, enterprise_id, team_id, user_id=None, is_enterprise_install=False):\n        \"\"\"Find installation for a workspace.\"\"\"\n        record = await db.installations.find_one({\n            \"team_id\": team_id,\n            \"enterprise_id\": enterprise_id\n        })\n\n        if record:\n            return Installation(\n                bot_token=decrypt(record[\"bot_token\"]),\n                # ... other fields\n            )\n        return None\n\n# Initialize OAuth-enabled app\napp = App(\n    signing_secret=os.environ[\"SLACK_SIGNING_SECRET\"],\n    oauth_settings=OAuthSettings(\n        client_id=os.environ[\"SLACK_CLIENT_ID\"],\n        client_secret=os.environ[\"SLACK_CLIENT_SECRET\"],\n        scopes=[\n            \"channels:history\",\n            \"channels:read\",\n            \"chat:write\",\n            \"commands\",\n            \"users:read\"\n        ],\n        user_scopes=[],  # User token scopes if needed\n        installation_store=DatabaseInstallationStore(),\n        state_store=FileOAuthStateStore(expiration_seconds=600)\n    )\n)\n\n# OAuth routes are handled a\n```\n\n## ⚠️ Sharp Edges\n\n| Issue | Severity | Solution |\n|-------|----------|----------|\n| Issue | critical | ## Acknowledge immediately, process later |\n| Issue | critical | ## Proper state validation |\n| Issue | critical | ## Never hardcode or log tokens |\n| Issue | high | ## Request minimum required scopes |\n| Issue | medium | ## Know and respect the limits |\n| Issue | high | ## Socket Mode: Only for development |\n| Issue | critical | ## Bolt handles this automatically |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.",
  "applicable_domains": [
    "frontend"
  ],
  "category": "frontend",
  "invocation": [
    "/slack-bot-builder"
  ],
  "authored_by": "claudeskills.in community",
  "source_url": "https://claudeskills.in/skill/slack-bot-builder",
  "provenance": {
    "source": "claudeskills.in",
    "source_url": "https://claudeskills.in/skill/slack-bot-builder",
    "license": "Apache-2.0",
    "imported_at": "2026-09-03",
    "notes": "Aggregated by claudeskills.in from community GitHub lists. Upstream as recorded by the aggregator: vibeship-spawner-skills (Apache 2.0)."
  },
  "tags": [
    "claudeskills",
    "frontend"
  ],
  "lifecycle": "draft"
}