baoyu-post-to-wechat

Convert Markdown or HTML with images into WeChat Official Account drafts via API.

4|1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/tentacle-pro/skills --skill baoyu-post-to-wechat-tentacle-pro
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: baoyu-post-to-wechat
Source: https://github.com/tentacle-pro/skills/tree/main/baoyu-post-to-wechat
Command: npx skills add https://github.com/tentacle-pro/skills --skill baoyu-post-to-wechat-tentacle-pro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fflate, front-matter, highlight.js, juice, marked, reading-time, remark-cjk-friendly, remark-parse, remark-stringify, unified, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Quickly publish articles from local Markdown or HTML (including Obsidian-style embeds) to a WeChat Official Account draft box, handling image uploads, cover images, and content rendering so users avoid manual copy-paste and upload steps.

Core Features & Use Cases

  • API-based draft saving: Upload cover images as permanent media and save fully-formed articles to the WeChat draft box via draft/add.
  • Inline image handling: Convert markdown images, upload inline images with media/uploadimg, and replace content URLs with WeChat-hosted URLs.
  • Markdown → HTML rendering: Render markdown with themes, extract content, and paste or upload rendered HTML into the editor when needed.
  • Browser automation fallback: Optionally use Chrome/CDP and clipboard-based browser automation for editor-driven posting when API constraints exist.
  • Use Case: Convert an Obsidian note with local images into WeChat-ready HTML, upload images and cover, and save the result as a draft with a single command.

Quick Start

Run the wechat-api script with your article file, ensure WECHAT_APP_ID and WECHAT_APP_SECRET are set in the shared .env, and provide a cover if desired.

Frequently Asked Questions about baoyu-post-to-wechat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish markdown to WeChat Official Account drafts automatically?▼

You can publish markdown to WeChat drafts by rendering markdown into HTML, uploading inline images via the WeChat API, and calling the draft/add endpoint with the rendered content and a permanent cover media ID.

Can I convert Obsidian notes with local images into WeChat-compatible drafts?▼

Yes, you can convert Obsidian notes into WeChat drafts. The process extracts local embedded images, uploads them using the media/uploadimg API, and replaces original URLs with WeChat-hosted links inside the HTML content.

How to upload markdown images to WeChat and replace content URLs?▼

To upload markdown images to WeChat, the system uses the media/uploadimg API call for each inline image, fetches the returned WeChat-hosted URL, and substitutes the local image paths in the rendered HTML output.

Do I need WeChat API credentials to save articles to the draft box?▼

Yes, you need WeChat API credentials to save articles. You must provide WECHAT_APP_ID and WECHAT_APP_SECRET in a shared .env file to fetch the access_token required for uploading media and calling draft/add.

What is the best way to handle WeChat API constraints when posting HTML content?▼

The best way to handle WeChat API constraints is using browser automation fallback. When API constraints exist, the system optionally uses Chrome/CDP and clipboard-based automation to paste rendered HTML directly into the WeChat editor.

When should I use API-based draft saving instead of browser automation for WeChat publishing?▼

You should use API-based draft saving for fully automated workflows uploading covers and content via draft/add. Use browser automation fallback only when API constraints prevent direct HTML content posting to the WeChat editor.