Aug 29, 2026

md2wechat-skill: Publish Markdown Articles to WeChat From Your AI Agent

A 3.6k-star CLI that breaks WeChat Official Account publishing into verifiable commands — readiness inspection, themed conversion, cover generation, and draft-box push — with a JSON discovery layer built for agent automation.

#tutorial#markdown#productivity#workflow

Publishing to WeChat Official Accounts (公众号) means fighting the platform's editor: images that break, code blocks that collapse, styles that paste unpredictably. geekjourneyx/md2wechat-skill — 3.6k stars — turns that pipeline into a set of verifiable CLI commands that both you and an AI agent can run: inspect before you publish, convert with a stable theme, and push a draft only when you explicitly say so.

Why This Skill Matters

What separates md2wechat from a "markdown to WeChat HTML" converter is the command boundary design. inspect --json returns structured metadata, checks, and readiness targets — so an agent can tell whether an article is actually publishable before touching anything. convert performs the conversion, but upload and draft side effects only run when the user explicitly requests them via --draft. And a discovery layer (capabilities, doctor, themes list, layout list) lets the agent ask the CLI what it supports instead of guessing. The README lists Claude Code, Codex, WorkBuddy, Kimi Work, Hermes Agent, and OpenClaw as agents that can drive it through JSON discovery.

Installation

The CLI installs globally via npm:

npm install -g @geekjourneyx/md2wechat
md2wechat version --json
md2wechat config init --json
md2wechat config validate --json

API-mode preview and conversion require an md2wechat API Key from md2wechat.cn — the professional API is a one-time ¥199 purchase. There is also a free AI mode that generates a prompt for an external LLM to finish the HTML instead of returning it directly.

Real Workflow: From Article to Draft Box

You have article.md ready and want it checked, previewed, and pushed as a draft.

  1. Inspect first — this never uploads anything:
md2wechat inspect article.md --json
  1. Preview and convert to local files only:
md2wechat preview article.md --output preview.html
md2wechat convert article.md --output article.html
  1. When you are ready to publish, run the explicit side effects:
md2wechat inspect article.md --draft --cover cover.jpg --json
md2wechat convert article.md --draft --cover cover.jpg

If you manage multiple Official Accounts, pass the same --wechat-account name to both the inspect and convert commands.

Real Workflow: Pick a Theme With Discovery Commands

Before converting, ask the CLI what is available — all output is JSON:

md2wechat themes list --json
md2wechat layout list --json
md2wechat title suggest article.md --json

The professional API mode covers 48 WeChat-tuned themes and 56 recommended ::: layout syntax names (77 promoted layout scenario entries); the free mode has 3 basic themes. For long-term style, the Brand Profile writes your preferences to ~/.config/md2wechat/brand.md, where agents read them during writing and formatting.

Tips

  • Always inspect before any command with side effects — the JSON includes readiness targets and blockers.
  • Output is single-line JSON on stdout; pipe through jq when reading it yourself, and do not ask the CLI for indented output.
  • doctor --json checks whether API, draft, and upload prerequisites are satisfied on your machine.
  • The README's docs directory covers install, WeChat credentials, and IP allowlist setup if your account needs them.

When Not to Use This

This is a WeChat-specific pipeline — for Xiaohongshu, blogs, or other platforms you need different tooling. The license is source-available rather than open source, and stable conversion is a paid API; if you only convert occasionally and have an LLM available, the free AI mode covers the basics.


See the leaderboard for more skills.