md2wechat
by @geekjourneyx
Convert Markdown to WeChat Official Account HTML. Use this whenever the user wants WeChat article formatting, article preview, WeChat draft upload, image generation for articles, cover or infographic generation, image-post creation, writer-style drafting, title suggestions, AI trace removal, or curr
clawhub install md2wechat📖 About This Skill
name: md2wechat description: Convert Markdown to WeChat Official Account HTML, inspect supported providers/themes/prompts, generate article images, create drafts, write with creator styles, and remove AI writing traces. homepage: https://github.com/geekjourneyx/md2wechat-skill metadata: {"clawdbot":{"emoji":"📝","requires":{"bins":["md2wechat"],"env":["WECHAT_APPID","WECHAT_SECRET"]},"install":[{"id":"brew","kind":"brew","formula":"geekjourneyx/tap/md2wechat","bins":["md2wechat"],"label":"Install md2wechat (brew)"},{"id":"go","kind":"go","module":"github.com/geekjourneyx/md2wechat-skill/cmd/md2wechat@latest","bins":["md2wechat"],"label":"Install md2wechat (go)"}]}}
md2wechat
Use md2wechat when the user wants to:
Intent Routing
Choose the command family before doing any publish action:
convert / inspect / preview when the user wants a standard WeChat article draft (news), HTML conversion, article metadata, article preview, or a draft that needs --cover.create_image_post when the user says 小绿书, 图文笔记, 图片消息, newspic, 多图帖子, or asks to publish an image-first post rather than an article HTML draft.小绿书 / 图文笔记 requests to convert --draft just because the user also has a Markdown article. A Markdown file can still be the image source for create_image_post -m article.md.convert --draft and create_image_post as different publish targets, not interchangeable command variants.Defaults And Config
md2wechat is already available on PATH.WECHAT_APPID and WECHAT_SECRET.~/.config/md2wechat/config.yaml.convert defaults to api mode unless the user explicitly asks for --mode ai.~/.config/md2wechat/config.yaml
2. environment variables such as MD2WECHAT_BASE_URL
3. project-local md2wechat.yaml, md2wechat.yml, or md2wechat.json
api.md2wechat_base_url or MD2WECHAT_BASE_URL.Discovery First
Run these before selecting a provider, theme, or prompt:
md2wechat version --jsonmd2wechat capabilities --jsonmd2wechat providers list --jsonmd2wechat themes list --jsonmd2wechat prompts list --jsonmd2wechat prompts list --kind image --jsonmd2wechat prompts list --kind image --archetype cover --jsonInspect a specific resource before using it:
md2wechat providers show openrouter --jsonmd2wechat providers show volcengine --jsonmd2wechat themes show autumn-warm --jsonmd2wechat prompts show cover-default --kind image --jsonmd2wechat prompts show cover-hero --kind image --archetype cover --tag hero --jsonmd2wechat prompts show infographic-victorian-engraving-banner --kind image --archetype infographic --tag victorian --jsonmd2wechat prompts render cover-default --kind image --var article_title='Example' --jsonWhen choosing image presets, prefer the prompt metadata returned by prompts show --json, especially primary_use_case, compatible_use_cases, recommended_aspect_ratios, and default_aspect_ratio.
When choosing an image model, prefer providers show and read supported_models before hard-coding --model.
Core Commands
Configuration:
md2wechat config initmd2wechat config show --format jsonmd2wechat config validateConversion:
md2wechat inspect article.mdmd2wechat preview article.mdmd2wechat convert article.md --previewmd2wechat convert article.md -o output.htmlmd2wechat convert article.md --draft --cover cover.jpgmd2wechat convert article.md --mode ai --theme autumn-warm --previewmd2wechat convert article.md --title "新标题" --author "作者名" --digest "摘要"Image handling:
md2wechat upload_image photo.jpgmd2wechat download_and_upload https://example.com/image.jpgmd2wechat generate_image "A cute cat sitting on a windowsill"md2wechat generate_image --preset cover-hero --article article.md --size 2560x1440md2wechat generate_cover --article article.mdmd2wechat generate_infographic --article article.md --preset infographic-comparisonmd2wechat generate_infographic --article article.md --preset infographic-dark-ticket-cn --aspect 21:9md2wechat generate_infographic --article article.md --preset infographic-handdrawn-sketchnoteDrafts and image posts:
md2wechat create_draft draft.jsonmd2wechat test-draft article.html cover.jpgmd2wechat create_image_post --helpmd2wechat create_image_post -t "Weekend Trip" --images photo1.jpg,photo2.jpgmd2wechat create_image_post -t "Travel Diary" -m article.mdecho "Daily check-in" | md2wechat create_image_post -t "Daily" --images pic.jpgmd2wechat create_image_post -t "Test" --images a.jpg,b.jpg --dry-runWriting and humanizing:
md2wechat write --listmd2wechat write --style dan-koemd2wechat write --style dan-koe --input-type fragment article.mdmd2wechat write --style dan-koe --cover-onlymd2wechat write --style dan-koe --covermd2wechat write --style dan-koe --humanize --humanize-intensity aggressivemd2wechat humanize article.mdmd2wechat humanize article.md --intensity aggressivemd2wechat humanize article.md --show-changesmd2wechat humanize article.md -o output.mdArticle Metadata Rules
For convert, metadata resolution is:
--title -> frontmatter.title -> first Markdown heading -> 未命名文章--author -> frontmatter.author--digest -> frontmatter.digest -> frontmatter.summary -> frontmatter.descriptionLimits enforced by the CLI:
--title: max 32 characters--author: max 16 characters--digest: max 128 charactersDraft behavior:
--cover or --cover-media-id.--cover is a local image path contract for article drafts. --cover-media-id is for an existing WeChat permanent cover asset. Do not assume a WeChat URL or mmbiz.qpic.cn URL can be reused as thumb_media_id.inspect is the source-of-truth command for resolved metadata, readiness, and checks.preview v1 writes a standalone local HTML preview file. It does not start a workbench, write back to Markdown, upload images, or create drafts.convert --preview is still the convert-path preview flag; it is not the same thing as the standalone preview command.preview --mode ai is degraded confirmation only; it must not be treated as final AI-generated layout.--title / --author / --digest affect draft metadata, not necessarily visible body HTML.--upload or --draft, not during plain convert --preview.Agent Rules
convert; image post / 小绿书 / newspic => create_image_post.inspect -> preview -> convert / --draft.小绿书, 图文笔记, 图片消息, newspic, or asks for a multi-image post, prefer create_image_post even when the source content lives in Markdown.generate_cover or generate_infographic over a raw generate_image "prompt" call when a bundled preset fits the task.45004, check digest/summary/description before assuming the body content is too long.