跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

slack-mrkdwn

Proactively apply when generating any Slack text content, message text fields, Block Kit text objects, standard Markdown for Slack, or Work Object text. Triggers on mrkdwn, Slack formatting, Slack markdown, Slack bold, Slack italic, Slack links, mentions, dates, escaping, text objects, verbatim, plain_text, markdown blocks, markdown_text, rich_text, Work Objects, streaming text, notification fallbacks, accessibility, auto-parsing, parse, link_names, unfurls, and mrkdwn_in. Use when formatting Slack messages, composing text objects, escaping user content, choosing between mrkdwn and standard Markdown, adding mentions or localized dates, streaming Markdown, authoring Work Object fields or comments, or debugging Slack text rendering.

ccheney · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ccheney/robust-skills --skill slack-mrkdwn

技能说明


name: slack-mrkdwn description: Proactively apply when generating any Slack text content, message text fields, Block Kit text objects, standard Markdown for Slack, or Work Object text. Triggers on mrkdwn, Slack formatting, Slack markdown, Slack bold, Slack italic, Slack links, mentions, dates, escaping, text objects, verbatim, plain_text, markdown blocks, markdown_text, rich_text, Work Objects, streaming text, notification fallbacks, accessibility, auto-parsing, parse, link_names, unfurls, and mrkdwn_in. Use when formatting Slack messages, composing text objects, escaping user content, choosing between mrkdwn and standard Markdown, adding mentions or localized dates, streaming Markdown, authoring Work Object fields or comments, or debugging Slack text rendering.

Slack mrkdwn

Slack's custom mrkdwn syntax is not standard Markdown. First identify the receiving field; the same punctuation can mean something different on another Slack surface.

Choose the Rendering System

SystemCommon surfacesExample
Slack mrkdwnTop-level message text (default), Block Kit text objects with type: "mrkdwn", composer/classic unfurl blocks, legacy attachment fields enabled by mrkdwn_in*bold* <https://example.com|link>
Standard Markdownmarkdown block; markdown_text chat method arguments; Work Object string fields/comments with format: "markdown"; Work Object partial-view messages with message_format: "markdown"**bold** [link](https://example.com)
Structured rich_textSlack's WYSIWYG/user-message representation and rich_text_input valuesExplicit nested JSON elements and style objects
plain_textLabels, buttons, placeholders, view titles, and any text object that must render literallyNo formatting syntax

Do not translate by punctuation alone. For example, *bold* in mrkdwn is italic in standard Markdown. A rich_text block does not parse either syntax; construct its elements explicitly.

Standard Markdown Surfaces

Markdown Block

{
  "type": "markdown",
  "text": "## Result\n\n**Complete** — see [details](https://example.com)."
}

Slack's markdown block explicitly documents support for:

  • bold, italic, nested bold/italic, and strikethrough
  • ordered and unordered lists
  • links, block quotes, inline code, and fenced code blocks
  • language-tagged fenced code blocks with syntax highlighting
  • headings, horizontal dividers, tables, and task lists
  • images, translated to hyperlink text using the image alt text
  • backslash escaping of documented special characters

The current block reference says all heading levels render at the same size, while Slack's March 6, 2026 changelog says variable-sized headers are being rolled out. Treat heading size as rollout- and client-dependent rather than relying on a specific visual hierarchy until the references converge. A single input block may translate into multiple output blocks. The cumulative text limit across all markdown blocks in one payload is 12,000 characters. A supplied block_id is ignored and not retained.

markdown_text Chat Arguments

The following current Web API methods accept a standard-Markdown markdown_text argument with a 12,000-character limit:

MethodsCombination rules
chat.postMessage, chat.postEphemeral, chat.scheduleMessage, chat.updateDo not combine markdown_text with blocks or text; Slack returns markdown_text_conflict
chat.startStream, chat.appendStream, chat.stopStreamAccept Markdown during a stream; chat.stopStream can also append final blocks, rendered after streamed Markdown/chunks

Streaming methods also accept chunks. In the current method references, a Markdown chunk is:

{ "type": "markdown_text", "text": "**Streaming** response" }

chunks can also carry task updates, plan updates, and block chunks. Consult the individual streaming method reference for the exact request fields and current limits. Link unfurling is disabled in streaming messages.

Work Objects

Work Objects do not use mrkdwn for their metadata string formatting:

{
  "type": "string",
  "value": "**Blocked** — see [runbook](https://example.com/runbook)",
  "format": "markdown"
}
  • A Work Object fields or custom_fields property of type string can set format: "markdown". This is incompatible with that field's icon or link properties.
  • Work Object comments can provide { "value": "...", "format": "markdown" }; comments may alternatively provide structured rich-text blocks.
  • A custom partial-access message can set message_format: "markdown" for its custom_message.
  • To reference a Work Object inside rich_text, use a structured work_object_mention element (including entity_id, app_id, text, and url), not a made-up mrkdwn token.
  • Block Kit text objects embedded in composer or classic link unfurls still follow their own mrkdwn/plain_text rules.

mrkdwn Syntax

FormatSyntaxNotes
Bold*bold*Not **bold**
Italic_italic_Not *italic*
Strikethrough~strikethrough~Not ~~strikethrough~~
Inline code`code`Other formatting is disabled inside
Code blockTriple backticks around the textNo documented language-tag highlighting in mrkdwn
Block quote>quoted textPut > at the start of each quoted line
Link<https://example.com|display text>Not [text](url)
Emoji:emoji_name: or UnicodeRetrieved messages use colon form
Newline\n in a stringProduces a line break
List-like text- item / 1. item plus newlinesmrkdwn has no list syntax; these are text conventions

Headings are not mrkdwn syntax. Use a header block, a standard-Markdown markdown block, or structured rich text as appropriate.

For complex combinations, true lists, or user-authored formatting, prefer structured rich_text inst

阅读完整来源 ↗