{"id":"5a09677d-cff3-491d-b0b8-999c7f92332b","entityType":"agent","slug":"clawhub-jimliu-baoyu-markdown-to-html","name":"Baoyu Markdown To Html","canonicalUrl":"https://www.xpersona.co/agent/clawhub-jimliu-baoyu-markdown-to-html","canonicalPath":"/agent/clawhub-jimliu-baoyu-markdown-to-html","generatedAt":"2026-10-09T19:20:22.438Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T05:08:22.726Z","emptyReason":null},"description":"Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, fo... Skill: Baoyu Markdown To Html Owner: jimliu Summary: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, fo... Tags: latest:1.117.3 Version history: v1.117.3 | 2026-06-01T03:31:03.233Z | user Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1. v1.117.2 | 2026-05-18T02:15:34.882Z | u","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 4.6K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17dfbhg0khk4fvtnx0stqg0yx83j25z:baoyu-markdown-to-html","sourceUrl":"https://clawhub.ai/jimliu/baoyu-markdown-to-html","homepage":"https://clawhub.ai/jimliu/skills/baoyu-markdown-to-html","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/jimliu/baoyu-markdown-to-html","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/jimliu/skills/baoyu-markdown-to-html","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, fo..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T05:08:22.726Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T05:08:22.726Z","emptyReason":null},"stars":null,"forks":null,"downloads":4590,"packageName":null,"latestVersion":"1.117.3","tractionLabel":"4.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T05:08:22.726Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T05:08:22.726Z","lastCrawledAt":"2026-10-09T05:08:22.726Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T05:08:22.726Z","lastVerifiedAt":null,"highlights":[{"version":"1.117.3","createdAt":"2026-06-01T03:31:03.233Z","changelog":"Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1.","fileCount":7,"zipByteSize":21544},{"version":"1.117.2","createdAt":"2026-05-18T02:15:34.882Z","changelog":"## 1.117.2 - 2026-05-17 ### Documentation - `baoyu-cover-image`: ban programmatic text repair on generated bitmaps — disallow ImageMagick / Pillow / Canvas / SVG / HTML overlays to cover, rewrite, or replace title/subtitle text; regenerate from a corrected prompt or switch to a lower-text or no-title variant instead - `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-image-cards`, `baoyu-xhs-images`, `baoyu-infographic`, `baoyu-slide-deck`: sync the same text-repair ban with skill-specific text categories (labels/captions, dialogue/sound effects, titles/body/tags, headings/data values, slide titles/bullets)","fileCount":7,"zipByteSize":19215},{"version":"1.115.4","createdAt":"2026-05-11T23:49:22.806Z","changelog":"### Documentation - Image generation backend selection: emphasize Codex `imagegen` as the priority runtime-native tool (invoke via the `Skill` tool with `skill: \"imagegen\"`) and forbid SVG/HTML/canvas substitution when no raster backend can be resolved — fall through to asking the user instead of silently emitting code-based art. Updated in `docs/image-generation-tools.md` and inlined into `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-cover-image`, `baoyu-image-cards`, `baoyu-infographic`, `baoyu-slide-deck`, and `baoyu-xhs-images`.","fileCount":6,"zipByteSize":17943},{"version":"1.103.2","createdAt":"2026-04-21T22:02:52.529Z","changelog":"- Removed bundled vendor directory and all built-in code highlighting theme assets. - Switched to using external dependencies for Markdown-to-HTML conversion and styling. - Simplified internal scripts and significantly reduced overall code size. - No change to user-facing options or workflow; core usage remains the same.","fileCount":6,"zipByteSize":17942},{"version":"1.103.1","createdAt":"2026-04-13T16:16:05.743Z","changelog":"## 1.103.1 - 2026-04-13 ### Fixes - `baoyu-markdown-to-html`: decode HTML entities and strip tags from article summary - `baoyu-post-to-weibo`: decode HTML entities and strip tags from article summary","fileCount":109,"zipByteSize":111641},{"version":"1.103.0","createdAt":"2026-04-13T01:21:00.040Z","changelog":"## 1.103.0 - 2026-04-12 ### Features - baoyu-diagram: add multi-diagram mode for article-wide diagram generation ### Fixes - baoyu-article-illustrator: prevent color names and hex codes from appearing as visible text in generated images - baoyu-cover-image: prevent color names and hex codes from appearing as visible text in generated images - baoyu-image-cards: prevent color names from appearing as visible text in generated images - baoyu-post-to-wechat: decode HTML entities and strip tags from article summary","fileCount":109,"zipByteSize":111641},{"version":"1.76.3","createdAt":"2026-04-09T16:27:53.299Z","changelog":"- Remove test files from the Markdown to HTML conversion module to streamline the codebase. - scripts/vendor/baoyu-md/src/*.test.ts files deleted. - No changes made to runtime logic or user-facing features.","fileCount":107,"zipByteSize":101039},{"version":"1.76.2","createdAt":"2026-03-25T21:32:35.180Z","changelog":"- Removed unnecessary files: `scripts/bun.lock` and `scripts/vendor/baoyu-md/src/LICENSE` - No user-facing functionality changes - Internal cleanup to reduce repository bloat","fileCount":112,"zipByteSize":107385}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17dfbhg0khk4fvtnx0stqg0yx83j25z:baoyu-markdown-to-html","setupComplexity":"low","setupSteps":["Node.js workspace detected. Install dependencies securely: run `npm ci --ignore-scripts` to prevent post-install lifecycle triggers from running arbitrary code, then selectively audit the dependency tree.","Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T19:20:22.436Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-markdown-to-html/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T05:08:22.726Z","emptyReason":null},"readme":"Skill: Baoyu Markdown To Html\n\nOwner: jimliu\n\nSummary: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, fo...\n\nTags: latest:1.117.3\n\nVersion history:\n\nv1.117.3 | 2026-06-01T03:31:03.233Z | user\n\nFix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1.\n\nv1.117.2 | 2026-05-18T02:15:34.882Z | user\n\n## 1.117.2 - 2026-05-17\n\n### Documentation\n- `baoyu-cover-image`: ban programmatic text repair on generated bitmaps — disallow ImageMagick / Pillow / Canvas / SVG / HTML overlays to cover, rewrite, or replace title/subtitle text; regenerate from a corrected prompt or switch to a lower-text or no-title variant instead\n- `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-image-cards`, `baoyu-xhs-images`, `baoyu-infographic`, `baoyu-slide-deck`: sync the same text-repair ban with skill-specific text categories (labels/captions, dialogue/sound effects, titles/body/tags, headings/data values, slide titles/bullets)\n\nv1.115.4 | 2026-05-11T23:49:22.806Z | user\n\n### Documentation\n- Image generation backend selection: emphasize Codex `imagegen` as the priority runtime-native tool (invoke via the `Skill` tool with `skill: \"imagegen\"`) and forbid SVG/HTML/canvas substitution when no raster backend can be resolved — fall through to asking the user instead of silently emitting code-based art. Updated in `docs/image-generation-tools.md` and inlined into `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-cover-image`, `baoyu-image-cards`, `baoyu-infographic`, `baoyu-slide-deck`, and `baoyu-xhs-images`.\n\nv1.103.2 | 2026-04-21T22:02:52.529Z | auto\n\n- Removed bundled vendor directory and all built-in code highlighting theme assets.\n- Switched to using external dependencies for Markdown-to-HTML conversion and styling.\n- Simplified internal scripts and significantly reduced overall code size.\n- No change to user-facing options or workflow; core usage remains the same.\n\nv1.103.1 | 2026-04-13T16:16:05.743Z | user\n\n## 1.103.1 - 2026-04-13\n\n### Fixes\n- `baoyu-markdown-to-html`: decode HTML entities and strip tags from article summary\n- `baoyu-post-to-weibo`: decode HTML entities and strip tags from article summary\n\nv1.103.0 | 2026-04-13T01:21:00.040Z | user\n\n## 1.103.0 - 2026-04-12\n\n### Features\n- baoyu-diagram: add multi-diagram mode for article-wide diagram generation\n\n### Fixes\n- baoyu-article-illustrator: prevent color names and hex codes from appearing as visible text in generated images\n- baoyu-cover-image: prevent color names and hex codes from appearing as visible text in generated images\n- baoyu-image-cards: prevent color names from appearing as visible text in generated images\n- baoyu-post-to-wechat: decode HTML entities and strip tags from article summary\n\nv1.76.3 | 2026-04-09T16:27:53.299Z | auto\n\n- Remove test files from the Markdown to HTML conversion module to streamline the codebase.\n- scripts/vendor/baoyu-md/src/*.test.ts files deleted.\n- No changes made to runtime logic or user-facing features.\n\nv1.76.2 | 2026-03-25T21:32:35.180Z | auto\n\n- Removed unnecessary files: `scripts/bun.lock` and `scripts/vendor/baoyu-md/src/LICENSE`\n- No user-facing functionality changes\n- Internal cleanup to reduce repository bloat\n\nv1.76.1 | 2026-03-22T04:23:45.718Z | auto\n\n- Improved HTML rendering logic in the markdown-to-HTML pipeline.\n- Updated and expanded test coverage for document parsing and HTML output.\n- Refined theme definitions and HTML builder for greater style consistency.\n- Various internal test adjustments and minor code cleanups.\n\nv1.74.0 | 2026-03-21T04:12:44.226Z | user\n\n### Features\n- CLI now supports all rendering options — color, font-family, font-size, code-theme, mac-code-block, line-number, count, legend\n\n### Fixes\n- Fix CSS custom property regex to handle quoted values; grace/simple themes now layer default CSS\n\nv1.60.0 | 2026-03-12T03:50:28.737Z | user\n\n## 1.60.0 - 2026-03-11\n\n### Features\n- `baoyu-url-to-markdown`: support reusing existing Chrome CDP instances and fix port detection order\n\n### Fixes\n- `baoyu-post-to-x`: add missing `fs` import in x-article\n\n### Refactor\n- Unify all CDP skills to use shared `baoyu-chrome-cdp` package with vendored copies\n- Simplify CLAUDE.md, move detailed documentation to `docs/` directory\n- Publish skills directly from synced vendor, removing separate artifact preparation step\n\nArchive index:\n\nArchive v1.117.3: 7 files, 21544 bytes\n\nFiles: scripts/bun.lock (23718b), scripts/main.test.ts (3587b), scripts/main.ts (12398b), scripts/package.json (170b), skill-card.md (2451b), SKILL.md (10060b), _meta.json (143b)\n\nFile v1.117.3:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: 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.\nversion: 1.117.3\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## User Input Tools\n\nWhen this skill prompts the user, follow this tool-selection rule (priority order):\n\n1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.\n2. **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.\n3. **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.\n\nConcrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md in priority order — the first one found wins:\n\n| Priority | Path | Scope |\n|----------|------|-------|\n| 1 | `.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | Project |\n| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | XDG |\n| 3 | `$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | User home |\n\nIf none found, use defaults.\n\n**EXTEND.md supports**: default theme, custom CSS variables, code block style, mermaid defaults (`mermaid_theme`, `mermaid_scale`, `mermaid_background`).\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\nRead `$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.\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: use `AskUserQuestion` to confirm a theme from the [Themes](#themes) table below.\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--mermaid-theme <name>` | Mermaid theme: `default`, `forest`, `dark`, `neutral`, `base` | default |\n| `--mermaid-scale <N>` | Mermaid render scale (positive number ≤ 4) | 2 |\n| `--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 |\n| `--mermaid-bg <value>` | Mermaid background: `white`, `transparent`, or `#hex` | white |\n| `--no-mermaid` | Skip Mermaid PNG rendering; emit `<pre class=\"mermaid\">` fallback | false |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ],\n  \"mermaidImages\": [\n    {\n      \"hash\": \"a1b2c3d4e5f6\",\n      \"localPath\": \"/path/to/imgs/.mermaid-cache/mermaid-a1b2c3d4e5f6.png\",\n      \"cached\": false\n    }\n  ]\n}\n```\n\n**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.\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| 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 |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.117.3:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.117.3\",\n  \"publishedAt\": 1780284663233\n}\n\nFile v1.117.3:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"^0.1.1\",\n    \"baoyu-md\": \"^0.1.1\"\n  }\n}\n\nFile v1.117.3:skill-card.md\n\n## Description:\n\nConverts Markdown to styled HTML with WeChat-compatible themes, including code highlighting, math, Mermaid PNG rendering through headless Chrome, PlantUML, footnotes, alerts, infographics, and optional bottom citations for external links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[jimliu](https://clawhub.ai/user/jimliu)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, content authors, and agents use this skill to convert Markdown files into styled HTML suitable for WeChat Official Account and similar publishing workflows. It is useful when the user needs themed HTML output, Mermaid or PlantUML rendering, image handling, or optional bottom citations for external links.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill may download or invoke a Bun runtime at use time through the npx fallback.\n\nMitigation: Prefer a preinstalled, trusted Bun runtime and review the runtime path before installation or execution.\n\nRisk: Markdown containing remote image URLs can cause the user's machine to fetch external resources during conversion.\n\nMitigation: Convert only trusted Markdown, or remove and review remote image URLs before running the skill.\n\nRisk: The conversion writes HTML output, creates backups, and may create Mermaid cache files beside the input.\n\nMitigation: Run the skill with limited filesystem access and inspect output paths before using it on important files.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/jimliu/skills/baoyu-markdown-to-html)\n- [Metadata homepage](https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html)\n\n## Skill Output:\n\n**Output Type(s):** [Shell commands, Files, JSON]\n\n**Output Format:** [Markdown guidance with shell command examples; generated HTML files and JSON conversion results]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Creates an HTML file beside the input Markdown file, may create timestamped backups for existing HTML files, and may cache Mermaid PNG files under imgs/.mermaid-cache.]\n\n## Skill Version(s):\n\n1.117.3 (source: SKILL.md frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.117.2: 7 files, 19215 bytes\n\nFiles: scripts/bun.lock (23520b), scripts/main.test.ts (1756b), scripts/main.ts (7570b), scripts/package.json (136b), skill-card.md (2394b), SKILL.md (8594b), _meta.json (143b)\n\nFile v1.117.2:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## User Input Tools\n\nWhen this skill prompts the user, follow this tool-selection rule (priority order):\n\n1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.\n2. **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.\n3. **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.\n\nConcrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md in priority order — the first one found wins:\n\n| Priority | Path | Scope |\n|----------|------|-------|\n| 1 | `.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | Project |\n| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | XDG |\n| 3 | `$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | User home |\n\nIf none found, use defaults.\n\n**EXTEND.md supports**: default theme, custom CSS variables, code block style.\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\nRead `$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.\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: use `AskUserQuestion` to confirm a theme from the [Themes](#themes) table below.\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.117.2:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.117.2\",\n  \"publishedAt\": 1779070534882\n}\n\nFile v1.117.2:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"^0.1.0\"\n  }\n}\n\nFile v1.117.2:skill-card.md\n\n## Description: <br>\nConverts Markdown to styled HTML with WeChat-compatible themes, including support for code highlighting, math, PlantUML, footnotes, alerts, infographics, and optional bottom citations for external links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[jimliu](https://clawhub.ai/user/jimliu) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, content creators, and publishing teams use this skill to convert Markdown articles into styled HTML suitable for WeChat Official Account and similar publishing workflows. It helps choose conversion options, run the bundled converter, and report the generated HTML output path. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can create or replace a same-named HTML file in the input Markdown file's directory. <br>\nMitigation: Run it on intended Markdown files in a controlled workspace and review generated HTML and backup files before publishing. <br>\nRisk: Markdown image references may cause remote images to be fetched during conversion. <br>\nMitigation: Review image URLs and network expectations in the source Markdown before running the converter. <br>\nRisk: Local EXTEND.md preference files can change themes or styling. <br>\nMitigation: Review project or user preference files when reproducible output or publishing style matters. <br>\n\n\n## Reference(s): <br>\n- [Baoyu Markdown To Html ClawHub page](https://clawhub.ai/jimliu/baoyu-markdown-to-html) <br>\n- [baoyu-skills homepage](https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Shell commands, Files, Configuration guidance] <br>\n**Output Format:** [HTML file plus JSON conversion result and brief Markdown status] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Writes an .html file next to the input Markdown file and backs up an existing HTML output with a timestamped .bak suffix.] <br>\n\n## Skill Version(s): <br>\n1.117.2 (source: ClawHub release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.115.4: 6 files, 17943 bytes\n\nFiles: scripts/bun.lock (23520b), scripts/main.test.ts (1756b), scripts/main.ts (7570b), scripts/package.json (136b), SKILL.md (8594b), _meta.json (143b)\n\nFile v1.115.4:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## User Input Tools\n\nWhen this skill prompts the user, follow this tool-selection rule (priority order):\n\n1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.\n2. **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.\n3. **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.\n\nConcrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md in priority order — the first one found wins:\n\n| Priority | Path | Scope |\n|----------|------|-------|\n| 1 | `.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | Project |\n| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | XDG |\n| 3 | `$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | User home |\n\nIf none found, use defaults.\n\n**EXTEND.md supports**: default theme, custom CSS variables, code block style.\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\nRead `$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.\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: use `AskUserQuestion` to confirm a theme from the [Themes](#themes) table below.\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.115.4:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.115.4\",\n  \"publishedAt\": 1778543362806\n}\n\nFile v1.115.4:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"^0.1.0\"\n  }\n}\n\nArchive v1.103.2: 6 files, 17942 bytes\n\nFiles: scripts/bun.lock (23520b), scripts/main.test.ts (1756b), scripts/main.ts (7570b), scripts/package.json (136b), SKILL.md (8594b), _meta.json (143b)\n\nFile v1.103.2:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## User Input Tools\n\nWhen this skill prompts the user, follow this tool-selection rule (priority order):\n\n1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.\n2. **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.\n3. **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.\n\nConcrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md in priority order — the first one found wins:\n\n| Priority | Path | Scope |\n|----------|------|-------|\n| 1 | `.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | Project |\n| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | XDG |\n| 3 | `$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | User home |\n\nIf none found, use defaults.\n\n**EXTEND.md supports**: default theme, custom CSS variables, code block style.\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\nRead `$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.\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: use `AskUserQuestion` to confirm a theme from the [Themes](#themes) table below.\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.103.2:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.103.2\",\n  \"publishedAt\": 1776808972529\n}\n\nFile v1.103.2:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"^0.1.0\"\n  }\n}\n\nArchive v1.103.1: 109 files, 111641 bytes\n\nFiles: scripts/bun.lock (23448b), scripts/main.test.ts (1755b), scripts/main.ts (7614b), scripts/package.json (152b), scripts/vendor/baoyu-md/package.json (478b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b), scripts/vendor/baoyu-md/src/code-themes/xcode.min.css (945b), scripts/vendor/baoyu-md/src/code-themes/xt256.min.css (765b), scripts/vendor/baoyu-md/src/constants.ts (3338b)\n\nFile v1.103.1:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-markdown-to-html/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────────────────┬───────────────────┐\n│                             Path                             │     Location      │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-markdown-to-html/EXTEND.md               │ Project directory │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md         │ User home         │\n└──────────────────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default theme | Custom CSS variables | Code block style\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\n```bash\n# Check baoyu-post-to-wechat EXTEND.md for default_theme\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" && grep -o 'default_theme:.*' \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\") { Select-String -Pattern 'default_theme:.*' -Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" | ForEach-Object { $_.Matches.Value } }\n```\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: Use AskUserQuestion to confirm:\n\n| Theme | Description |\n|-------|-------------|\n| `default` (Recommended) | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.103.1:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.103.1\",\n  \"publishedAt\": 1776096965743\n}\n\nFile v1.103.1:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.103.1:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.103.1:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n\nArchive v1.103.0: 109 files, 111641 bytes\n\nFiles: scripts/bun.lock (23448b), scripts/main.test.ts (1755b), scripts/main.ts (7614b), scripts/package.json (152b), scripts/vendor/baoyu-md/package.json (478b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b), scripts/vendor/baoyu-md/src/code-themes/xcode.min.css (945b), scripts/vendor/baoyu-md/src/code-themes/xt256.min.css (765b), scripts/vendor/baoyu-md/src/constants.ts (3338b)\n\nFile v1.103.0:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-markdown-to-html/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────────────────┬───────────────────┐\n│                             Path                             │     Location      │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-markdown-to-html/EXTEND.md               │ Project directory │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md         │ User home         │\n└──────────────────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default theme | Custom CSS variables | Code block style\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\n```bash\n# Check baoyu-post-to-wechat EXTEND.md for default_theme\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" && grep -o 'default_theme:.*' \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\") { Select-String -Pattern 'default_theme:.*' -Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" | ForEach-Object { $_.Matches.Value } }\n```\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: Use AskUserQuestion to confirm:\n\n| Theme | Description |\n|-------|-------------|\n| `default` (Recommended) | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.103.0:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.103.0\",\n  \"publishedAt\": 1776043260040\n}\n\nFile v1.103.0:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.103.0:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.103.0:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n\nArchive v1.76.3: 107 files, 101039 bytes\n\nFiles: scripts/main.test.ts (1755b), scripts/main.ts (7614b), scripts/package.json (152b), scripts/vendor/baoyu-md/package.json (478b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b), scripts/vendor/baoyu-md/src/code-themes/xcode.min.css (945b), scripts/vendor/baoyu-md/src/code-themes/xt256.min.css (765b), scripts/vendor/baoyu-md/src/constants.ts (3338b), scripts/vendor/baoyu-md/src/content.ts (3224b)\n\nFile v1.76.3:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-markdown-to-html/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────────────────┬───────────────────┐\n│                             Path                             │     Location      │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-markdown-to-html/EXTEND.md               │ Project directory │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md         │ User home         │\n└──────────────────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default theme | Custom CSS variables | Code block style\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\n```bash\n# Check baoyu-post-to-wechat EXTEND.md for default_theme\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" && grep -o 'default_theme:.*' \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\") { Select-String -Pattern 'default_theme:.*' -Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" | ForEach-Object { $_.Matches.Value } }\n```\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: Use AskUserQuestion to confirm:\n\n| Theme | Description |\n|-------|-------------|\n| `default` (Recommended) | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.76.3:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.76.3\",\n  \"publishedAt\": 1775752073299\n}\n\nFile v1.76.3:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.76.3:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nArchive v1.76.2: 112 files, 107385 bytes\n\nFiles: scripts/main.test.ts (1755b), scripts/main.ts (7614b), scripts/package.json (152b), scripts/vendor/baoyu-md/package.json (450b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b), scripts/vendor/baoyu-md/src/code-themes/xcode.min.css (945b), scripts/vendor/baoyu-md/src/code-themes/xt256.min.css (765b), scripts/vendor/baoyu-md/src/constants.ts (3338b), scripts/vendor/baoyu-md/src/content.test.ts (2331b)\n\nFile v1.76.2:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-markdown-to-html/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────────────────┬───────────────────┐\n│                             Path                             │     Location      │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-markdown-to-html/EXTEND.md               │ Project directory │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md         │ User home         │\n└──────────────────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default theme | Custom CSS variables | Code block style\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\n```bash\n# Check baoyu-post-to-wechat EXTEND.md for default_theme\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" && grep -o 'default_theme:.*' \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\") { Select-String -Pattern 'default_theme:.*' -Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" | ForEach-Object { $_.Matches.Value } }\n```\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: Use AskUserQuestion to confirm:\n\n| Theme | Description |\n|-------|-------------|\n| `default` (Recommended) | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.76.2:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.76.2\",\n  \"publishedAt\": 1774474355180\n}\n\nFile v1.76.2:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.76.2:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nArchive v1.76.1: 114 files, 117507 bytes\n\nFiles: scripts/bun.lock (23426b), scripts/main.test.ts (1755b), scripts/main.ts (7614b), scripts/package.json (152b), scripts/vendor/baoyu-md/package.json (450b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b), scripts/vendor/baoyu-md/src/code-themes/xcode.min.css (945b), scripts/vendor/baoyu-md/src/code-themes/xt256.min.css (765b), scripts/vendor/baoyu-md/src/constants.ts (3338b)\n\nFile v1.76.1:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-markdown-to-html/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────────────────┬───────────────────┐\n│                             Path                             │     Location      │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-markdown-to-html/EXTEND.md               │ Project directory │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md         │ User home         │\n└──────────────────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default theme | Custom CSS variables | Code block style\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\n```bash\n# Check baoyu-post-to-wechat EXTEND.md for default_theme\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" && grep -o 'default_theme:.*' \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\") { Select-String -Pattern 'default_theme:.*' -Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" | ForEach-Object { $_.Matches.Value } }\n```\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: Use AskUserQuestion to confirm:\n\n| Theme | Description |\n|-------|-------------|\n| `default` (Recommended) | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.76.1:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.76.1\",\n  \"publishedAt\": 1774153425718\n}\n\nFile v1.76.1:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.76.1:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.76.1:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n\nArchive v1.74.0: 114 files, 116739 bytes\n\nFiles: scripts/bun.lock (23426b), scripts/main.test.ts (1677b), scripts/main.ts (7614b), scripts/package.json (152b), scripts/vendor/baoyu-md/package.json (450b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b), scripts/vendor/baoyu-md/src/code-themes/xcode.min.css (945b), scripts/vendor/baoyu-md/src/code-themes/xt256.min.css (765b), scripts/vendor/baoyu-md/src/constants.ts (3338b)\n\nFile v1.74.0:SKILL.md\n\n---\nname: baoyu-markdown-to-html\ndescription: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, 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.\nversion: 1.56.1\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-markdown-to-html/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-markdown-to-html/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────────────────┬───────────────────┐\n│                             Path                             │     Location      │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-markdown-to-html/EXTEND.md               │ Project directory │\n├──────────────────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md         │ User home         │\n└──────────────────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default theme | Custom CSS variables | Code block style\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to format the file, then use formatted file as input.\n\n**If user declines**: Continue with original file.\n\n### Step 1: Determine Theme\n\n**Theme resolution order** (first match wins):\n1. User explicitly specified theme (CLI `--theme` or conversation)\n2. EXTEND.md `default_theme` (this skill's own EXTEND.md, checked in Step 0)\n3. `baoyu-post-to-wechat` EXTEND.md `default_theme` (cross-skill fallback)\n4. If none found → use AskUserQuestion to confirm\n\n**Cross-skill EXTEND.md check** (only if this skill's EXTEND.md has no `default_theme`):\n\n```bash\n# Check baoyu-post-to-wechat EXTEND.md for default_theme\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" && grep -o 'default_theme:.*' \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\") { Select-String -Pattern 'default_theme:.*' -Path \"$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md\" | ForEach-Object { $_.Matches.Value } }\n```\n\n**If theme is resolved from EXTEND.md**: Use it directly, do NOT ask the user.\n\n**If no default found**: Use AskUserQuestion to confirm:\n\n| Theme | Description |\n|-------|-------------|\n| `default` (Recommended) | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n### Step 1.5: Determine Citation Mode\n\n**Default**: Off. Do not ask by default.\n\n**Enable only if the user explicitly asks** for \"微信外链转底部引用\", \"底部引用\", \"文末引用\", or passes `--cite`.\n\n**Behavior when enabled**:\n- Ordinary external links are rendered with numbered superscripts and collected under a final `引用链接` section.\n- `https://mp.weixin.qq.com/...` links stay as direct links and are not moved to the bottom.\n- Bare links where link text equals URL stay inline.\n\n### Step 2: Convert\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]\n```\n\n### Step 3: Report Result\n\nDisplay the output path from JSON result. If backup was created, mention it.\n\n## Usage\n\n```bash\n${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]\n```\n\n**Options:**\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--theme <name>` | Theme name (default, grace, simple, modern) | default |\n| `--color <name\\|hex>` | Primary color: preset name or hex value | theme default |\n| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |\n| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |\n| `--title <title>` | Override title from frontmatter | |\n| `--cite` | Convert external links to bottom citations, append `引用链接` section | false (off) |\n| `--keep-title` | Keep the first heading in content | false (removed) |\n| `--help` | Show help | |\n\n**Color Presets:**\n\n| Name | Hex | Label |\n|------|-----|-------|\n| blue | #0F4C81 | Classic Blue |\n| green | #009874 | Emerald Green |\n| vermilion | #FA5151 | Vibrant Vermilion |\n| yellow | #FECE00 | Lemon Yellow |\n| purple | #92617E | Lavender Purple |\n| sky | #55C9EA | Sky Blue |\n| rose | #B76E79 | Rose Gold |\n| olive | #556B2F | Olive Green |\n| black | #333333 | Graphite Black |\n| gray | #A9A9A9 | Smoke Gray |\n| pink | #FFB7C5 | Sakura Pink |\n| red | #A93226 | China Red |\n| orange | #D97757 | Warm Orange (modern default) |\n\n**Examples:**\n\n```bash\n# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\"\n```\n\n## Output\n\n**File location**: Same directory as input markdown file.\n- Input: `/path/to/article.md`\n- Output: `/path/to/article.html`\n\n**Conflict handling**: If HTML file already exists, it will be backed up first:\n- Backup: `/path/to/article.html.bak-YYYYMMDDHHMMSS`\n\n**JSON output to stdout:**\n\n```json\n{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ]\n}\n```\n\n## Themes\n\n| Theme | Description |\n|-------|-------------|\n| `default` | Classic - traditional layout, centered title with bottom border, H2 with white text on colored background |\n| `grace` | Elegant - text shadow, rounded cards, refined blockquotes (by @brzhang) |\n| `simple` | Minimal - modern minimalist, asymmetric rounded corners, clean whitespace (by @okooo5km) |\n| `modern` | Modern - large radius, pill-shaped titles, relaxed line height (pair with `--color red` for traditional red-gold style) |\n\n## Supported Markdown Features\n\n| Feature | Syntax |\n|---------|--------|\n| Headings | `# H1` to `###### H6` |\n| Bold/Italic | `**bold**`, `*italic*` |\n| Code blocks | ` ```lang ` with syntax highlighting |\n| Inline code | `` `code` `` |\n| Tables | GitHub-flavored markdown tables |\n| Images | `![alt](src)` |\n| Links | `[text](url)`; add `--cite` to move ordinary external links into bottom references |\n| Blockquotes | `> quote` |\n| Lists | `-` unordered, `1.` ordered |\n| Alerts | `> [!NOTE]`, `> [!WARNING]`, etc. |\n| Footnotes | `[^1]` references |\n| Ruby text | `{base|annotation}` |\n| Mermaid | ` ```mermaid ` diagrams |\n| PlantUML | ` ```plantuml ` diagrams |\n\n## Frontmatter\n\nSupports YAML frontmatter for metadata:\n\n```yaml\n---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---\n```\n\nIf no title is found, extracts from first H1/H2 heading or uses filename.\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.74.0:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.74.0\",\n  \"publishedAt\": 1774066364226\n}\n\nFile v1.74.0:scripts/package.json\n\n{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.74.0:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.74.0:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.","readmeExcerpt":"Skill: Baoyu Markdown To Html Owner: jimliu Summary: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, fo... Tags: latest:1.117.3 Version history: v1.117.3 | 2026-06-01T03:31:03.233Z | user Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1. v1.117.2 | 2026-05-18T02:15:34.882Z | u","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]"},{"language":"bash","snippet":"${BUN_X} {baseDir}/scripts/main.ts <markdown_file> [options]"},{"language":"bash","snippet":"# Basic conversion (uses default theme, removes first heading)\n${BUN_X} {baseDir}/scripts/main.ts article.md\n\n# With specific theme\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme grace\n\n# Theme with custom color\n${BUN_X} {baseDir}/scripts/main.ts article.md --theme modern --color red\n\n# Enable bottom citations for ordinary external links\n${BUN_X} {baseDir}/scripts/main.ts article.md --cite\n\n# Keep the first heading in content\n${BUN_X} {baseDir}/scripts/main.ts article.md --keep-title\n\n# Override title\n${BUN_X} {baseDir}/scripts/main.ts article.md --title \"My Article\""},{"language":"json","snippet":"{\n  \"title\": \"Article Title\",\n  \"author\": \"Author Name\",\n  \"summary\": \"Article summary...\",\n  \"htmlPath\": \"/path/to/article.html\",\n  \"backupPath\": \"/path/to/article.html.bak-20260128180000\",\n  \"contentImages\": [\n    {\n      \"placeholder\": \"MDTOHTMLIMGPH_1\",\n      \"localPath\": \"/path/to/img.png\",\n      \"originalPath\": \"imgs/image.png\"\n    }\n  ],\n  \"mermaidImages\": [\n    {\n      \"hash\": \"a1b2c3d4e5f6\",\n      \"localPath\": \"/path/to/imgs/.mermaid-cache/mermaid-a1b2c3d4e5f6.png\",\n      \"cached\": false\n    }\n  ]\n}"},{"language":"yaml","snippet":"---\ntitle: Article Title\nauthor: Author Name\ndescription: Article summary\n---"},{"language":"bash","snippet":"${BUN_X} {baseDir}/scripts/main.ts <markdown_file> --theme <theme> [--cite]"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: baoyu-markdown-to-html\ndescription: 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.\nversion: 1.117.3\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Markdown to HTML Converter\n\nConverts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.\n\n## User Input Tools\n\nWhen this skill prompts the user, follow this tool-selection rule (priority order):\n\n1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.\n2. **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.\n3. **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.\n\nConcrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.\n\n## Script Directory\n\n**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.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/main.ts` | Main entry point |\n\n## Preferences (EXTEND.md)\n\nCheck EXTEND.md in priority order — the first one found wins:\n\n| Priority | Path | Scope |\n|----------|------|-------|\n| 1 | `.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | Project |\n| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | XDG |\n| 3 | `$HOME/.baoyu-skills/baoyu-markdown-to-html/EXTEND.md` | User home |\n\nIf none found, use defaults.\n\n**EXTEND.md supports**: default theme, custom CSS variables, code block style, mermaid defaults (`mermaid_theme`, `mermaid_scale`, `mermaid_background`).\n\n## Workflow\n\n### Step 0: Pre-check (Chinese Content)\n\n**Condition**: Only execute if input file contains Chinese text.\n\n**Detection**:\n1. Read input markdown file\n2. Check if content contains CJK characters (Chinese/Japanese/Korean)\n3. If no CJK content → skip to Step 1\n\n**Format Suggestion**:\n\nIf CJK content detected AND `baoyu-format-markdown` skill is available:\n\nUse `AskUserQuestion` to ask whether to format first. Formatting can fix:\n- Bold markers with punctuation inside causing `**` parse failures\n- CJK/English spacing issues\n\n**If user agrees**: Invoke `baoyu-format-markdown` skill to "},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-markdown-to-html\",\n  \"version\": \"1.117.3\",\n  \"publishedAt\": 1780284663233\n}"},{"path":"scripts/package.json","content":"{\n  \"name\": \"baoyu-markdown-to-html-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"^0.1.1\",\n    \"baoyu-md\": \"^0.1.1\"\n  }\n}"},{"path":"skill-card.md","content":"## Description:\n\nConverts Markdown to styled HTML with WeChat-compatible themes, including code highlighting, math, Mermaid PNG rendering through headless Chrome, PlantUML, footnotes, alerts, infographics, and optional bottom citations for external links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[jimliu](https://clawhub.ai/user/jimliu)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, content authors, and agents use this skill to convert Markdown files into styled HTML suitable for WeChat Official Account and similar publishing workflows. It is useful when the user needs themed HTML output, Mermaid or PlantUML rendering, image handling, or optional bottom citations for external links.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill may download or invoke a Bun runtime at use time through the npx fallback.\n\nMitigation: Prefer a preinstalled, trusted Bun runtime and review the runtime path before installation or execution.\n\nRisk: Markdown containing remote image URLs can cause the user's machine to fetch external resources during conversion.\n\nMitigation: Convert only trusted Markdown, or remove and review remote image URLs before running the skill.\n\nRisk: The conversion writes HTML output, creates backups, and may create Mermaid cache files beside the input.\n\nMitigation: Run the skill with limited filesystem access and inspect output paths before using it on important files.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/jimliu/skills/baoyu-markdown-to-html)\n- [Metadata homepage](https://github.com/JimLiu/baoyu-skills#baoyu-markdown-to-html)\n\n## Skill Output:\n\n**Output Type(s):** [Shell commands, Files, JSON]\n\n**Output Format:** [Markdown guidance with shell command examples; generated HTML files and JSON conversion results]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Creates an HTML file beside the input Markdown file, may create timestamped backups for existing HTML files, and may cache Mermaid PNG files under imgs/.mermaid-cache.]\n\n## Skill Version(s):\n\n1.117.3 (source: SKILL.md frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, fo... Skill: Baoyu Markdown To Html Owner: jimliu Summary: Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, fo... Tags: latest:1.117.3 Version history: v1.117.3 | 2026-06-01T03:31:03.233Z | user Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1. v1.117.2 | 2026-05-18T02:15:34.882Z | u","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1588,"uniquenessScore":46,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T05:08:22.726Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T05:08:22.726Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:20:22.438Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}