WeChat Publisher for Openclaw

A professional automation tool that converts Markdown articles into WeChat Official Account drafts with integrated image management.

liboss504
v1.0.0
May 12, 2026
0
637
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install wechatdoc-publisher

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install wechatdoc-publisher using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is WeChat Publisher?

WeChat Publisher is a specialized automation component designed for content creators and developers within the Openclaw Skills ecosystem. It simplifies the tedious process of manual content entry by automating the conversion of Markdown files into formatted WeChat Official Account drafts, complete with cover image processing and permanent material uploads.

By leveraging official APIs, this skill handles the heavy lifting of credential management, Access Token retrieval, and HTML conversion. It ensures that your content maintains its intended structure—including headings, lists, and bold text—while adhering to the strict technical requirements of the WeChat platform.

WeChat Publisher Use Cases

  • Automatically publishing blog posts or technical documentation written in Markdown to a WeChat Official Account.
  • Generating and optimizing cover images specifically for the 16:9 WeChat display format.
  • Streamlining multi-agent content workflows where AI writes the content and Openclaw Skills handles the distribution.
  • Batch processing articles for content marketing teams to maintain a consistent draft queue.

How WeChat Publisher Works

  1. The skill retrieves the necessary Access Token using the credentials stored in the local configuration.
  2. It processes the specified cover image, ensuring it meets the 1280x720 resolution and 2MB size limit requirements.
  3. The cover image is uploaded to the WeChat server as a permanent material to generate a media_id.
  4. The Markdown article is parsed and converted into WeChat-compatible HTML format.
  5. A draft JSON object is constructed and submitted to the WeChat Draft Box API, making it ready for final review and manual publishing.

WeChat Publisher Setup

To begin using this tool from the Openclaw Skills library, follow these steps:

  1. Configure WeChat API: Obtain your AppID and AppSecret from the WeChat Official Accounts Platform under Settings > Development > Basic Configuration.
  2. IP Whitelisting: Add the server IP 112.8.202.216 to your WeChat IP whitelist to avoid 40164 errors.
  3. Local Credentials: Create a file named wechat_credentials.json in your workspace:
{
  "appid": "YOUR_APPID",
  "appsecret": "YOUR_APPSECRET"
}
  1. Execution: Run the publisher script via CLI:
python scripts/publish.py <path_to_markdown.md> <path_to_cover_image.png> [summary]

WeChat Publisher Data Schema & Taxonomy

The skill manages data through a structured set of files and API responses:

Data Component Format Description
Credentials JSON Stores AppID and AppSecret for authentication.
Content Source Markdown The input article following standard GFM syntax.
Media Assets PNG/JPEG Cover images strictly formatted to 1280x720.
API Metadata media_id Unique identifiers returned by WeChat for images and drafts.
Draft Schema JSON The final payload sent to the /cgi-bin/draft/add endpoint.

WeChat Publisher Advanced Features

  • Automatic Image Compression: Includes a dedicated script to reduce image file size below 500KB while maintaining quality.
  • Multi-Agent Integration: Works seamlessly with other Openclaw Skills like 'humanizer' to refine AI text or 'baidu-search' for trending topic research.
  • Permanent Material Management: Automates the lifecycle of media assets required for official account articles.
  • Error Handling: Built-in diagnostic tools to handle common WeChat API error codes such as 40164 (IP Whitelist) and 40001 (Token Expiry).

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*