Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

slack

/slack

Wspiera budowę botów Slack w Bolt SDK dla JavaScript i Pythona, interaktywne wiadomości Block Kit, polecenia slash, webhooki przychodzące, przetwarzanie zdarzeń i dystrybucję aplikacji enterprise.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wspiera budowę botów Slack w Bolt SDK dla JavaScript i Pythona, interaktywne wiadomości Block Kit, polecenia slash, webhooki przychodzące, przetwarzanie zdarzeń i dystrybucję aplikacji enterprise.

Oryginalny opis (EN)

Expert Slack platform assistance covering Bolt SDK (JavaScript/Python), Block Kit visual interfaces, slash commands, incoming webhooks, and enterprise app distribution. Use when building Slack bots, designing interactive Block Kit messages, processing Slack events, or managing workspace automations.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 235 linii, 849 słów
Podgląd SKILL.md
---
name: slack
description: Expert Slack platform assistance covering Bolt SDK (JavaScript/Python), Block Kit visual interfaces, slash commands, incoming webhooks, and enterprise app distribution. Use when building Slack bots, designing interactive Block Kit messages, processing Slack events, or managing workspace automations.
---

# Slack

The Slack Platform allows engineering teams to build custom workflows, Bolt SDK automations, interactive Block Kit interfaces, and webhook alerts for team collaboration.

## When to Use

- **ChatOps & Incident Management**: Building bots to trigger deployments, scale Kubernetes pods, and declare incident war rooms.
- **Automated Workflow Notifications**: Dispatching rich interactive alerts from CI/CD pipelines, PagerDuty, and cloud monitoring.
- **Interactive Engineering Workflows**: Creating modal dialogs, approval buttons, and slash commands using Slack Bolt SDK.
- **Team Collaboration & Knowledge Triage**: Searching message histories, archiving technical decisions, and managing channels.

## Quick Start

### 1. Minimal Bolt App (Node.js)

```javascript
import { App } from "@slack/bolt";

const app = new App({
  token: process.env.SLACK_BOT_TOKEN,
  signingSecret: process.env.SLACK_SIGNING_SECRET,
  socketMode: true,
  appToken: process.env.SLACK_APP_TOKEN,
});

app.command("/deploy", async ({ command, ack, respond }) => {
  await ack();
  await respond({
    text: `🚀 Initiated deploy for ${command.text}!`,
  });
});

(async () => {
  await app.start(process.env.PORT || 3000);
  console.log("⚡️ Bolt app is running!");
})();
```

### 2. Install Bolt

```bash
npm install @slack/bolt
```

## Core Concepts

### Modern Slack Bot with Bolt SDK for JavaScript

Creating an interactive Slack app handling slash commands, button clicks, and modal submissions:

```typescript
import { App, LogLevel } from "@slack/bolt";

const app = new App({
  token: process.env.SLACK_BOT_TOKEN,
  signingSecret: process.env.SLACK_SIGNING_SECRET,
  socketMode: true,
  appToken: process.env.SLACK_APP_TOKEN,
  logLevel: LogLevel.INFO,
});

// Handle /deploy slash command
app.command("/deploy", async ({ command, ack, client }) => {
  await ack();

  // Open an interactive modal dialog
  await client.views.open({
    trigger_id: command.trigger_id,
    view: {
      type: "modal",
      callback_id: "deploy_modal",
      title: { type: "plain_text", text: "Production Deployment" },
      submit: { type: "plain_text", text: "Deploy Now" },
      close: { type: "plain_text", text: "Cancel" },
      blocks: [
        {
          type: "input",
          block_id: "service_block",
          element: {
            type: "static_select",
            action_id: "service_select",
            placeholder: { type: "plain_text", text: "Select a microservice" },
            options: [
              {
                text: { type: "plain_text", text: "Auth Service" },
                value: "auth",
              },
              {
                text: { type: "plain_text", text: "Billing Service" },
                value: "billing",
              },
            ],
          },
          label: { type: "plain_text", text: "Target Service" },
        },
      ],
    },
  });
});

// Handle Modal Submission
app.view("deploy_modal", async ({ ack, body, view, client }) => {
  await ack();
  const selectedService =
    view.state.values.service_block.service_select.selected_option?.value;

  // Post confirmation message to incident channel
  await client.chat.postMessage({
    channel: process.env.SLACK_DEPLOY_CHANNEL_ID!,
    text: `:rocket: Deployment initiated for *${selectedService}* by <@${body.user.id}>`,
  });
});

(async () => {
  await app.start();
  console.log("⚡️ Slack Bolt app running in Socket Mode!");
})();
```

### Rich Block Kit Alerts for CI/CD Failure

Sending high-priority Block Kit notifications via Webhook:

