Agent skill

Baoyu Markdown To HTML

by JimLiu in JimLiu/baoyu-skills

Converts Markdown to styled HTML with WeChat-compatible themes.

MITAuto-check passedDocuments & Office

Install Baoyu Markdown To HTML

skills CLI
$ npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JimLiu/baoyu-skills baoyu-markdown-to-html --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JimLiu/baoyu-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/baoyu-markdown-to-html .claude/skills/baoyu-markdown-to-html && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
baoyu-markdown-to-html
GitHub stars
27k
Used in
1 other repo
Token cost
~2.5k tokens
SKILL.md length
959 words
Files
5 (incl. scripts)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Converts Markdown to styled HTML with WeChat-compatible themes.

  • Works in 5 steps: Pre-check (Chinese Content) → Determine Theme → 5: Determine Citation Mode → …
  • User asks for markdown to html
  • SKILL.md covers User Input Tools, Script Directory, Preferences (EXTEND.md) and Workflow, plus 6 more sections
  • Runs TypeScript scripts from its folder; calls npx; reaches mp.weixin.qq.com

What it does

Baoyu Markdown To HTML is an agent skill from JimLiu/baoyu-skills. 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.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `scripts/main.test.ts`, `scripts/main.ts` and `scripts/package.json`).

It sits in Documents & Office, covering Markdown. It works with Mermaid and WeChat. The licence is MIT.

When your agent uses it

  • User asks for markdown to html
  • Convert md to html
  • Needs styled HTML output from markdown

Example prompts

  • “markdown to html”
  • “convert md to html”
  • “md 转 html”
  • “/baoyu-markdown-to-html”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Pre-check (Chinese Content)
  2. Determine Theme
  3. 5: Determine Citation Mode
  4. Convert
  5. Report Result

What it can do on your machine

Read from SKILL.md and the folder at commit 1567581. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • mp.weixin.qq.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Baoyu Markdown To HTML loads about 2.5k tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 959 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from JimLiu/baoyu-skills at commit 1567581, republished under its MIT licence (© JimLiu). 959 words, ~2,493 tokens.

Download SKILL.mdSave it as .claude/skills/baoyu-markdown-to-html/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
baoyu-markdown-to-html
description
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.
version
1.117.3

Markdown to HTML Converter

Converts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

  1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.
  2. Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
  3. Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.

Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.

Script Directory

Agent Execution: Determine this SKILL.md directory as {baseDir}. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.

ScriptPurpose
scripts/main.tsMain entry point

Preferences (EXTEND.md)

Check EXTEND.md in priority order — the first one found wins:

