MD2WeChat Skill for Openclaw

A professional tool for converting Markdown documents into perfectly styled WeChat Official Account articles with automated media handling.

koraihub
v2.0.0
Mar 12, 2026
1
1.3k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install md2wechat-skill

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 md2wechat-skill 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 MD2WeChat Skill?

The MD2WeChat Skill is a specialized utility designed to streamline the content publishing workflow for developers and writers. By using Openclaw Skills, users can convert standard GitHub Flavored Markdown (GFM) into the specific inline-styled HTML required by the WeChat Official Account editor. This skill solves the common frustration of broken layouts, unstyled code blocks, and manual image uploads when moving content from a local editor to the WeChat platform.

At its core, the skill provides a seamless bridge between modern documentation workflows and the WeChat ecosystem. It handles complex elements like tables, nested lists, and deep-themed code blocks, ensuring that your technical content looks professional on mobile devices. By integrating this into your Openclaw Skills library, you can maintain a single source of truth for your articles while automating the distribution process.

MD2WeChat Skill Use Cases

  • Automating the publication of technical blog posts from local Markdown files to WeChat Official Accounts.
  • Synchronizing documentation updates from GitHub directly to the WeChat draft box.
  • Batch processing Markdown articles to generate WeChat-compatible HTML previews for team review.
  • Migrating content platforms by automatically uploading local images to the WeChat CDN.

How MD2WeChat Skill Works

  1. The skill reads the target Markdown file and parses the YAML Front Matter to extract metadata such as the title, author, and summary.
  2. It scans the content for local image references and automatically uploads them to the WeChat permanent material library via API.
  3. The Markdown parser converts the text into HTML, applying a set of sophisticated inline CSS rules optimized for the WeChat mobile browser.
  4. If the draft mode is enabled, the skill uses your WeChat AppID and Secret to create a new entry in your account's draft box.
  5. For content exceeding the 2MB platform limit, the skill performs a safe truncation to ensure successful API transmission.

MD2WeChat Skill Setup

To get started with this skill, install the required Python environment dependencies:

pip install wechatpy markdown beautifulsoup4 requests python-dotenv pillow

If you intend to upload drafts directly, configure your WeChat Official Account credentials in a .env file:

WECHAT_APPID=your_app_id_here
WECHAT_SECRET=your_app_secret_here

You can find these credentials under the Development -> Basic Configuration section of the WeChat Official Account Admin Platform.

MD2WeChat Skill Data Schema & Taxonomy

The skill organizes content and metadata using the following structure:

Feature Specification
Metadata Supports YAML Front Matter keys: title, author, summary, cover, publish_mode.
Formatting Converts standard Markdown (GFM) to inline-styled HTML tags.
Media Automatically uploads local relative paths to WeChat CDN URLs.
Limits Content is monitored to remain within the 2MB WeChat API limit.
Output Can generate both local .html preview files and remote API draft entries.

MD2WeChat Skill Advanced Features

  • Support for custom covers via the --cover flag or YAML metadata.
  • Automated image hosting conversion from local paths to permanent WeChat material URLs.
  • Inline CSS injection that eliminates the need for external stylesheets in the WeChat environment.
  • Flexible execution modes allowing for local-only conversion or full cloud synchronization.
  • Specialized styling for code blocks to ensure readability on mobile screens.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*