```json
{
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "🚨 Production Pipeline Build Failed",
        "emoji": true
      }
    },
    {
      "type": "section",
      "fields": [
        { "type": "mrkdwn", "text": "*Service:*\nPayments API" },
        { "type": "mrkdwn", "text": "*Environment:*\nProduction" },
        { "type": "mrkdwn", "text": "*Branch:*\n`main`" },
        { "type": "mrkdwn", "text": "*Triggered By:*\n`ci-runner-04`" }
      ]
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": { "type": "plain_text", "text": "View Build Logs" },
          "url": "https://ci.example.com/build/12345",
          "style": "danger"
        }
      ]
    }
  ]
}
```

## Common Patterns

### Interactive Block Kit Message with Action Handler

**Problem**: Send structured notifications with interactive buttons and handle user clicks.  
**Solution**: Construct Block Kit JSON and bind action listeners in Bolt.

```javascript
// Post message with action button
await app.client.chat.postMessage({
  channel: "C12345678",
  blocks: [
    {
      type: "section",
      text: { type: "mrkdwn", text: "*Production Alert*: High CPU detected." },
    },
    {
      type: "actions",
      elements: [
        {
          type: "button",
          text: { type: "plain_text", text: "Acknowledge" },
          style: "primary",
          action_id: "ack_alert_button",
          value: "alert_42",
        },
      ],
    },
  ],
});

// Handle button interaction
app.action("ack_alert_button", async ({ body, ack, say }) => {
  await ack();
  await say(`<@${body.user.id}> acknowledged the incident!`);
});
```

### Incoming Webhook Simple Alert

**Problem**: Send quick status alerts from CI/CD pipeline without full bot setup.  
**Solution**: POST JSON payload to webhook URL.

```bash
curl -X POST -H 'Content-type: application/json' \
  --data '{"text":"Build #415 passed successfully on main."}' \
  "$SLACK_WEBHOOK_URL"
```

## Best Practices

**Do**:

- Use **Socket Mode** for internal enterprise bots to eliminate the need for exposing public webhook ingress URLs.
- Acknowledge events and commands within 3 seconds (`await ack()`) to prevent Slack API timeouts.
- Construct structured messages using **Block Kit Builder** rather than legacy plaintext formatting.
- Store bot tokens (`xoxb-`) and signing secrets in encrypted secret managers (AWS SSM, Vault).

**Don't**:

- Broadcast unaggregated alerts to `@channel` or `@here` for non-critical, informational events.
- Log sensitive customer data or authorization credentials in Slack message channels.
- Run long synchronous background jobs inside the initial command handler; delegate to background workers.

## Troubleshooting

| Error                                                   | Cause                                               | Solution                                                                                             |
| ------------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `dispatch_failed` when running slash command            | App took longer than 3,000ms to acknowledge request | Call `await ack()` immediately before executing asynchronous long-running tasks.                     |
| `invalid_auth`                                          | Invalid bot token or scopes missing                 | Verify bot token starts with `xoxb-` and requested scopes (`chat:write`, `commands`) are authorized. |
| Interactive buttons do nothing / show exclamation error | Request URL not configured in Slack App dashboard   | Under **Interactivity & Shortcuts**, enable Interactivity and set Request URL or use Socket Mode.    |

## References

- [Slack API](https://api.slack.com/)

Wersje

RepozytoriumWynikLicencja
Ta strona · G1Joshi/Agent-Skills100MIT
magnus919/agent-skills100MIT
vercel-labs/agent-browser100Apache-2.0
leeguooooo/chrome-use100Apache-2.0
intentic/intentic100MIT
cowork-os/cowork-os100MIT
hyperfx-ai/marketing-skills100MIT
asgeirtj/system_prompts_leaks100CC0-1.0
bitterbot-ai/bitterbot-desktop100MIT

Migawka bazy z 28.10.2026 · wersja paczki 1573a90b2c74 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100slack-expert
    Wspiera tworzenie botów Slack, interfejsów Block Kit, Events API, poleceń slash, przepływów OAuth i dystrybucji aplikacji, także w Pythonie i z Bolt.
  • 100slack-skill
    Wspiera tworzenie aplikacji i integracji API Slack z frameworkiem Bolt, interfejsem Block Kit, obsługą zdarzeń i poleceniami slash.
  • 100slack-bot-builder
    Buduje aplikacje Slack we frameworku Bolt w Pythonie, JavaScript i Javie, z Block Kit, komponentami interaktywnymi, poleceniami slash, zdarzeniami, przepływami OAuth i Workflow Builder, według praktyk produkcyjnych.
  • 90slack-app-stinger
    Pomaga budować aplikacje Slack z Bolt: slash commands, Block Kit, modale, Events API, instalacje OAuth i zgłoszenie do Marketplace.
  • 100slack-bot-builder
    Buduje boty i integracje Slack przez Slack API i framework Bolt: polecenia slash, zdarzenia, wiadomości na kanały, interaktywne modale i bloki, workflowy oraz połączenia z innymi usługami.
  • 91slack-agent
    Podpowiada wzorce tworzenia botów Slacka w Chat SDK, Bolt for JavaScript, @chat-adapter/slack i @slack/bolt, wraz z wymaganiami testów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.