WeCom Doc Fetcher for Openclaw

A specialized tool for converting WeChat Work developer documentation into clean, Obsidian-ready Markdown files using automated API fetching.

mouzhi
v1.0.0
Feb 22, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install wecom-doc-fetcher

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 wecom-doc-fetcher 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 WeCom Doc Fetcher?

WeCom Doc Fetcher is a technical utility designed to bypass the complexities of scraping the WeChat Work developer documentation site. Since the site operates as a Vue Single Page Application (SPA), traditional web scraping methods often fail to capture the actual content. This skill leverages the internal fetch API to retrieve the original Markdown source directly from the server.

By utilizing Openclaw Skills, developers can transform messy web content into highly readable, local documentation. It handles the nuances of the WeCom documentation structure, ensuring that images, tables, and code snippets are preserved and formatted correctly for modern Markdown editors like Obsidian.

WeCom Doc Fetcher Use Cases

  • Localizing WeChat Work developer guides for offline reference in an Obsidian vault.
  • Converting complex SPA-based documentation into token-efficient Markdown for AI context.
  • Automating the extraction of technical specifications from the WeChat Work developer portal.
  • Bypassing manual copy-pasting for large-scale documentation archival.

How WeCom Doc Fetcher Works

  1. The script accepts a WeChat Work documentation URL and identifies the routing slug.
  2. It launches a headless Chromium instance via Playwright to navigate the page and intercept the background XHR request to the fetchCnt API.
  3. The tool extracts the internal doc_id required for direct server communication.
  4. It sends a POST request to the WeChat Work API with the necessary session cookies to retrieve the raw content_md field.
  5. A comprehensive cleaning function processes the Markdown to fix site-specific formatting errors, such as missing heading spaces or unclosed HTML tags.
  6. The final cleaned Markdown is printed to the console or saved to a specified local file.

WeCom Doc Fetcher Setup

To integrate this into your Openclaw Skills workflow, run the following commands:

pip install requests playwright
playwright install chromium

Ensure you have Python 3.8+ installed. The Playwright installation will download a headless Chromium binary (approx. 150 MB) necessary for automatic document ID detection.

WeCom Doc Fetcher Data Schema & Taxonomy

The skill manages data through the following mapping:

Item Detail
Endpoint POST /docFetch/fetchCnt?lang=zh_CN&ajax=1&f=json
Input URL path slug (e.g., 94677)
Primary Key doc_id (Internal integer)
Format Markdown (CommonMark with site-specific cleaning)
Storage Local .md files or stdout

The cleaning process handles 11 specific rules, including TOC removal, table spacing fixes, and HTML tag conversion to Markdown syntax.

WeCom Doc Fetcher Advanced Features

  • Automated session management via Playwright to handle authentication and cookie retrieval without manual intervention.
  • Manual doc_id override support for environments where headless browsers cannot be executed.
  • Custom cookie configuration to maintain persistent authenticated sessions for restricted documentation.
  • Specialized regex-based cleaning rules to ensure table rendering compatibility in Obsidian and other Openclaw Skills compatible editors.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*