Skip to content

Commit 85e5e26

Browse files
committed
Update Slack skills for Block Kit 2026 changes
1 parent 025d8af commit 85e5e26

8 files changed

Lines changed: 220 additions & 28 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ npx skills add https://github.com/ccheney/robust-skills --skill slack-mrkdwn
6464

6565
### slack-block-kit
6666

67-
Slack Block Kit UI framework for building rich message layouts, modals, and App Home views. Use when constructing blocks arrays, creating modals or App Home views, adding interactive elements, implementing link unfurling with Work Objects, or designing rich message layouts. Covers all 15 block types, 20 interactive elements, composition objects, surfaces, and Work Objects.
67+
Slack Block Kit UI framework for building rich message layouts, modals, App Home views, and AI agent responses. Use when constructing blocks arrays, creating modals or App Home views, adding interactive elements, implementing link unfurling with Work Objects, streaming agent output, or designing rich message layouts. Covers all 18 block types, 20 interactive elements, composition objects, surfaces, and Work Objects.
6868

6969
```bash
7070
npx skills add https://github.com/ccheney/robust-skills --skill slack-block-kit

skills/slack-block-kit/SKILL.md

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: slack-block-kit
3-
description: Proactively apply when generating Slack API payloads with blocks, chat.postMessage calls with structured content, or views.open/views.publish calls. Triggers on Block Kit, Slack blocks, section block, actions block, header block, divider block, context block, table block, markdown block, rich text block, image block, input block, video block, context_actions block, plan block, task_card block, Slack modal, Slack App Home, Slack surfaces, Slack interactive elements, Slack button, Slack select menu, Slack overflow, Slack datepicker, Slack checkboxes, Slack radio buttons, Work Objects, Slack link unfurl, chat.postMessage blocks, views.open, views.update, views.push, views.publish, Slack composition objects. Use when building Block Kit payloads, constructing blocks arrays, creating modals or App Home views, adding interactive elements, implementing link unfurling with Work Objects, or designing rich message layouts. Slack Block Kit UI framework for building rich message layouts, modals, and App Home views.
3+
description: Proactively apply when generating Slack API payloads with blocks, chat.postMessage calls with structured content, streaming AI responses, or views.open/views.publish calls. Triggers on Block Kit, Slack blocks, section block, actions block, header block, divider block, context block, alert block, card block, carousel block, table block, markdown block, rich text block, image block, input block, video block, context_actions block, plan block, task_card block, chat.startStream, chat.appendStream, chat.stopStream, Slack modal, Slack App Home, Slack surfaces, Slack interactive elements, Slack button, Slack select menu, Slack overflow, Slack datepicker, Slack checkboxes, Slack radio buttons, Work Objects, Slack link unfurl, chat.postMessage blocks, views.open, views.update, views.push, views.publish, Slack composition objects. Use when building Block Kit payloads, constructing blocks arrays, creating modals or App Home views, adding interactive elements, implementing link unfurling with Work Objects, streaming agent output, or designing rich message layouts. Slack Block Kit UI framework for building rich message layouts, modals, App Home views, and AI agent responses.
44
---
55

66
# Slack Block Kit
@@ -35,6 +35,9 @@ What am I rendering?
3535
├─ Small metadata or secondary info → context (images + text, 10 max)
3636
├─ Horizontal separator → divider
3737
├─ Buttons, menus, date pickers → actions (25 elements max)
38+
├─ Status, warning, success callout → alert (severity + text)
39+
├─ Compact entity or summary preview → card (optional image/actions)
40+
├─ Multiple comparable cards/options → carousel (1-10 cards)
3841
├─ Standalone image → image (image_url or slack_file)
3942
├─ Formatted text with lists, quotes → rich_text (nested sub-elements)
4043
├─ Tabular data → table (100 rows, 20 cols, 1 per msg)
@@ -53,7 +56,8 @@ What am I rendering?
5356
Content source?
5457
├─ Short formatted text, labels, fields → mrkdwn in section/context
5558
├─ Long-form LLM-generated content → markdown block (standard MD)
56-
├─ Need tables inside blocks → mrkdwn in section (manual layout)
59+
├─ LLM-generated tables/task lists/code → markdown block
60+
├─ Programmatic tabular data → table block
5761
├─ Need headings → markdown block or header blocks
5862
└─ Mixed: structured layout + prose → section/header blocks + markdown block
5963
```
@@ -138,6 +142,54 @@ Interactive elements: buttons, select menus, overflow menus, date pickers. Max 2
138142

