Format Markdown for Slack (Firefox) - Convert markdown to Slack's native rich text format using Firefox's Clipboard API
Convert markdown to Slack's native rich text format and copy to clipboard using Firefox's Clipboard API. Works with Slack's web interface in Firefox.
$ARGUMENTS - Path to a markdown file, or markdown content from stdin. If no arguments, reads from stdin.claude mcp list should show playwright-firefoxnpx @playwright/mcp install-browser firefoxThis skill uses the slackfmt web application to convert markdown to Slack's clipboard format. The and work well for Chrome/Chromium-based browsers and the Slack desktop app, but because they use different clipboard formats:
org.chromium.web-custom-data clipboard typeorg.mozilla.custom-clipdata clipboard typeWe explored various approaches to convert the slackfmt CLI's output to Firefox's format:
ClipboardItem not available in automation contextThis skill is a stopgap solution until we can implement a proper command-line conversion tool. For now, it automates the slackfmt web workflow using Playwright Firefox.
$ARGUMENTS is provided and is a file path, read the file$ARGUMENTS is provided but is not a file path, treat it as markdown content directly$ARGUMENTS, read from stdin (check if stdin is available)Using the Playwright Firefox MCP tools:
Navigate to https://slackfmt.labs.caue.dev/
mcp__playwright-firefox__browser_navigate(url: "https://slackfmt.labs.caue.dev/")
Wait for the page to load and take a snapshot to get element references
mcp__playwright-firefox__browser_snapshot()
Locate the markdown input textarea (look for textbox "Markdown input" in the snapshot)
Type the markdown content into the textarea using the ref from the snapshot:
mcp__playwright-firefox__browser_type(
ref: "<textarea-ref>",
element: "Markdown input textbox",
text: "<markdown-content>"
)
Take another snapshot to locate the "Copy" button
Click the "Copy" button using its ref:
mcp__playwright-firefox__browser_click(
ref: "<copy-button-ref>",
element: "Copy button"
)
Tell the user:
✓ Copied to clipboard! The markdown has been converted to Slack's format and is ready to paste.
Paste into Slack now - you should see native Slack bullets with proper nesting and formatting.
Close the browser:
mcp__playwright-firefox__browser_close()
# From a file
/slackfmt-firefox /tmp/scrum-update.md
# From stdin
cat notes.md | /slackfmt-firefox
# Inline markdown
/slackfmt-firefox "- **Bold item**\n - Nested item with [link](https://example.com)"
[text](url) to clickable Slack links`code` becomes monospace formatted text