Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

slack-block-kitSlack block KIT 前端

Agent Skill

用于处理 Slack 工作区里的频道、消息、线程、用户和通知信息。它适合让 Agent 查询团队沟通记录、整理上下文、回复线程或辅助协作提醒。使用时需要确认机器人或用户 token 是否具备目标频道访问权,私有频道和历史消息通常有额外权限限制;发送消息、@成员或批量读取对话时,应避免泄露内部讨论和敏感工作信息。

总安装

1,297

周安装

53

GitHub Stars

39

下载量

416
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:slack-block-kit(Slack block KIT 前端)
来源仓库:https://github.com/ccheney/robust-skills
仓库路径:skills/slack-block-kit
安装命令:
npx skills add https://github.com/ccheney/robust-skills --skill slack-block-kit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ccheney/robust-skills --skill slack-block-kit

简介

slack-block-kit 用于构建 Slack 消息与模态框的交互式界面。

  • 支持文本、表格、按钮等多种区块组件组合。
  • 严格区分 mrkdwn 语法与标准 Markdown 使用场景。
  • 发送前需确认机器人权限与频道访问范围。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Slack Block Kit

UI framework for building rich, interactive layouts in Slack messages, modals, and App Home.

CRITICAL: Two Markup Systems

Text inside Block Kit text objects uses Slack mrkdwn syntax (*bold*, <url|text>), NOT standard Markdown. The only exception is the markdown block which uses standard Markdown.

Quick Decision Trees

"Should I use blocks?"

Response type?
├─ Conversational reply, short answer, <3 lines   → text only (no blocks)
├─ Multi-section summary, report, dashboard        → blocks
├─ Two-column key-value data                       → blocks (section fields)
├─ Tabular data                                    → blocks (table)
├─ Code with heading or surrounding context         → blocks
├─ Visual separation needed between topics          → blocks
└─ Feedback buttons or interactive elements         → blocks

"Which block type?"

What am I rendering?
├─ Large section title                → header (plain_text, 150 chars max)
├─ Body text or key-value pairs       → section (text + fields + accessory)
├─ Small metadata or secondary info   → context (images + text, 10 max)
├─ Horizontal separator               → divider
├─ Buttons, menus, date pickers       → actions (25 elements max)
├─ Status, warning, success callout    → alert (severity + text)
├─ Compact entity or summary preview   → card (optional image/actions)
├─ Multiple comparable cards/options   → carousel (1-10 cards)
├─ Standalone image                   → image (image_url or slack_file)
├─ Formatted text with lists, quotes  → rich_text (nested sub-elements)
├─ Tabular data                       → table (100 rows, 20 cols, 1 per msg)
├─ LLM-generated markdown content     → markdown (standard MD, messages only)
├─ Embedded video player              → video (requires links.embed:write)
├─ Remote file reference              → file (read-only, source: "remote")
├─ Feedback thumbs up/down            → context_actions (messages only)
├─ Collecting user input (modals)     → input (label + element)
├─ AI agent task steps                → plan (sequential tasks, messages only)
└─ Single task with status            → task_card (inside plan or standalone)

"mrkdwn or markdown block?"

Content source?
├─ Short formatted text, labels, fields     → mrkdwn in section/context
├─ Long-form LLM-generated content          → markdown block (standard MD)
├─ LLM-generated tables/task lists/code      → markdown block
├─ Programmatic tabular data                 → table block
├─ Need headings                            → markdown block or header blocks
└─ Mixed: structured layout + prose         → section/header blocks + markdown block

Block Types Overview

header

Large bold text for section titles. plain_text only. Max 150 chars.

{ "type": "header", "text": { "type": "plain_text", "text": "Section Title", "emoji": true } }

section

Primary content block. Supports text, two-column fields, and one accessory element.

{
  "type": "section",
  "text": { "type": "mrkdwn", "text": "*Project Status*\nAll systems operational." }
}

Two-column fields layout:

{
  "type": "section",
  "fields": [
    { "type": "mrkdwn", "text": "*Status:*\nActive" },
    { "type": "mrkdwn", "text": "*Owner:*\nChris" },
    { "type": "mrkdwn", "text": "*Priority:*\nHigh" },
    { "type": "mrkdwn", "text": "*Due:*\nFriday" }
  ]
}

Either text or fields required (or both). Text max 3000 chars. Fields max 10 items, each max 2000 chars. Set expand: true to force full text display without "see more" truncation.

Compatible accessories: button, overflow, datepicker, timepicker, select menus, multi-select menus, checkboxes, radio buttons, image.

divider

{ "type": "divider" }

context

Small, muted text for metadata. Elements: mrkdwn text objects or image elements. Max 10 elements.

{
  "type": "context",
  "elements": [
    { "type": "mrkdwn", "text": "Last updated: Feb 9, 2026" },
    { "type": "mrkdwn", "text": "Source: deploy-bot" }
  ]
}

actions

Interactive elements: buttons, select menus, overflow menus, date pickers. Max 25 elements.