139143
Button styles: `primary` (green), `danger` (red), or omit for default. Use `primary` sparingly — one per set. Action IDs must be unique within the message.
140144

145+
### alert
146+
147+
Callout for status, risk, confirmation, or urgency. Text accepts `plain_text` or `mrkdwn`. `level`: `default`, `info`, `warning`, `error`, or `success` (defaults to `default`).
148+
149+
```json
150+
{
151+
"type": "alert",
152+
"text": { "type": "mrkdwn", "text": "*Dependency conflict detected* before deploy." },
153+
"level": "warning"
154+
}
155+
```
156+
157+
### card
158+
159+
Compact, scannable preview for entities, summaries, records, or agent results. At least one of `hero_image`, `title`, `actions`, or `body` is required. There is currently no size attribute.
160+
161+
```json
162+
{
163+
"type": "card",
164+
"title": { "type": "mrkdwn", "text": "Daily Standup Reminder" },
165+
"subtitle": { "type": "mrkdwn", "text": "Runs every weekday at *9:00 AM*" },
166+
"body": { "type": "mrkdwn", "text": "Last run: Today at 9:00 AM. Status: Success" },
167+
"actions": [
168+
{
169+
"type": "button",
170+
"text": { "type": "plain_text", "text": "View Logs" },
171+
"action_id": "view_logs"
172+
}
173+
]
174+
}
175+
```
176+
177+
Fields: `icon` and `hero_image` are image objects; `title`, `subtitle`, and `body` are text objects; `actions` is an array of button elements. Title/subtitle max 150 chars. Body max 200 chars.
178+
179+
### carousel
180+
181+
Horizontal, scrollable group of card blocks for options, recommendations, search results, or next steps. Must contain 1-10 cards.
182+
183+
```json
184+
{
185+
"type": "carousel",
186+
"elements": [
187+
{ "type": "card", "title": { "type": "mrkdwn", "text": "Option A" } },
188+
{ "type": "card", "title": { "type": "mrkdwn", "text": "Option B" } }
189+
]
190+
}
191+
```
192+
141193
### image
142194

