Skip to content
Skillpedia
Email & messaging41k · #6814

formatting-slack-messages

What it does

This skill helps the AI write and check Slack message layouts, such as cards, buttons, menus and tables. It is for anyone building a Slack bot or app who wants clean, readable results.

When to use it

  • ✓When you want a Slack bot to post a clear update with buttons or a table.
  • ✓When you need to change an existing Slack message without losing its buttons or links.
  • ✓When you are building a Slack modal or App Home screen and want it to display correctly.

Skill link

https://github.com/PostHog/posthog/blob/master/.agents/skills/formatting-slack-messages/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/.agents/skills/formatting-slack-messages/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Help me format a Slack message that shows our daily sales summary with an approve button.”

5 new skills a week. 1 minute to read.

How it works

It follows Slack's official layout rules to choose the right building blocks, writes the message data, and checks it for errors before you use it.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Formatting Slack messages

Build a layout that makes the result, its context, and the next action clear. This workflow adapts Slack's official Block Kit skill. It is self-contained; another installed skill is not required. See sources for upstream attribution.

1. Identify the surface and the change

Infer the surface from the request or existing payload:

  • A message has blocks or attachments and goes to a channel or direct message.
  • A modal has type: modal and a view lifecycle.
  • An App Home view has type: home and is published for a user.

Inspect the existing payload before changing its layout. For modifications, preserve unchanged content, source links, block_id, action_id, values, and menu choices. Ask only when missing information changes the implementation. Do not repeat questions the user already answered. For a clear small edit, read the relevant schema, make the edit, and validate it. For a broad redesign, establish the content order before building the payload.

2. Read live schemas

Use the Block Kit index to find the current component pages. Fetch each selected block, element, and composition object's schema and example. Append .md to Slack documentation URLs when a Markdown response is easier to read. Follow index links rather than guessing slugs; select menus share one reference page. Reuse pages already read during the task.

Check required fields, allowed nesting, text types, limits, and supported surfaces separately. Do not treat this skill's comparison tables as permanent schemas.

Common errors:

  • markdown is a block type. It is not a text-object type.
  • Text objects use plain_text or mrkdwn. A text element is valid inside the appropriate rich_text structure, not as a standalone block.
  • Valid JSON does not establish valid Block Kit.
  • A schema-validation success does not establish surface compatibility or block-count compliance.

3. Match the structure to the content

Content Starting point
One change or important number A short sentence with its comparison and units
Independent facts about one item section.fields with short labels and values
Several comparable rows table
Rows that need sorting, pagination, filtering, or row actions data_table
A compact entity with a short body and a few buttons card
Optional peer items for browsing A carousel of cards
A related group of blocks container
A real task or investigation step with progress updates task_card or plan
A view-wide notice in a modal alert
Existing generated Markdown markdown, if supported and safe for the intended message
Formatted text assembled in code rich_text

Use block selection for limits, table comparisons, and template patterns. Keep required findings visible outside carousels, pagination, and collapsed groups. Do not add dividers between every block or put a one-line notice in a card without a reason. Use a consistent size and hierarchy across comparable messages. Keep at most one visually primary action per message or view. Leave equal navigation choices unstyled.

For modals, check the view wrapper, title, callback, close, and submit requirements. An input-containing modal needs a submit action. Do not compete with Submit using another primary button. For App Home, handle first use, empty results, and view refresh for the current user. Use task cards for work with progress updates. Their sta

FAQ

Does this skill set up my Slack workspace?

No. It is not for workspace or app setup. It focuses on the layout of the message itself.

Can it check how the message will look in Slack?

Yes. It validates the layout and can check how Slack displays it.

Can it change a message that already exists?

Yes. It keeps the existing content, links, buttons and values the same while it updates the layout.

Details

Original description by the author

Builds and validates Slack Block Kit messages, modals, and App Home layouts. Use for Slack formatting, block selection, Markdown, cards, tables, charts, metadata, buttons, and menus. Covers live schemas, payload validation, accessibility, and actual Slack rendering. Not for workspace setup.

repo: PostHog/posthog

Popularity

GitHub stars
41k
Ranking position
#6814
License
—
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills