Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By ehartye
Turn markdown documents (with embedded mermaid diagrams) into themed, searchable, paged PDFs and Microsoft Word DOCX files via WeasyPrint and python-docx. Bundles six skills (publish, preprocess, theme-advisor, theme-gallery, install-fonts, rebuild-themes) plus eight built-in themes (atlas/phosphor/arcade/signal in light + dark).
npx claudepluginhub ehartye/md-publisher --plugin md-publisherThis skill should be used when the user asks to "install theme fonts", "set up md-publisher fonts", "fix font substitution", "install Google Fonts for md-publisher", or invokes /md-publisher:install-fonts. Per-user installs the font families used by the bundled and user-installed themes (Newsreader, Sora, JetBrains Mono, IBM Plex Mono, Audiowide, Bungee, Recursive, Playfair Display, DM Sans, Fira Code) without requiring administrator privileges. Cross-platform, Windows (HKCU registry), macOS (~/Library/Fonts), Linux (~/.local/share/fonts + fc-cache).
This skill should be used when the user asks to "preprocess doc.md", "tag mermaid for theming", "add classDef tags to my mermaid", "annotate diagrams", "prepare doc for theming", or invokes /md-publisher:preprocess. Scans a markdown document for mermaid flowcharts, decides a universal-tag class (ingress/core/transform/bridge) for each untagged node, rewrites the source in place, and backs up the original. Optionally adds YAML front matter for richer cover-page metadata.
This skill should be used when the user asks to "publish doc.md to PDF", "publish doc.md to DOCX", "render markdown as themed PDF", "render markdown as DOCX", "convert markdown to PDF or Word", "build a themed PDF", "make a PDF with the atlas/phosphor/arcade/bloom theme", "render every theme", "build PDF and DOCX of doc.md", "build and open the PDF", or invokes /md-publisher:publish. Renders any markdown document (with embedded mermaid) to a paged, searchable, themed PDF via WeasyPrint and/or a Microsoft Word DOCX via python-docx, with optional multi-theme rendering and post-build open.
This skill should be used when the user asks to "rebuild themes", "refresh themes after upgrading the plugin", "apply new template defaults to existing themes", "regenerate mermaid-config for installed themes", or invokes /md-publisher:rebuild-themes. Walks built-in and user-installed themes and re-derives `mermaid-config.json` + `preview.html` from each theme's `spec.json`, picking up any template improvements that shipped after the theme was originally created.
This skill should be used when the user asks to "create a custom theme", "design a theme", "make a new theme", "add a brand theme to md-publisher", or invokes /md-publisher:theme-advisor. Walks the user through ~6 focused questions about audience, aesthetic, palette, fonts, and mode, then materializes a working theme directory at ~/.md-publisher/themes/<slug>/ that the publish skill immediately recognizes.
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Create and edit Obsidian vault files including Markdown, Bases, and Canvas. Use when working with .md, .base, or .canvas files in an Obsidian vault.
Find and integrate free 2D game assets into Phaser JS projects. Searches trusted free sources (Kenney, OpenGameArt, itch.io), presents a visual preview UI for selection, downloads assets into your project, and generates ready-to-use Phaser loading code.
Track agent team task assignment, messages, and tool use across Claude Code sessions
Salesforce browser automation via SF CLI authentication - control browser sessions, navigate Lightning pages, fill forms, and manage records
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
A plugin for Claude Code and GitHub Copilot CLI that turns markdown documents — with embedded mermaid diagrams — into themed, searchable, paged PDFs and Microsoft Word DOCX. Built on WeasyPrint and python-docx after two structured toolchain bake-offs (see ~/repos/md-publisher-bakeoff/ for both rounds).
Six skills, seven bundled theme families, and Python pipelines that produce print-ready PDFs and editable DOCX with searchable mermaid text.
| Skill | What it does | Invoke as |
|---|---|---|
publish | Turn a markdown file into a themed PDF or DOCX (or both). | /md-publisher:publish doc.md [--theme atlas --mode light] [--format pdf|docx|both] [--all] [--open] [--no-cover] |
preprocess | LLM-tag mermaid diagrams (:::ingress / :::core / :::transform / :::bridge) so themes color nodes by role. Also auto-fixes misplaced classDiagram tags (e.g. :::core inside a method line) by promoting them to the class header using priority ingress > core > transform > bridge. Rewrites the source in place; original gets backed up. | /md-publisher:preprocess doc.md [--add-frontmatter] |
theme-advisor | Interactive Q&A flow that produces a custom theme module under ~/.md-publisher/themes/<name>/. The generated preview.html includes flowchart, ER, and classDiagram samples so authors can verify diagram styling before publishing. | /md-publisher:theme-advisor |
theme-gallery | List, preview, and pick from built-in + user-installed themes in one combined view. | /md-publisher:theme-gallery |
install-fonts | Per-user install of the Google Fonts the bundled themes use (Newsreader, Sora, JetBrains Mono, IBM Plex Mono, Audiowide, Bungee, Recursive, Playfair Display, DM Sans, Fira Code, Cormorant Garamond, Karla, Source Code Pro, Barlow Condensed, Barlow, Inconsolata). Cross-platform; no admin required. Run once after first DOCX build to fix font substitution. | /md-publisher:install-fonts [--theme atlas --mode dark] [--dry-run] |
rebuild-themes | Refresh installed themes after a plugin upgrade by re-deriving mermaid-config.json + preview.html from each theme's spec.json. Backs up the pre-migration files per theme. | /md-publisher:rebuild-themes [--theme <slug>] |
--format docx (or --format both) produces a Microsoft Word .docx alongside or instead of the PDF. Same theme system, mostly-same fidelity. The DOCX path uses programmatic OOXML via python-docx for full control over page color, fonts, code-block syntax highlighting, and per-theme cover treatments.
A few documented concessions vs the PDF version (see ~/repos/md-publisher-bakeoff/docx/DECISION.md for context):
/md-publisher:install-fonts once after first install.All themes — including default — support both PDF and DOCX output.
Seven bundled theme families: atlas (corporate, customer-facing), phosphor (developer, terminal aesthetic), arcade (gamer, manual aesthetic), meridian (Art Deco geometric luxury), signal (industrial field manual), tundra (Nordic extreme minimal), and default (clean editorial). Atlas, phosphor, arcade, meridian, signal, and tundra each ship in light + dark. Custom themes go to ~/.md-publisher/themes/<slug>/. The gallery resolver checks user themes first, falls back to built-ins.
<source-md-dir>/.md-publisher/<YYYYMMDD-HHMMSS>/<slug>.<pdf|docx> by default. Override with --output <path> (extension must match --format). With --format both, the PDF and DOCX share the same timestamp dir and slug. The same .md-publisher/<timestamp>/ directory holds the backup of the original markdown when preprocess runs.
The first time any skill runs, the plugin bootstraps a Python venv and Node toolchain at ~/.md-publisher/runtime/. This takes ~2 minutes (downloads ~250 MB total: WeasyPrint, python-docx, Pygments, cairosvg, mermaid-cli, and Puppeteer's Chromium). Subsequent runs reuse the cache.
If anything goes wrong with native dep loading (especially WeasyPrint/Cairo on macOS Homebrew installs), run python <plugin-root>/runtime/bootstrap.py --doctor for a platform-specific diagnostic with actionable install/fix instructions.