{
  "type": "actions",
  "elements": [
    {
      "type": "button",
      "text": { "type": "plain_text", "text": "Approve", "emoji": true },
      "style": "primary",
      "action_id": "approve_action",
      "value": "approved"
    }
  ]
}

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

alert

Callout for status, risk, confirmation, or urgency. Text accepts plain_text or mrkdwn. level: default, info, warning, error, or success (defaults to default).

{
  "type": "alert",
  "text": { "type": "mrkdwn", "text": "*Dependency conflict detected* before deploy." },
  "level": "warning"
}

card

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.

{
  "type": "card",
  "title": { "type": "mrkdwn", "text": "Daily Standup Reminder" },
  "subtitle": { "type": "mrkdwn", "text": "Runs every weekday at *9:00 AM*" },
  "body": { "type": "mrkdwn", "text": "Last run: Today at 9:00 AM. Status: Success" },
  "actions": [
    {
      "type": "button",
      "text": { "type": "plain_text", "text": "View Logs" },
      "action_id": "view_logs"
    }
  ]
}

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.

carousel

Horizontal, scrollable group of card blocks for options, recommendations, search results, or next steps. Must contain 1-10 cards.

{
  "type": "carousel",
  "elements": [
    { "type": "card", "title": { "type": "mrkdwn", "text": "Option A" } },
    { "type": "card", "title": { "type": "mrkdwn", "text": "Option B" } }
  ]
}

image

Standalone image with alt text. Provide either image_url (public, max 3000 chars) or slack_file object. Formats: png, jpg, jpeg, gif.

{
  "type": "image",
  "image_url": "https://example.com/chart.png",
  "alt_text": "Deployment success rate chart",
  "title": { "type": "plain_text", "text": "Deploy Metrics" }
}

rich_text

Advanced formatted text with nested elements. Supports styled text, lists, code blocks, and quotes. See references/RICH-TEXT.md for deep dive.