143195
Standalone image with alt text. Provide either `image_url` (public, max 3000 chars) or `slack_file` object. Formats: png, jpg, jpeg, gif.
@@ -218,7 +270,7 @@ Standard Markdown rendering for AI app output. Messages only.
218270
{ "type": "markdown", "text": "**Bold**, *italic*, [link](https://example.com)\n\n## Heading\n\n- List item" }
219271
```
220272

221-
Supports: bold, italic, strikethrough, links, headers, ordered/unordered lists, inline code, code blocks, block quotes. Does NOT support: syntax highlighting, horizontal rules, tables, task lists. Cumulative 12,000 char limit per payload. `block_id` is ignored.
273+
Supports: bold, italic, strikethrough, links, headers, ordered/unordered lists, inline code, code blocks with optional syntax highlighting, block quotes, horizontal rules/dividers, tables, task lists, and character escaping. Images render as hyperlink text. Cumulative 12,000 char limit per payload. `block_id` is ignored. A single markdown block may translate into multiple Slack blocks.
222274

223275
### context_actions
224276

@@ -249,6 +301,22 @@ Container for sequential task cards, designed for AI agent output. Messages only
249301

250302
Task status values: `pending`, `in_progress`, `complete`, `error`. Each task is a `task_card` block with optional `details`, `output` (rich_text), and `sources` (url elements).
251303

304+
### streaming agent output
305+
306+
Use `chat.startStream`, `chat.appendStream`, and `chat.stopStream` for live AI responses. Streamed messages should be replies to a user request (`thread_ts` required on start) and require `chat:write`.
307+
308+
`chunks` can include:
309+
- `markdown_text` chunks for standard Markdown text
310+
- `task_update` chunks for timeline-style task progress
311+
- `plan_update` chunks for updating a plan title
312+
- `blocks` chunks for arrays of Block Kit blocks
313+
314+
Set `task_display_mode` on `chat.startStream`:
315+
- `timeline` (default): tasks appear individually in sequence
316+
- `plan`: tasks appear grouped in one plan, with the first task placement determining the plan placement
317+
318+
`chat.stopStream` can add final `blocks` rendered after streamed `chunks` or `markdown_text`. It has a separate 50-block limit from streamed `blocks` chunks, allowing up to 100 total finalized blocks.
319+
252320
### file
253321

254322
Remote file reference. Read-only. Cannot be directly added to messages by apps.
@@ -303,6 +371,10 @@ See [references/COMPOSITION.md](references/COMPOSITION.md) for full property tab
303371
| Context elements | 10 |
304372
| Actions elements | 25 |
305373
| Context actions elements | 5 |
374+
| Alert levels | `default`, `info`, `warning`, `error`, `success` |
375+
| Card title/subtitle | 150 chars |
376+
| Card body | 200 chars |
377+
| Carousel cards | 1-10 |
306378
| Table rows | 100 |
307379
| Table columns | 20 |
308380
| Tables per message | 1 |
@@ -328,6 +400,7 @@ See [references/COMPOSITION.md](references/COMPOSITION.md) for full property tab
328400
| `text` and `blocks` diverge | Confusing: notification says one thing, chat shows another | Keep semantically aligned |
329401
| Blocks for simple replies | Visual noise for short responses | Use `text` only for simple replies |
330402
| 2+ tables in one message | `invalid_attachments` error | One table per message |
403+
| Using blog-nested `card`/`alert` payloads | Invalid against current reference docs | Put `title`, `body`, `text`, and `level` directly on the block |
331404
| `mrkdwn` in header text | Ignored — headers only accept `plain_text` | Use `plain_text` type |
332405
| Long header text | Silently truncated at 150 chars | Keep under 150 |
333406
| Missing `alt_text` on images | Accessibility failure, API may reject | Always include alt_text |
@@ -387,7 +460,7 @@ Work Objects use `chat.unfurl` with a `metadata` parameter containing entity typ
387460
| File | Purpose |
388461
|------|---------|
389462
| [references/CHEATSHEET.md](references/CHEATSHEET.md) | Quick reference: all blocks, elements, limits at a glance |
390-
| [references/BLOCKS.md](references/BLOCKS.md) | All 15 block types with full property tables and constraints |
463+
| [references/BLOCKS.md](references/BLOCKS.md) | All 18 block types with full property tables and constraints |
391464
| [references/ELEMENTS.md](references/ELEMENTS.md) | All 20 interactive elements with properties and constraints |
392465
| [references/COMPOSITION.md](references/COMPOSITION.md) | Composition objects: text, option, confirmation, filters |
393466
| [references/RICH-TEXT.md](references/RICH-TEXT.md) | Rich text block deep dive: sub-elements, inline types, styles |
@@ -398,8 +471,12 @@ Work Objects use `chat.unfurl` with a `metadata` parameter containing entity typ
398471

399472
- [Block Kit Reference](https://docs.slack.dev/reference/block-kit) — Slack
400473
- [Block Kit Blocks](https://docs.slack.dev/reference/block-kit/blocks) — Slack
474+
- [Alert Block](https://docs.slack.dev/reference/block-kit/blocks/alert-block) — Slack
475+
- [Card Block](https://docs.slack.dev/reference/block-kit/blocks/card-block) — Slack
476+
- [Carousel Block](https://docs.slack.dev/reference/block-kit/blocks/carousel-block) — Slack
401477
- [Block Kit Elements](https://docs.slack.dev/reference/block-kit/block-elements) — Slack
402478
- [Block Kit Composition Objects](https://docs.slack.dev/reference/block-kit/composition-objects) — Slack
479+
- [Streaming Messages](https://docs.slack.dev/reference/methods/chat.startStream/) — Slack
403480
- [Work Objects](https://docs.slack.dev/messaging/work-objects) — Slack
404481
- [Surfaces](https://docs.slack.dev/surfaces) — Slack
405482
- [Modals](https://docs.slack.dev/surfaces/modals) — Slack

skills/slack-block-kit/references/BLOCKS.md

Lines changed: 117 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
> Sources:
44
> - [Block Kit Blocks](https://docs.slack.dev/reference/block-kit/blocks) — Slack
55
> - [Block Kit Reference](https://docs.slack.dev/reference/block-kit) — Slack
6+
> - [Alert Block](https://docs.slack.dev/reference/block-kit/blocks/alert-block) — Slack
7+
> - [Card Block](https://docs.slack.dev/reference/block-kit/blocks/card-block) — Slack
8+
> - [Carousel Block](https://docs.slack.dev/reference/block-kit/blocks/carousel-block) — Slack
69
7-
All 15 block types with full property tables, constraints, and surface compatibility.
10+
All 18 block types with full property tables, constraints, and surface compatibility.
811

912
---
1013

@@ -150,7 +153,108 @@ Container for interactive elements.
150153

151154
---
152155

153-
## 6. Image Block
156+
## 6. Alert Block
157+
158+
Callout for status, risk, confirmation, or urgency.
159+
160+
| Property | Type | Required | Constraints |
161+
|----------|------|----------|-------------|
162+
| `type` | string | Yes | Must be `"alert"` |
163+
| `text` | text object | Yes | `plain_text` or `mrkdwn` |
164+
| `level` | string | No | `"default"`, `"info"`, `"warning"`, `"error"`, or `"success"`; defaults to `"default"` |
165+
| `block_id` | string | No | Max 255 chars |
166+
167+
**Surfaces:** Messages
168+
169+
```json
170+
{
171+
"type": "alert",
172+
"text": {
173+
"type": "mrkdwn",
174+
"text": "*Dependency conflict detected* before deploy."
175+
},
176+
"level": "warning"
177+
}
178+
```
179+
180+
---
181+
182+
## 7. Card Block
183+
184+
Compact, scannable preview for entities, records, summaries, or agent results.
185+
186+
| Property | Type | Required | Constraints |
187+
|----------|------|----------|-------------|
188+
| `type` | string | Yes | Must be `"card"` |
189+
| `icon` | image object | No | Small image next to title/subtitle |
190+
| `hero_image` | image object | No | Top image |
191+
| `title` | text object | No | Max 150 chars |
192+
| `subtitle` | text object | No | Max 150 chars |
193+
| `body` | text object | No | Max 200 chars |
194+
| `actions` | button[] | No | Action buttons shown at bottom |
195+
| `block_id` | string | No | Max 255 chars |
196+
197+
**Surfaces:** Messages
198+
199+
At least one of `hero_image`, `title`, `actions`, or `body` is required. There is currently no size attribute.
200+
201+
```json
202+
{
203+
"type": "card",
204+
"icon": {
205+
"type": "image",
206+
"image_url": "https://example.com/icon.png",
207+
"alt_text": "Icon"
208+
},
209+
"title": {
210+
"type": "mrkdwn",
211+
"text": "Daily Standup Reminder"
212+
},
213+
"subtitle": {
214+
"type": "mrkdwn",
215+
"text": "Runs every weekday at *9:00 AM*"
216+
},
217+
"body": {
218+
"type": "mrkdwn",
219+
"text": "Last run: Today at 9:00 AM. Status: Success"
220+
},
221+
"actions": [
222+
{
223+
"type": "button",
224+
"text": { "type": "plain_text", "text": "View Logs" },
225+
"action_id": "view_logs"
226+
}
227+
]
228+
}
229+
```
230+
231+
---
232+
233+
## 8. Carousel Block
234+
235+
Horizontal group of cards for options, recommendations, search results, or next steps.
236+
237+
| Property | Type | Required | Constraints |
238+
|----------|------|----------|-------------|
239+
| `type` | string | Yes | Must be `"carousel"` |
240+
| `elements` | card[] | Yes | Minimum 1 card, maximum 10 cards |
241+
| `block_id` | string | No | Max 255 chars |
242+
243+
**Surfaces:** Messages
244+
245+
```json
246+
{
247+
"type": "carousel",
248+
"elements": [
249+
{ "type": "card", "title": { "type": "mrkdwn", "text": "Option A" } },
250+
{ "type": "card", "title": { "type": "mrkdwn", "text": "Option B" } }
251+
]
252+
}
253+
```
254+
255+
---
256+
257+
## 9. Image Block
154258

155259
Standalone image.
156260

@@ -188,7 +292,7 @@ Using Slack file:
188292

189293
---
190294

191-
## 7. Rich Text Block
295+
## 10. Rich Text Block
192296

193297
Formatted text with nested structure. See [RICH-TEXT.md](RICH-TEXT.md) for deep dive.
194298

@@ -202,7 +306,7 @@ Formatted text with nested structure. See [RICH-TEXT.md](RICH-TEXT.md) for deep
202306

203307
---
204308

205-
## 8. Table Block
309+
## 11. Table Block
206310

207311
Tabular data display.
208312

@@ -255,7 +359,7 @@ Tabular data display.
255359

256360
---
257361

258-
## 9. Markdown Block
362+
## 12. Markdown Block
259363

260364
Standard Markdown rendering, designed for AI app output.
261365

@@ -267,9 +371,9 @@ Standard Markdown rendering, designed for AI app output.
267371

268372
**Surfaces:** Messages only
269373

270-
**Supports:** bold, italic, strikethrough, links, headers (h1+), ordered/unordered lists, inline code, code blocks, block quotes, images (as hyperlinks), character escaping.
374+
**Supports:** bold, italic, strikethrough, links, headers (all header levels render at the same size), ordered/unordered lists, inline code, code blocks with optional syntax highlighting, block quotes, horizontal rules/dividers, tables, task lists, images (as hyperlinks), and character escaping.
271375

272-
**Does NOT support:** syntax highlighting, horizontal rules, tables, task lists.
376+
**Note:** A single markdown block may translate into multiple Slack blocks after rendering.
273377

274378
**Escaping:** Use backslash to render special characters literally. Supported: `\`, `` ` ``, `*`, `_`, `{`, `}`, `[`, `]`, `(`, `)`, `#`, `+`, `-`, `.`, `!`, `&`.
275379

