Install
openclaw skills install xiaohu-wechat-formatFormat Markdown or rough notes into WeChat Official Account compatible inline-style HTML, preview 33 themes, upload images, generate optional covers, and push articles to WeChat draft box. Use when the user asks for WeChat/微信公众号 formatting, theme previews, Markdown-to-WeChat HTML, draft publishing, cover generation, or importing a WeChat article for republishing preview. External writes such as pushing drafts or enabling comment auto-replies require explicit user confirmation.
openclaw skills install xiaohu-wechat-formatTurn Markdown into WeChat Official Account-ready HTML. Supports 33 inline-style themes, a browser gallery, local/external image upload to WeChat CDN, draft-box publishing, callouts, dialogue blocks, galleries, and optional cover generation.
app_secret, access tokens, or AI API keys.Use the skill directory as {skill}.
# Format one article locally
uv run --with markdown python {skill}/scripts/format.py \
--input article.md --theme newspaper --no-open
# Open visual gallery for theme selection
uv run --with markdown python {skill}/scripts/format.py \
--input article.md --gallery
# Publish to WeChat draft box from Markdown
uv run --with markdown --with requests --with pillow python {skill}/scripts/publish.py \
--input article.md --theme newspaper --cover cover.jpg
# Publish an already formatted output directory
uv run --with markdown --with requests --with pillow python {skill}/scripts/publish.py \
--dir /tmp/wechat-format/article --cover cover.jpg
config.example.json to config.json.wechat.app_id, wechat.app_secret, and optional wechat.author.40164 means the IP is not whitelisted.config.json private. It is ignored by git and must not be published.minimal-gray, newspaper, focus-blue, ink, bauhaus, warm-card, ocean-card, minimal-red) before pushing every theme.Article Title - preview - newspaper.Images fetched from mp.weixin.qq.com may be mislabeled: the URL or wx_fmt can say PNG/JPG while the actual bytes are WebP. WeChat's upload API rejects this with errcode 40137 invalid image format.
Before publishing imported articles:
publish.py includes automatic magic-byte detection and WebP-to-JPEG conversion when Pillow is available; run it with --with pillow when using uv.
:::dialogue[Interview]
Alice: Hello
Bob: Hi
:::
:::gallery[Screenshots]



:::
> [!important] Key insight
> Highlighted text.
> [!tip] Tip
> Useful note.
scripts/format.py — Markdown → WeChat-compatible inline HTML + preview/gallery.scripts/publish.py — upload article images, upload cover, push to draft box.scripts/generate.py — optional cover-image generation using compatible image APIs.scripts/comment_reply.py — optional comment auto-reply; use only with explicit confirmation.Run:
find {skill}/themes -maxdepth 1 -name '*.json' -printf '%f\n' | sed 's/\.json$//' | sort
Common starting themes: newspaper, minimal-gray, focus-blue, ink, bauhaus, warm-card, ocean-card, wechat-native.