mdcopy

Use when the user wants to paste markdown into Mail, Google Docs, Slack, or Word as real formatting (not raw ** or #). Triggers on "mdcopy", "markdown to clipboard", "rich text from markdown", "paste markdown into email", "copy this for Mail", "GFM to clipboard", or macOS clipboard HTML from markdown.

mdcopy (markdown → rich clipboard)

This plugin ships a small macOS-only script that runs Pandoc (GFM → HTML), applies light CSS, and puts HTML on the system pasteboard so Paste preserves headings, lists, tables, links, and inline code.

Requirements

  • macOS (Swift + AppKit).
  • pandoc on PATH: brew install pandoc.

Script path

After install, the executable lives at:

${CLAUDE_PLUGIN_ROOT}/bin/mdcopy

Run it with bash if the executable bit was lost in transit, or chmod +x once:

chmod +x "${CLAUDE_PLUGIN_ROOT}/bin/mdcopy"

Usage (three inputs)

ModeCommand
File"${CLAUDE_PLUGIN_ROOT}/bin/mdcopy" path/to/file.md
Stdinprintf '%s' "$body" | "${CLAUDE_PLUGIN_ROOT}/bin/mdcopy"
Clipboard is markdown (TTY, no pipe)"${CLAUDE_PLUGIN_ROOT}/bin/mdcopy"

Stderr prints a success line when the pasteboard was updated. Tell the user to Paste in the target app.

Machine-readable spec

For stable, copy-paste instructions (skills, automation, or fetching over HTTPS), use the repo root LLM.txt:

https://raw.githubusercontent.com/The-Focus-AI/mdcopy/main/LLM.txt

Limitations

  • Not for Linux or Windows.
  • The destination field must accept HTML from the clipboard; plain-text-only boxes stay plain.

Examples in this repo

  • README.md — “Mail.app paste examples” (small markdown samples + screenshots).
  • examples/rich-text-demo.md — tables, nested lists, blockquotes, code.