PriorityPathScope
1.baoyu-skills/baoyu-markdown-to-html/EXTEND.mdProject
2${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.mdXDG
3$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.mdUser home

If none found, use defaults.

EXTEND.md supports: default theme, custom CSS variables, code block style, mermaid defaults (mermaid_theme, mermaid_scale, mermaid_background).

Workflow

Step 0: Pre-check (Chinese Content)

Condition: Only execute if input file contains Chinese text.

Detection:

  1. Read input markdown file
  2. Check if content contains CJK characters (Chinese/Japanese/Korean)
  3. If no CJK content → skip to Step 1

Format Suggestion:

If CJK content detected AND baoyu-format-markdown skill is available:

Use AskUserQuestion to ask whether to format first. Formatting can fix:

  • Bold markers with punctuation inside causing ** parse failures
  • CJK/English spacing issues

If user agrees: Invoke baoyu-format-markdown skill to format the file, then use formatted file as input.

If user declines: Continue with original file.

Step 1: Determine Theme

Theme resolution order (first match wins):

  1. User explicitly specified theme (CLI --theme or conversation)
  2. EXTEND.md default_theme (this skill's own EXTEND.md, checked in Step 0)
  3. baoyu-post-to-wechat EXTEND.md default_theme (cross-skill fallback)
  4. If none found → use AskUserQuestion to confirm

Cross-skill EXTEND.md check (only if this skill's EXTEND.md has no default_theme):

Read $HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md if it exists and look for a default_theme: line. Use the value if present; otherwise fall through.

If theme is resolved from EXTEND.md: Use it directly, do NOT ask the user.

If no default found: use AskUserQuestion to confirm a theme from the Themes table below.

Step 1.5: Determine Citation Mode

Default: Off. Do not ask by default.

Enable only if the user explicitly asks for "微信外链转底部引用", "底部引用", "文末引用", or passes --cite.

Behavior when enabled:

  • Ordinary external links are rendered with numbered superscripts and collected under a final 引用链接 section.
  • https://mp.weixin.qq.com/... links stay as direct links and are not moved to the bottom.
  • Bare links where link text equals URL stay inline.
Step 2: Convert
bash
${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]
Step 3: Report Result

Display the output path from JSON result. If backup was created, mention it.

Show full SKILL.md (467 more words)Show less

Usage

bash
${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]

Options:

OptionDescriptionDefault
--theme <name>Theme name (default, grace, simple, modern)default
--color <name|hex>Primary color: preset name or hex valuetheme default
--font-family <name>Font: sans, serif, serif-cjk, mono, or CSS valuetheme default
--font-size <N>Font size: 14px, 15px, 16px, 17px, 18px16px
--title <title>Override title from frontmatter
--citeConvert external links to bottom citations, append 引用链接 sectionfalse (off)
--keep-titleKeep the first heading in contentfalse (removed)
--mermaid-theme <name>Mermaid theme: default, forest, dark, neutral, basedefault
--mermaid-scale <N>Mermaid render scale (positive number ≤ 4)2
--mermaid-width <N>Mermaid target display width in CSS px; PNG is rendered at width × scale pixels when the diagram is narrower than this860
--mermaid-bg <value>Mermaid background: white, transparent, or #hexwhite
--no-mermaidSkip Mermaid PNG rendering; emit <pre class="mermaid"> fallbackfalse
--helpShow help

Color Presets:

NameHexLabel
blue#0F4C81Classic Blue
green#009874Emerald Green
vermilion#FA5151Vibrant Vermilion
yellow#FECE00Lemon Yellow
purple#92617ELavender Purple
sky#55C9EASky Blue
rose#B76E79Rose Gold
olive#556B2FOlive Green
black#333333Graphite Black
gray#A9A9A9Smoke Gray
pink#FFB7C5Sakura Pink
red#A93226China Red
orange#D97757Warm Orange (modern default)

Examples:

bash
# Basic conversion (uses default theme, removes first heading)
${BUN_X} {baseDir}/scripts/main.ts article.md

# With specific theme
${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace

# Theme with custom color
${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red

# Enable bottom citations for ordinary external links
${BUN_X} {baseDir}/scripts/main.ts article.md --cite

# Keep the first heading in content
${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title

# Override title
${BUN_X} {baseDir}/scripts/main.ts article.md --title "My Article"

Output

File location: Same directory as input markdown file.

  • Input: /path/to/article.md
  • Output: /path/to/article.html

Conflict handling: If HTML file already exists, it will be backed up first:

  • Backup: /path/to/article.html.bak-YYYYMMDDHHMMSS

JSON output to stdout:

json
{
  "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 rendering: Code blocks fenced as ```mermaid are rendered to PNGs via headless Chrome (CDP) and cached at imgs/.mermaid-cache/mermaid-<hash>.png. The cache key includes the code, theme, scale, target width, background, and mermaid version. Add imgs/.mermaid-cache/ to .gitignore if you do not want generated diagrams checked in. Requires Chrome/Chromium/Edge on the system; otherwise the block falls back to <pre class="mermaid">…</pre> and conversion still succeeds.

Themes

ThemeDescription
defaultClassic - traditional layout, centered title with bottom border, H2 with white text on colored background
graceElegant - text shadow, rounded cards, refined blockquotes (by @brzhang)
simpleMinimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km)
modernModern - large radius, pill-shaped titles, relaxed line height (pair with --color red for traditional red-gold style)

Supported Markdown Features

FeatureSyntax
Headings# H1 to ###### H6
Bold/Italic**bold**, *italic*
Code blocks```lang with syntax highlighting
Inline code`code`
TablesGitHub-flavored markdown tables
Images![alt](src)
Links[text](url); add --cite to move ordinary external links into bottom references
Blockquotes> quote
Lists- unordered, 1. ordered
Alerts> [!NOTE], > [!WARNING], etc.
Footnotes[^1] references
Ruby text`{base
Mermaid```mermaid blocks rendered to local PNG via headless Chrome (cached under imgs/.mermaid-cache/); falls back to <pre class="mermaid"> if Chrome is unavailable or rendering fails
PlantUML```plantuml diagrams

Frontmatter

Supports YAML frontmatter for metadata:

yaml
---
title: Article Title
author: Author Name
description: Article summary
---

If no title is found, extracts from first H1/H2 heading or uses filename.

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

© JimLiu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts) in skills/baoyu-markdown-to-html of JimLiu/baoyu-skills.

  • SKILL.md
  • scripts/bun.lock
  • scripts/main.test.ts
  • scripts/main.ts
  • scripts/package.json

Open the folder on GitHubat commit 1567581

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in JimLiu/baoyu-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Baoyu Markdown To HTML next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Baoyu Markdown To HTML compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Baoyu Markdown To HTML this skillJimLiu/baoyu-skills27k1 repos~2.5kAutomated safety check: PassMIT
X Article Publisherwshuyi/x-article-publisher-skill8722 repos~3.6kAutomated safety check: PassMIT
Feishu Docs Exporter and Writerleemysw/feishu-docx268—~1.8kAutomated safety check: PassMIT
Markstream MigrationSimon-He95/markstream-vue3k—~2kAutomated safety check: PassMIT
Qiaomu Epub Book Generatorjoeseesun/qiaomu-epub-book-generator134—~1.1kAutomated safety check: PassNone
Markdown Syntax Guideantdigital-ai/agentic-ui224—~3.1kAutomated safety check: PassMIT

Similar skills

  • X Article Publisher

    wshuyi/x-article-publisher-skill

    Publish Markdown articles to X (Twitter) Articles editor with proper formatting.

    872 GitHub starsUsed in 2 repos~3.6k tokens
    Documents & OfficeAuto-check passed
  • Exports Feishu and Lark documents, sheets, bitables and wikis to Markdown, and creates, appends to or manages cloud docs from the command line.

    268 GitHub stars~1.8k tokensUpdated 17 days ago
    Documents & OfficeAuto-check passed
  • Markstream Migration

    Simon-He95/markstream-vue

    Audit and migrate existing Markdown rendering to Markstream, or upgrade a markstream-vue 1.x integration to 2.x.

    3k GitHub stars~2k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Qiaomu Epub Book Generator

    joeseesun/qiaomu-epub-book-generator

    Generate EPUB ebooks from Markdown files with SVG→PNG conversion, remote/local image embedding, compressed illustrations, and WeChat Reading compatibility.

    134 GitHub stars~1.1k tokensUpdated 6 mo ago
    Documents & OfficeAuto-check passed
  • Markdown Syntax Guide

    antdigital-ai/agentic-ui

    指导用户使用 @ant-design/agentic-ui 的 Markdown Editor / Renderer 扩展语法。图表场景优先使用内置 chart(HTML 注释 chartType + 表格),只有当内置 chartType 都不能表达诉求时才回退 Mermaid。Triggers on keywords like 表格, 视频, 图表, 卡片, 提示块, 流程图, 语法…

    224 GitHub stars~3.1k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Markdown Report Writing

    NeuroAIHub/BrainPilot

    Guide AI agents to write beautifully formatted, well-illustrated Markdown reports with proper structure, diagrams, and compatibility across GitHub and Obsidian.

    1.1k GitHub stars~2.6k tokensUpdated 7 days ago
    Documents & OfficeAuto-check: warnings

More from JimLiu/baoyu-skills

All 22 skills in this repo
  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    27k GitHub starsUsed in 6 repos~3.5k tokens
    Auto-check passed
  • X to Markdown Converter

    JimLiu/baoyu-skills

    Saves tweets, threads and X Articles as Markdown files with YAML front matter, using an unofficial API that asks for your consent first.

    27k GitHub starsUsed in 4 repos~1.8k tokens
    Auto-check: warnings
  • SVG Diagram Generator

    JimLiu/baoyu-skills

    Creates standalone dark-themed SVG diagrams, including architecture, flowchart, sequence, structural, mind map, timeline and state machine types.

    27k GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed
  • Publishes articles and image-text posts to a WeChat Official Account through the API or Chrome CDP, converting markdown to WeChat-ready HTML with link citations.

    27k GitHub starsUsed in 2 repos~3.6k tokens
    Auto-check: warnings
  • Image Compressor

    JimLiu/baoyu-skills

    Compresses images to WebP by default, or to PNG or JPEG, picking the best available tool on the machine and optionally processing whole folders.

    27k GitHub starsUsed in 5 repos~598 tokens
    Auto-check passed
  • Generates text and images through an unofficial, reverse-engineered Gemini Web API, supporting reference images and multi-turn conversations.

    27k GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check passed

Works with

Questions about Baoyu Markdown To HTML

What does Baoyu Markdown To HTML do?

Converts Markdown to styled HTML with WeChat-compatible themes. Baoyu Markdown To HTML is an agent skill from JimLiu/baoyu-skills. Converts Markdown to styled HTML with WeChat-compatible themes.

When should I use Baoyu Markdown To HTML?

Baoyu Markdown To HTML fits situations like: user asks for markdown to html; convert md to html; needs styled HTML output from markdown.

How do I install Baoyu Markdown To HTML in Claude Code?

Run `npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a claude-code`. Or copy the skill folder (skills/baoyu-markdown-to-html in JimLiu/baoyu-skills) into .claude/skills/baoyu-markdown-to-html in your project. Claude Code loads it when a task matches its description.

How do I install Baoyu Markdown To HTML in Codex?

Run `npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a codex`. Or copy the skill folder (skills/baoyu-markdown-to-html in JimLiu/baoyu-skills) into .agents/skills/baoyu-markdown-to-html in your project. Codex loads it when a task matches its description.

Can I use Baoyu Markdown To HTML in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JimLiu/baoyu-skills --skill baoyu-markdown-to-html -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/baoyu-markdown-to-html, .gemini/skills/baoyu-markdown-to-html, .github/skills/baoyu-markdown-to-html and .opencode/skills/baoyu-markdown-to-html in your project.

What does Baoyu Markdown To HTML need to run?

Going by SKILL.md and its folder, Baoyu Markdown To HTML needs TypeScript for the scripts in its folder and the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Baoyu Markdown To HTML access the network?

SKILL.md names 1 domain. In commands or code: mp.weixin.qq.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Baoyu Markdown To HTML safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Baoyu Markdown To HTML use?

Baoyu Markdown To HTML is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Baoyu Markdown To HTML use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Baoyu Markdown To HTML?

Skills that share tags, products or a category with Baoyu Markdown To HTML: X Article Publisher (wshuyi/x-article-publisher-skill, 872 stars), Feishu Docs Exporter and Writer (leemysw/feishu-docx, 268 stars), Markstream Migration (Simon-He95/markstream-vue, 3k stars) and Qiaomu Epub Book Generator (joeseesun/qiaomu-epub-book-generator, 134 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Baoyu Markdown To HTML?

JimLiu (a GitHub user) maintains it in JimLiu/baoyu-skills, which has 26,507 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on September 10, 2026.

Source: JimLiu/baoyu-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.