- name
Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, footnotes, alerts, infographics, and optional
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/JimLiu/baoyu-skills/tree/HEAD/skills/baoyu-markdown-to-htmlFrom the publisher
Output is HTML with inline CSS, optimized for WeChat Official Account.
When this skill prompts the user, follow this tool-selection rule (priority order):
AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.
{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: bun if installed → else npx -y bun → else suggest installing bun.
First found wins:
None found → use defaults.
Supported: default theme, custom CSS variables, code block style, mermaid defaults (mermaid_theme, mermaid_scale, mermaid_background).
Only if the input contains CJK characters AND the baoyu-format-markdown skill is available: ask (AskUserQuestion) whether to format first — it fixes ** bold markers broken by inner punctuation and CJK/English spacing. Agree → run baoyu-format-markdown, use the formatted file. Decline → use the original. No CJK → skip to Step 1.
First match wins:
--theme or conversation)default_themedefault_theme: line in $HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md, if it existsAskUserQuestion) with the Themes tableTheme from EXTEND.md → use it directly, do NOT ask.
Default off; don't ask. Enable (--cite) only if the user explicitly asks for "微信外链转底部引用", "底部引用", "文末引用", or passes --cite. When enabled:
引用链接 section.https://mp.weixin.qq.com/... links stay as direct links and are not moved to the bottom.${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]
Show htmlPath from the JSON result; mention backupPath if a backup was created.
Color Presets:
Examples:
${BUN_X} {baseDir}/scripts/main.ts article.md # default theme, first heading removed
${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red
${BUN_X} {baseDir}/scripts/main.ts article.md --cite --keep-title --title "My Article"
/path/to/article.md → /path/to/article.html (same directory). An existing HTML file is first backed up to /path/to/article.html.bak-YYYYMMDDHHMMSS.
JSON to stdout:
{
"title": "Article Title",
"author": "Author Name",
"summary": "Article summary...",
"htmlPath": "/path/to/article.html",
"backupPath": "/path/to/article.html.bak-20260128180000",
"contentImages": [
{
"placeholder": "MDTOHTMLIMGPH_1",
"localPath": "/path/to/img.png",
"originalPath": "imgs/image.png"
}
],
"mermaidImages": [
{
"hash": "a1b2c3d4e5f6",
"localPath": "/path/to/imgs/.mermaid-cache/mermaid-a1b2c3d4e5f6.png",
"cached": false
}
]
}
Mermaid: ```mermaid blocks are rendered to PNG via headless Chrome (CDP), cached at imgs/.mermaid-cache/mermaid-<hash>.png (key: code, theme, scale, target width, background, mermaid version; suggest adding the dir to .gitignore). Needs Chrome/Chromium/Edge; if unavailable or rendering fails, falls back to <pre class="mermaid">…</pre> and conversion still succeeds.
Standard GFM (headings, emphasis, lists, tables, images, links, blockquotes, inline code) plus:
title, author, description (summary). No title → first H1/H2, else filename.
Custom configuration via EXTEND.md — see Preferences.
© 2026 Skills Rack.
---name: baoyu-markdown-to-htmldescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid…---# skills/baoyu-markdown-to-html/SKILL.mdOverview
Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, footnotes, alerts, infographics, and optional bottom citations for external links. Use when user asks for "markdown to html", "convert md to html", "md 转 html", "微信外链转底部引用", or needs styled HTML output from markdown.
FAQ
Download skills/baoyu-markdown-to-html/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/JimLiu/baoyu-skills.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.