{
  "type": "rich_text",
  "elements": [
    {
      "type": "rich_text_section",
      "elements": [
        { "type": "text", "text": "Key findings:", "style": { "bold": true } }
      ]
    },
    {
      "type": "rich_text_list",
      "style": "bullet",
      "elements": [
        { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Latency reduced by 40%" }] },
        { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Error rate under 0.1%" }] }
      ]
    }
  ]
}

Sub-element types: rich_text_section (paragraph), rich_text_list (style: "bullet" or "ordered", with indent, offset, border), rich_text_preformatted (code block), rich_text_quote (blockquote).

Inline element types within sections: text (with optional style: {bold, italic, strike, code, underline}), link, emoji, user, channel, usergroup, broadcast, date, color.

table

Tabular data. One table per message (appended as attachment at bottom).

{
  "type": "table",
  "rows": [
    [
      { "type": "raw_text", "text": "Service" },
      { "type": "raw_text", "text": "Status" },
      { "type": "raw_text", "text": "Latency" }
    ],
    [
      { "type": "raw_text", "text": "API" },
      { "type": "raw_text", "text": "Healthy" },
      { "type": "raw_text", "text": "12ms" }
    ]
  ],
  "column_settings": [
    { "align": "left" },
    { "align": "center" },
    { "align": "right" }
  ]
}

Each row is an array of cell objects (NOT an object with a cells property). Cell types: raw_text or rich_text. There is no columns property — the first row is the header. Max 100 rows, 20 columns. Multiple tables trigger invalid_attachments error.

markdown

Standard Markdown rendering for AI app output. Messages only.

{ "type": "markdown", "text": "**Bold**, *italic*, [link](https://example.com)\n\n## Heading\n\n- List item" }

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.

context_actions

Feedback and icon buttons for message-level actions. Messages only. Max 5 elements. Compatible elements: feedback_buttons, icon_button.

video

Embedded video player. Requires links.embed:write scope, publicly accessible URL in app's unfurl domains.

input

Collects user data in modals, messages, and Home tabs. Requires label (plain_text, 2000 chars) and one compatible element. See references/ELEMENTS.md for all input element types.

plan

Container for sequential task cards, designed for AI agent output. Messages only.

{
  "type": "plan",
  "title": "Thinking completed",
  "tasks": [
    { "task_id": "t1", "title": "Fetched data", "status": "complete" },
    { "task_id": "t2", "title": "Generating report", "status": "in_progress" }
  ]
}

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).

streaming agent output

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.

chunks can include:

  • markdown_text chunks for standard Markdown text
  • task_update chunks for timeline-style task progress
  • plan_update chunks for updating a plan title
  • blocks chunks for arrays of Block Kit blocks

Set task_display_mode on chat.startStream:

  • timeline (default): tasks appear individually in sequence
  • plan: tasks appear grouped in one plan, with the first task placement determining the plan placement

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.

file

Remote file reference. Read-only. Cannot be directly added to messages by apps.

Composition Objects

Option Object

Used in select menus, overflow, checkboxes, radio buttons:

{
  "text": { "type": "plain_text", "text": "Option 1" },
  "value": "opt_1",
  "description": { "type": "plain_text", "text": "Detailed description" }
}

Text max 75 chars. value max 150 chars. description optional, max 75 chars.

Confirmation Dialog

{
  "title": { "type": "plain_text", "text": "Are you sure?" },
  "text": { "type": "plain_text", "text": "This action cannot be undone." },
  "confirm": { "type": "plain_text", "text": "Yes, do it" },
  "deny": { "type": "plain_text", "text": "Cancel" },
  "style": "danger"
}

Conversation Filter

Filters conversation select menus. include: im, mpim, private, public.

Dispatch Action Configuration

Controls when input elements trigger block_actions: on_enter_pressed, on_character_entered.

See references/COMPOSITION.md for full property tables.

Limits

ConstraintLimit
Blocks per message50
Blocks per modal/Home tab100
Section text3000 chars
Section fields10 items, 2000 chars each
Header text150 chars
Context elements10
Actions elements25
Context actions elements5
Alert levelsdefault, info, warning, error, success
Card title/subtitle150 chars
Card body200 chars
Carousel cards1-10
Table rows100
Table columns20
Tables per message1
Markdown block text12,000 chars cumulative per payload
Modal title24 chars
Modal submit/close text24 chars
Modal views in stack3
Modal private_metadata3000 chars
Button text75 chars (displays ~30)
Button value2000 chars
action_id / block_id255 chars
Overflow options5
Select options100
Option text75 chars
Placeholder text150 chars
File input max file size10MB per file

Anti-Patterns

Anti-PatternProblemFix
Blocks without text fallbackEmpty notifications, no accessibility fallbackAlways provide text in chat.postMessage
text and blocks divergeConfusing: notification says one thing, chat shows anotherKeep semantically aligned
Blocks for simple repliesVisual noise for short responsesUse text only for simple replies
2+ tables in one messageinvalid_attachments errorOne table per message
Using blog-nested card/alert payloadsInvalid against current reference docsPut title, body, text, and level directly on the block
mrkdwn in header textIgnored — headers only accept plain_textUse plain_text type
Long header textSilently truncated at 150 charsKeep under 150
Missing alt_text on imagesAccessibility failure, API may rejectAlways include alt_text

Best Practices

Use blocks when:

  • The response has multiple distinct sections (summaries, reports, dashboards)
  • Two-column key-value layouts improve readability (metadata, config summaries)
  • A table presents data more clearly than prose
  • Visual separation between topics helps comprehension
  • Code needs a header or surrounding context
  • Interactive elements (buttons, menus, feedback) are needed

Don't use blocks when:

  • The response is conversational ("sure, done", "hey, good morning")
  • The response is under ~3 lines of text
  • The content is a simple answer to a direct question

Always:

  • Provide a complete text field as the accessible fallback (notifications, threads, search, screen readers)
  • Keep the text and blocks semantically aligned
  • Use mrkdwn syntax in text objects, not standard Markdown (except in markdown blocks)
  • Escape &, <, > in user-generated content

Surfaces Overview

SurfaceMax BlocksKey MethodsNotes
Messages50chat.postMessage, chat.updatePrimary output surface
Modals100views.open, views.update, views.pushRequires trigger_id (3s expiry), up to 3 stacked views
App Home100views.publishPrivate per-user view, Home/Messages/About tabs
CanvasesN/Acanvases.create, canvases.editMarkdown only — no Block Kit support
ListsN/Alists.* API methodsTask tracking and project management
Split ViewN/AAgents & AI Apps configAI chat surface with Chat + History tabs

Modals collect input via input blocks, return view_submission payloads. They chain up to 3 views with push/update/clear response actions. private_metadata (3000 chars) persists context between views.

Work Objects

Work Objects render rich entity previews when links are shared in Slack. They extend link unfurling with structured data, flexpane details, editable fields, and actions.

Entity Types

TypeEntity IDPurpose
Fileslack#/entities/fileDocuments, spreadsheets, images
Taskslack#/entities/taskTickets, to-dos, work items
Incidentslack#/entities/incidentService interruptions, outages
Content Itemslack#/entities/content_itemArticles, pages, wiki entries
Itemslack#/entities/itemGeneral-purpose entity

Work Objects use chat.unfurl with a metadata parameter containing entity type, external reference, and entity payload. See references/WORK-OBJECTS.md for full implementation details.

Reference Documentation

FilePurpose
references/CHEATSHEET.mdQuick reference: all blocks, elements, limits at a glance
references/BLOCKS.mdAll 18 block types with full property tables and constraints
references/ELEMENTS.mdAll 20 interactive elements with properties and constraints
references/COMPOSITION.mdComposition objects: text, option, confirmation, filters
references/RICH-TEXT.mdRich text block deep dive: sub-elements, inline types, styles
references/SURFACES.mdModals, App Home, canvases, lists, split view
references/WORK-OBJECTS.mdEntity types, chat.unfurl, flexpane, editable fields, actions

Sources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.37%
按下载量换算151

Claude

30.52%
按下载量换算127

Cursor

17.37%
按下载量换算72

Gemini CLI

7.89%
按下载量换算33

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills