$npx -y skills add ccheney/robust-skills --skill slack-block-kitProactively 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, context block, alert block
| 1 | # Slack Block Kit |
| 2 | |
| 3 | UI framework for building rich, interactive layouts in Slack messages, modals, and App Home. |
| 4 | |
| 5 | ## CRITICAL: Two Markup Systems |
| 6 | |
| 7 | Text inside Block Kit text objects uses Slack mrkdwn syntax (`*bold*`, `<url|text>`), NOT standard Markdown. The only exception is the `markdown` block, which accepts standard Markdown (`**bold**`, `[text](url)`). Mixing these up is the single most common Block Kit generation error. |
| 8 | |
| 9 | ## Quick Decision Trees |
| 10 | |
| 11 | ### "Should I use blocks?" |
| 12 | |
| 13 | ``` |
| 14 | Response type? |
| 15 | ├─ Conversational reply, short answer, <3 lines → text only (no blocks) |
| 16 | ├─ Multi-section summary, report, dashboard → blocks |
| 17 | ├─ Two-column key-value data → blocks (section fields) |
| 18 | ├─ Tabular data → blocks (table / data_table) |
| 19 | ├─ Charts or metrics visualization → blocks (data_visualization) |
| 20 | ├─ Code with heading or surrounding context → blocks |
| 21 | ├─ Visual separation needed between topics → blocks |
| 22 | └─ Feedback buttons or interactive elements → blocks |
| 23 | ``` |
| 24 | |
| 25 | ### "Which block type?" |
| 26 | |
| 27 | ``` |
| 28 | What am I rendering? |
| 29 | ├─ Large section title → header (plain_text, 150 chars max) |
| 30 | ├─ Body text or key-value pairs → section (text + fields + accessory) |
| 31 | ├─ Small metadata or secondary info → context (images + text, 10 max) |
| 32 | ├─ Horizontal separator → divider |
| 33 | ├─ Buttons, menus, date pickers → actions (25 elements max) |
| 34 | ├─ Status callout in a MODAL → alert (modals only, 200 chars) |
| 35 | ├─ Compact entity or summary preview → card (optional image/actions) |
| 36 | ├─ Multiple comparable cards/options → carousel (1-10 cards) |
| 37 | ├─ Grouped/collapsible block set → container (title + ≤10 child blocks) |
| 38 | ├─ Standalone image → image (image_url or slack_file) |
| 39 | ├─ Formatted text with lists, quotes → rich_text (nested sub-elements) |
| 40 | ├─ Simple static table → table (100 rows, 20 cols) |
| 41 | ├─ Sortable/paginated table → data_table (caption + 100 data rows) |
| 42 | ├─ Pie/bar/area/line chart → data_visualization (native charts) |
| 43 | ├─ LLM-generated markdown content → markdown (standard MD, messages only) |
| 44 | ├─ Embedded video player → video (requires links.embed:write) |
| 45 | ├─ Remote file reference → file (read-only, source: "remote") |
| 46 | ├─ Feedback thumbs up/down → context_actions (messages only) |
| 47 | ├─ Collecting user input → input (label + element) |
| 48 | ├─ AI agent task steps → plan (sequential tasks, messages only) |
| 49 | └─ Single task with status → task_card (inside plan or standalone) |
| 50 | ``` |
| 51 | |
| 52 | ### "mrkdwn or markdown block?" |
| 53 | |
| 54 | ``` |
| 55 | Content source? |
| 56 | ├─ Short formatted text, labels, fields → mrkdwn in section/context |
| 57 | ├─ Long-form LLM-generated content → markdown block (standard MD) |
| 58 | ├─ LLM-generated tables/task lists/code → markdown block |
| 59 | ├─ Programmatic tabular data → table or data_table block |
| 60 | ├─ Need headings → markdown block or header blocks |
| 61 | └─ Mixed: structured layout + prose → section/header blocks + markdown block |
| 62 | ``` |
| 63 | |
| 64 | ### "table, data_table, or markdown table?" |
| 65 | |
| 66 | ``` |
| 67 | ├─ LLM already emitted a Markdown table → markdown block |
| 68 | ├─ Static data, no interaction needed → table |
| 69 | └─ Users need sorting, paging, or clickable cells → data_table (caption required) |
| 70 | ``` |
| 71 | |
| 72 | ## Block Types Overview |
| 73 | |
| 74 | Full property tables for all 21 blocks: [references/BLOCKS.md](references/BLOCKS.md). Highlights and sharp edges below. |
| 75 | |
| 76 | ### header |
| 77 | |
| 78 | Large bold text. `plain_text` only — mrkdwn is silently ignored. Max 150 chars. |
| 79 | |
| 80 | ```json |
| 81 | { "type": "header", "text": { "type": "plain_text", "text": "Section Title", "emoji": true } } |
| 82 | ``` |
| 83 | |
| 84 | ### section |
| 85 | |
| 86 | Primary content block. Supports text (3000 chars), two-column `fields` (10 items, 2000 chars each), and one `accessory` element. Either `text` or `fields` is required. Set `expand: true` to prevent "see more" truncation |