From f1d32a08813de01e9d9f4427e71e04a6516d0dbd Mon Sep 17 00:00:00 2001 From: karanb192 Date: Tue, 24 Mar 2026 18:04:05 +0530 Subject: [PATCH] Add slack-message-formatter plugin Markdown-to-Slack formatter with two delivery paths: rich HTML copy-paste and mrkdwn for API/webhook. Supports tables, task lists, emoji shortcodes, and Slack mentions. --- README-zh.md | 1 + README.md | 1 + .../.claude-plugin/plugin.json | 10 ++++++ .../commands/slack-message-formatter.md | 31 +++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 plugins/slack-message-formatter/.claude-plugin/plugin.json create mode 100644 plugins/slack-message-formatter/commands/slack-message-formatter.md diff --git a/README-zh.md b/README-zh.md index 2c2de0e..6efb6bd 100644 --- a/README-zh.md +++ b/README-zh.md @@ -130,6 +130,7 @@ - [python-expert](./plugins/python-expert) - [rapid-prototyper](./plugins/rapid-prototyper) - [react-native-dev](./plugins/react-native-dev) +- [slack-message-formatter](./plugins/slack-message-formatter) - [vision-specialist](./plugins/vision-specialist) - [web-dev](./plugins/web-dev) diff --git a/README.md b/README.md index e4de615..27c1844 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ Install or disable them dynamically with the `/plugin` command — enabling you - [python-expert](./plugins/python-expert) - [rapid-prototyper](./plugins/rapid-prototyper) - [react-native-dev](./plugins/react-native-dev) +- [slack-message-formatter](./plugins/slack-message-formatter) - [vision-specialist](./plugins/vision-specialist) - [web-dev](./plugins/web-dev) diff --git a/plugins/slack-message-formatter/.claude-plugin/plugin.json b/plugins/slack-message-formatter/.claude-plugin/plugin.json new file mode 100644 index 0000000..1c964b7 --- /dev/null +++ b/plugins/slack-message-formatter/.claude-plugin/plugin.json @@ -0,0 +1,10 @@ +{ + "name": "slack-message-formatter", + "description": "Format Markdown for Slack. Rich HTML copy-paste + mrkdwn API output.", + "version": "1.0.0", + "author": { + "name": "karanb192", + "url": "https://github.com/karanb192" + }, + "homepage": "https://github.com/karanb192/slack-message-formatter" +} \ No newline at end of file diff --git a/plugins/slack-message-formatter/commands/slack-message-formatter.md b/plugins/slack-message-formatter/commands/slack-message-formatter.md new file mode 100644 index 0000000..a44c648 --- /dev/null +++ b/plugins/slack-message-formatter/commands/slack-message-formatter.md @@ -0,0 +1,31 @@ +--- +description: Format Markdown for Slack. Rich HTML copy-paste + mrkdwn API output. +author: karanb192 +author-url: https://github.com/karanb192 +version: 1.0.0 +--- + +# Slack Message Formatter + +This slash command formats messages for Slack with pixel-perfect accuracy. It converts standard Markdown to Slack-compatible output with two delivery paths: + +1. **Copy-paste** — Rich HTML that preserves formatting when pasted into Slack's compose box +2. **API/Webhook** — Slack mrkdwn syntax for bots, automation, and CI/CD + +## Key Features + +- Converts bold, italic, strikethrough, code, links, headings, tables, task lists, and more +- Handles Slack mentions (`<@U...>`, `<#C...>`, ``) as pass-through +- Generates a Slack-themed browser preview page +- Copies rich HTML to clipboard for instant paste into Slack +- Supports direct webhook sending via `CCH_SLA_WEBHOOK` environment variable +- Converts 150+ emoji shortcodes to native Unicode + +## Usage + +``` +/slack-message-formatter preview +/slack-message-formatter send +``` + +Write your message in standard Markdown, and the formatter handles conversion to Slack's mrkdwn syntax and rich HTML automatically. \ No newline at end of file