szsip239/teamclaw/baoyu-markdown-to-html
Claude Code and agent skill by szsip239/teamclaw
- community
Checking that the SKILL.md file is still in the repository.
Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, PlantUML, footnotes, alerts, and infographics. Use when user asks for "markdown to html", "convert md to html", "md转html", or needs styled HTML output from markdown.
Install
npx vskill@latest install szsip239/teamclaw/baoyu-markdown-to-htmlSKILL.md
The same SKILL.md was published earlier as szsip239/teamclaw/baoyu-markdown-to-html.
Markdown to HTML Converter
Converts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.
Script Directory
Agent Execution: Determine this SKILL.md directory as SKILL_DIR, then use ${SKILL_DIR}/scripts/<name>.ts.
| Script | Purpose | |
|---|---|---|
scripts/main.ts | Main entry point |
Preferences (EXTEND.md)
Use Bash to check EXTEND.md existence (priority order):
┌──────────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-markdown-to-html/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md │ User home │ └──────────────────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md Supports: Default theme | Custom CSS variables | Code block style
Workflow
Step 0: Pre-check (Chinese Content)
Condition: Only execute if input file contains Chinese text.
Detection:
- Read input markdown file
- Check if content contains CJK characters (Chinese/Japanese/Korean)
- 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):
- User explicitly specified theme (CLI
--themeor conversation) - EXTEND.md
default_theme(this skill's own EXTEND.md, checked in Step 0) baoyu-post-to-wechatEXTEND.mddefault_theme(cross-skill fallback)- If none found → use AskUserQuestion to confirm
Cross-skill EXTEND.md check (only if this skill's EXTEND.md has no default_theme):
If theme is resolved from EXTEND.md: Use it directly, do NOT ask the user.
If no default found: Use AskUserQuestion to confirm:
| Theme | Description | |
|---|---|---|
default (Recommended) | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 | |
grace | 优雅主题 - 文字阴影,圆角卡片,精致引用块 | |
simple | 简洁主题 - 现代极简风,不对称圆角,清爽留白 | |
modern | 现代主题 - 大圆角、药丸形标题、宽松行距(搭配 --color red 还原传统红金风格) |
Step 2: Convert
Step 3: Report Result
Display the output path from JSON result. If backup was created, mention it.
Usage
Options:
| Option | Description | Default | ||
|---|---|---|---|---|
--theme <name> | Theme name (default, grace, simple, modern) | default | ||
| `--color <name\ | hex>` | Primary color: preset name or hex value | theme default | |
--font-family <name> | Font: sans, serif, serif-cjk, mono, or CSS value | theme default | ||
--font-size <N> | Font size: 14px, 15px, 16px, 17px, 18px | 16px | ||
--title <title> | Override title from frontmatter | |||
--keep-title | Keep the first heading in content | false (removed) | ||
--help | Show help |
Color Presets:
| Name | Hex | Label | |
|---|---|---|---|
| blue | #0F4C81 | 经典蓝 | |
| green | #009874 | 翡翠绿 | |
| vermilion | #FA5151 | 活力橘 | |
| yellow | #FECE00 | 柠檬黄 | |
| purple | #92617E | 薰衣紫 | |
| sky | #55C9EA | 天空蓝 | |
| rose | #B76E79 | 玫瑰金 | |
| olive | #556B2F | 橄榄绿 | |
| black | #333333 | 石墨黑 | |
| gray | #A9A9A9 | 雾烟灰 | |
| pink | #FFB7C5 | 樱花粉 | |
| red | #A93226 | 中国红 | |
| orange | #D97757 | 暖橘 (modern default) |
Examples:
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:
Themes
| Theme | Description | |
|---|---|---|
default | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 | |
grace | 优雅主题 - 文字阴影,圆角卡片,精致引用块 (by @brzhang) | |
simple | 简洁主题 - 现代极简风,不对称圆角,清爽留白 (by @okooo5km) | |
modern | 现代主题 - 大圆角、药丸形标题、宽松行距(搭配 --color red 还原传统红金风格) |
Supported Markdown Features
| Feature | Syntax | ||
|---|---|---|---|
| Headings | # H1 to ###### H6 | ||
| Bold/Italic | **bold**, *italic* | ||
| Code blocks | `lang with syntax highlighting | ||
| Inline code | ` code ` | ||
| Tables | GitHub-flavored markdown tables | ||
| Images |  | ||
| Links | [text](url) with footnote references | ||
| Blockquotes | > quote | ||
| Lists | - unordered, 1. ordered | ||
| Alerts | > [!NOTE], > [!WARNING], etc. | ||
| Footnotes | [^1] references | ||
| Ruby text | `{base | annotation}` | |
| Mermaid | `mermaid diagrams | ||
| PlantUML | `plantuml diagrams |
Frontmatter
Supports YAML frontmatter for metadata:
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.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdata/skills/content-skills/baoyu-markdown-to-html/SKILL.md
Popularity
- Repository stars
- 102
- Repository forks
- 14
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/szsip239/teamclaw/baoyu-markdown-to-html)