AI Agent Hub
Back to skills
WeChat Official Account Draft Auto-Publisher icon

WeChat Official Account Draft Auto-Publisher

Content Creation Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_eb92c9a7/wechat-oa according to the guide at https://skillhub.cn/install/skillhub.md.

About this skill

The Specific Problem It Solves

WeChat Official Account operators often struggle with the tedious tasks of manually managing drafts and materials. Especially in multi-account environments, repetitive operations such as creating drafts, uploading images, generating covers, and publishing articles are time-consuming and error-prone. The traditional publishing workflow lacks automation, leading to low content release efficiency and difficulty in quickly responding to trends or performing batch operations. This skill addresses these pain points with a comprehensive toolkit built on official WeChat APIs, streamlining the entire process from draft management to publishing.

Core Capabilities and How It Works

This skill integrates the following core capabilities:

  • Draft Management: Supports viewing, creating, updating, and deleting drafts via command-line, e.g., using wechat-oa create article.md to create a draft from a Markdown file, with automatic handling of inline image uploads.
  • Material Library Operations: Provides the wechat-oa upload command to upload images to the permanent material library, and manages material counts and lists, eliminating manual work.
  • Automation Features: Built-in cover image generation (tech-style 2.35:1 ratio) and smart digest generation, where AI automatically produces a precise 1-2 sentence summary when publishing articles to enhance content appeal.
  • Multi-mode Publishing: Supports three modes: direct (direct connection), relay (relay server), and hybrid (hybrid), adapting to different network environments. The hybrid mode prioritizes direct connection and automatically switches to relay on failure, balancing speed and stability.

The key workflow is as follows:
1. Configure Credentials: Set APPID, APPSECRET, and push mode in config.json, ensuring the file is standard JSON format without comments to avoid parsing errors.
2. IP Whitelist Setup: Add the corresponding IP to the WeChat Official Account backend whitelist based on the push mode; for example, direct mode requires adding the local出口 IP, while relay mode uses the server IP 120.79.2.44. Failure to configure the whitelist will cause API call failures.
3. Execute Commands: Manage content via command-line tools such as wechat-oa list or wechat-oa update, with the system automatically converting <img> tags in HTML to inline style="" attributes to be compatible with the WeChat renderer.

Applicability Boundaries and Considerations

While this skill significantly enhances automation in Official Account management, note the following boundaries and limitations:

  • Design Specification Must Be Followed: Before creating or updating articles, the AI must read the design.md layout specification, including container width (article 677px / card 375px), fonts, colors, and layout rules; otherwise, content may display incorrectly in WeChat.
  • IP Whitelist Dependency: Failure to configure the IP whitelist will cause API call failures; for scenarios with unstable IPs, use hybrid or relay modes recommended, which only require adding the server IP to the whitelist.
  • Push Mode Selection: The relay mode involves a relay server, which may incur costs (supports Alipay AI payment protocol) and requires obtaining a WECHAT_OA_SERVER_KEY, suitable for cases where local IP configuration is not possible.
  • Automation Scope: The tool focuses on draft and material management, not direct article editing or advanced formatting; cover generation and digest rely on AI, which may have personalization differences and require manual review.
  • Security Note: config.json contains sensitive credentials and must never be committed to public repositories, as it is already ignored in .gitignore.

Use Cases

  • When needing to batch create local Markdown technical articles into WeChat Official Account drafts every week, and automatically upload inline images to the material library.
  • When a public account server has a dynamic IP that cannot be added to the whitelist, using relay mode to automatically push articles via a fixed public IP server.
  • When needing to batch generate tech-style cover images (2.35:1 ratio) for Official Account articles and automatically apply them to drafts to replace default covers.
  • When managing multiple Official Account accounts, needing to query draft box lists across all accounts with one command and quickly delete or update specific drafts based on titles.

Best For

  • Individual creators operating 3 or more WeChat Official Accounts, needing cross-account batch management of drafts and materials to save time.
  • Technical developers deploying public account backends on cloud servers with dynamic IPs, needing to avoid whitelist issues via relay mode.
  • Engineers writing technical blogs in Markdown format, wanting to automatically convert and publish articles to the WeChat Official Account platform.
  • Content editors responsible for daily updates on corporate Official Accounts, needing to generate layout-compliant cover images and precise digests to enhance reader experience.