@@ -279,7 +383,7 @@ Standard Markdown rendering, designed for AI app output.
279383

280384
---
281385

282-
## 10. Context Actions Block
386+
## 13. Context Actions Block
283387

284388
Message-level feedback and action buttons.
285389

@@ -322,7 +426,7 @@ Message-level feedback and action buttons.
322426

323427
---
324428

325-
## 11. Input Block
429+
## 14. Input Block
326430

327431
Collects user data via form elements.
328432

@@ -342,7 +446,7 @@ Collects user data via form elements.
342446

343447
---
344448

345-
## 12. Video Block
449+
## 15. Video Block
346450

347451
Embedded video player.
348452

@@ -366,7 +470,7 @@ Embedded video player.
366470

367471
---
368472

369-
## 13. File Block
473+
## 16. File Block
370474

371475
Remote file reference. Read-only — appears when retrieving messages containing remote files.
372476

@@ -387,7 +491,7 @@ Cannot be directly added to messages by apps. Shows up when retrieving messages
387491

388492
---
389493

390-
## 14. Plan Block
494+
## 17. Plan Block
391495

392496
Container for displaying sequential tasks or workflow steps, designed for AI agent output.
393497

@@ -425,7 +529,7 @@ Container for displaying sequential tasks or workflow steps, designed for AI age
425529

426530
---
427531

428-
## 15. Task Card Block
532+
## 18. Task Card Block
429533

430534
Displays a single task with title, status, optional details/output, and source URLs. Used standalone or inside a `plan` block.
431535

0 commit comments

Comments
 (0)