baoyu-markdown-to-html
Qué hace
Esta skill convierte markdown en páginas web cuidadas con estilos en línea. Está pensada para escritores y desarrolladores que quieren su texto listo para publicar en la web o en WeChat.
Cuándo usarla
- ✓Cuando tienes un artículo en markdown y lo necesitas como HTML con estilos.
- ✓Cuando quieres publicar en WeChat y necesitas un formato compatible.
- ✓Cuando tu markdown tiene código, matemáticas o diagramas que deben verse en el HTML.
Link de la skill
https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-markdown-to-html/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Convierte mi artículo en markdown a HTML con un tema limpio que funcione en WeChat.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Tu agente lee el markdown, aplica un tema con CSS en línea, renderiza el código, las matemáticas y los diagramas, y genera un archivo HTML.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Markdown to HTML Converter
Output is HTML with inline CSS, optimized for WeChat Official Account.
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
- Prefer built-in user-input tools exposed by the current agent runtime — e.g.,
AskUserQuestion,request_user_input,clarify,ask_user, or any equivalent. - 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.
- 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
{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: bun if installed → else npx -y bun → else suggest installing bun.
| Script | Purpose |
|---|---|
scripts/main.ts |
Main entry point |
Preferences (EXTEND.md)
First found wins:
| Priority | Path | Scope |
|---|---|---|
| 1 | .baoyu-skills/baoyu-markdown-to-html/EXTEND.md |
Project |
| 2 | ${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md |
XDG |
| 3 | $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md |
User home |
None found → use defaults.
Supported: default theme, custom CSS variables, code block style, mermaid defaults (mermaid_theme, mermaid_scale, mermaid_background).
Workflow
Step 0: Pre-check (CJK Content)
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.
Step 1: Determine Theme
First match wins:
- User-specified (CLI
--themeor conversation) - This skill's EXTEND.md
default_theme - Cross-skill fallback (only if step 2 has none):
default_theme:line in$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md, if it exists - None → ask (
AskUserQuestion) with the Themes table
Theme from EXTEND.md → use it directly, do NOT ask.
Step 1.5: Determine Citation Mode
Default off; don't ask. Enable (--cite) only if the user explicitly asks for "微信外链转底部引用", "底部引用", "文末引用", or passes --cite. 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
${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]
Step 3: Report Result
Show htmlPath from the JSON result; mention backupPath if a backup was created.
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 | |
--cite |
Convert external links to bottom citations, append 引用链接 section |
false (off) |
--keep-title |
Keep the first heading in content | false (removed) |
--mermaid-theme <name> |
Mermaid theme: default, forest, dark, neutral, base |
default |
--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 this |
860 |
--mermaid-bg <value> |
Mermaid background: white, transparent, or #hex |
white |
--no-mermaid |
Skip Mermaid PNG rendering; emit <pre class="mermaid"> fallback |
false |
--help |
Show help |
Color Presets:
| Name | Hex | Label |
|---|---|---|
| blue | #0F4C81 | Classic Blue |
| green | #009874 | Emerald Green |
| vermilion | #FA5151 | Vibrant Vermilion |
| yellow | #FECE00 | Lemon Yellow |
| purple | #92617E | Lavender Purple |
| sky | #55C9EA | Sky Blue |
| ro |
Preguntas frecuentes
¿Funciona con WeChat?
Sí. El resultado está pensado para artículos de cuentas oficiales de WeChat, con estilos en línea.
¿Se pueden mover los enlaces externos al final?
Sí. Puede convertir los enlaces externos en citas al pie, lo que encaja con el formato de WeChat.
¿Renderiza diagramas?
Sí. Admite Mermaid, renderizado a PNG con Chrome en modo headless, y PlantUML.
Detalles
Descripción original del autor
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.
repo: JimLiu/baoyu-skills
Popularidad
- Estrellas en GitHub
- 27 mil
- Posición en el ranking
- #9959
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
release-skills
27 milGuía a tu agente en una publicación de cualquier proyecto: subir la versión, actualizar el changelog y publicar una release o etiqueta en GitHub.
baoyu-article-illustrator
27 milAyuda a tu agente a añadir ilustraciones a un artículo, buscando los puntos que necesitan imágenes y creándolas con un estilo coherente.
baoyu-comic
27 milEnseña a tu agente a crear un cómic educativo con viñetas, estilos artísticos y tonos, como una biografía o un tutorial.
baoyu-compress-image
27 milPermite que tu agente reduzca el tamaño de imágenes convirtiéndolas a WebP o PNG, con selección automática de herramienta, para que carguen más rápido.
Skills parecidas
angular-developer
280 milAyuda a tu agente con código de Angular y la estructura del proyecto. Útil para empezar proyectos, crear partes de código o mejorar el rendimiento y la accesibilidad.
frontend-a11y
280 milAyuda a tu agente a hacer que las interfaces web sean accesibles para todos. Asegura que sitios y apps funcionen bien con lectores de pantalla y navegación por teclado.
frontend-patterns
280 milHace que tu agente aplique patrones modernos en desarrollo frontend. Optimiza el rendimiento, gestiona el estado y sigue buenas prácticas en React y Next.js.