geekjourneyx/md2wechat-skill

面向 AI Agent 的微信公众号创作与发布 CLI:Markdown 排版、AI 配图、预览与草稿创建;支持由浏览器 Agent 保存知乎、CSDN、头条未发布草稿。

md2wechat – AI‑agent‑friendly CLI for publishing WeChat public‑account articles

What it does

  • Turns a Markdown file into the exact HTML layout required by WeChat’s public‑account editor.
  • Provides a set of CLI commands that can be called by an AI‑agent (Claude, Codex, WorkBuddy, etc.) via a JSON‑based discovery interface.
  • Handles preview, image upload, cover generation, draft creation and multi‑account management.
  • Offers a free AI mode that only produces prompts for an external LLM, and a paid Professional API mode that returns the final HTML directly.

Why it matters

  • Writing for WeChat is notoriously fiddly – the platform expects a very specific HTML structure, custom “:::module” blocks for advanced layout, and strict image handling. md2wechat automates the whole pipeline, letting developers or autonomous agents focus on content creation instead of manual formatting.
  • The tool is deliberately built for agents: it exposes capabilities, doctor, inspect, layout list, etc., all of which output compact JSON that an agent can parse to decide the next step.

Key features (as described in the README)

Feature Description
Markdown → WeChat HTML convert command produces the final HTML; preview writes a local file; inspect returns structured metadata (title, summary, images, readiness).
Advanced layout Supports 83 recommended layout scenarios and 59 :::module syntaxes (hero, callout, gallery, etc.) that are parsed only in Professional API mode.
Agent discovery Commands like capabilities, doctor, themes list, layout list expose what the CLI can do in a machine‑readable JSON format.
Content generation helpers write, humanize, title suggest, generate_cover, generate_infographic – all callable by an agent to produce or improve article parts.
Image generation Integrates with providers such as Volcengine, ModelScope, OpenAI, Gemini, MiniMax, Atlas Cloud. Supports preset‑based cover/infographic creation and “plan” mode that only returns a generation plan.
Multi‑platform draft sync Besides WeChat, the CLI can prepare drafts for Zhihu, CSDN, Toutiao, and Tencent Cloud Developer Community using the same workflow.
Multi‑account support Allows configuration of several WeChat public‑account credentials without exposing secrets.
Professional API Paid service that returns final HTML, offers 48 premium themes, and guarantees stable conversion for batch or team use.
Source‑available license Free for personal, learning, and non‑commercial use; commercial use requires a paid license.

Typical workflow

  1. Install – npm install -g @geekjourneyx/md2wechat@3.8.0 (or use the Go binary).
  2. Configure – md2wechat config init and add your API key / WeChat credentials.
  3. Inspect – md2wechat inspect article.md --json to see if the article is ready for draft.
  4. Preview – md2wechat preview article.md --output preview.html (free AI mode only creates a prompt).
  5. Convert & Draft – md2wechat convert article.md --draft --cover cover.jpg to push the article to the WeChat draft box.
  6. Agent integration – An autonomous agent can call md2wechat capabilities --json to discover commands, then run md2wechat generate_cover … or md2wechat title suggest … as part of a larger writing pipeline.

Who should use it

  • Developers building tools that automate WeChat content publishing.
  • Teams that want a repeatable, version‑controlled pipeline for newsletters, product updates, or marketing copy.
  • Researchers experimenting with LLM‑driven content creation who need a stable endpoint for the final HTML.

Limitations / notes

  • The high‑fidelity rendering (the :::module syntax) works only when the paid Professional API service is enabled.
  • Image generation relies on external providers; appropriate API keys must be configured.
  • The CLI itself is open‑source, but the conversion service is a commercial offering under a source‑available license.

Links


All information above is taken directly from the repository’s README; no additional features have been inferred.

Related

  • Project
  • Project
  • Project
  • Project
  • Project