formatting-slack-messages
Skill này làm gì
Skill này giúp AI viết và kiểm tra bố cục tin nhắn Slack, như thẻ, nút bấm, menu và bảng. Nó dành cho bất kỳ ai xây dựng bot hoặc ứng dụng Slack và muốn kết quả gọn gàng, dễ đọc.
Khi nào nên dùng
- ✓Khi bạn muốn bot Slack đăng một cập nhật rõ ràng kèm nút bấm hoặc bảng.
- ✓Khi bạn cần sửa một tin nhắn Slack đã có mà không làm mất nút bấm hoặc liên kết.
- ✓Khi bạn đang xây modal Slack hoặc màn hình App Home và muốn nó hiển thị đúng.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/.agents/skills/formatting-slack-messages/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Giúp tôi định dạng một tin nhắn Slack hiển thị tóm tắt doanh số hằng ngày của chúng tôi, kèm nút phê duyệt.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill làm theo quy tắc bố cục chính thức của Slack để chọn các khối phù hợp, viết dữ liệu tin nhắn, và kiểm tra lỗi trước khi bạn dùng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
blocksorattachmentsand goes to a channel or direct message. - A modal has
type: modaland a view lifecycle. - An App Home view has
type: homeand 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:
markdownis a block type. It is not a text-object type.- Text objects use
plain_textormrkdwn. Atextelement is valid inside the appropriaterich_textstructure, 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
Câu hỏi thường gặp
Skill này có thiết lập không gian làm việc Slack của tôi không?
Không. Skill không dành cho việc thiết lập workspace hay ứng dụng. Nó tập trung vào bố cục của chính tin nhắn.
Skill có kiểm tra cách tin nhắn sẽ hiển thị trong Slack không?
Có. Skill kiểm tra bố cục và có thể xem cách Slack hiển thị nó.
Skill có sửa được tin nhắn đã tồn tại không?
Có. Khi cập nhật bố cục, skill giữ nguyên nội dung, liên kết, nút bấm và giá trị hiện có.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6814
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
discord-user-post
394kCho phép agent của bạn đăng tin nhắn đã duyệt lên Discord dưới tên bạn qua app Discord trên máy tính, sau khi xác nhận đúng kênh.
configure-channel
394kHướng dẫn agent của bạn kết nối một ứng dụng chat như Telegram với OpenClaw, lưu token bot an toàn và kiểm tra tin nhắn có đi qua được không.
discord
394kGiúp agent của bạn đọc, gửi, sửa và thả biểu cảm cho tin nhắn Discord qua OpenClaw, và kiểm tra đúng tin nhắn trước khi thay đổi.