mcpField
R
rn-wechat-extract

rn-wechat-extract

github.com/pluviobyteProductivity1.7k41 installsUpdated 5w ago
Repository

About rn-wechat-extract

rn-wechat-extract is a skill that extracts WeChat public account articles into clean Markdown. It returns the title, author, publication time, and body text without summarizing or rewriting.

Key features

  1. 01Fetch article HTML with WeChat headers
  2. 02Extract title, author, and publish time
  3. 03Convert body text to Markdown
  4. 04Save extracted text to a file
  5. 05Optionally save raw HTML

Use cases

  1. 01Read and discuss a public account article
  2. 02Pass article text to a rewriting workflow
  3. 03Save an article for content adaptation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pluviobyte/rnskill --skill rn-wechat-extract

After installing, type/rn-wechat-extractin Claude Code to confirm it loaded.

Bundled filesscripts/fetch_wechat.py

Details

From the project README

RN WeChat Extract

Extract the full text of a WeChat public account article into clean Markdown.

This skill is a source reader — it extracts and returns text. It does not summarize, rewrite, translate, or produce video.

How It Works

WeChat blocks external access to public account articles through User-Agent detection: the server checks for the MicroMessenger keyword and rejects normal browser requests.

This skill sends HTTP requests with a genuine WeChat iOS WebView User-Agent and the correct Referer header, which is sufficient to receive the full article HTML. No login, cookie, or API key is needed.

Extracts: title, author, publish time, and body text as Markdown.

Limitations:

  • Images are not downloaded (WeChat uses lazy-loaded data-src)
  • Some heavily JS-rendered articles may return partial content
  • Rapid successive calls from the same IP may trigger CAPTCHA (wait and retry)
  • Does not work on login-gated or paid articles

Locate The Skill

WX_HOME="$(
  for d in "$(pwd)/.codex/skills/rn-wechat-extract" \
           "$(pwd)/.agents/skills/rn-wechat-extract" \
           "$(pwd)/.claude/skills/rn-wechat-extract" \
           "$(pwd)/rnskill/skills/rn-wechat-extract" \
           "$HOME/.codex/skills/rn-wechat-extract" \
           "$HOME/.agents/skills/rn-wechat-extract" \
           "$HOME/.claude/skills/rn-wechat-extract"; do
    [ -f "$d/SKILL.md" ] && echo "$d" && break
  done
)"
export WX_HOME

Workflow

  1. Health check (optional):

    python3 "$WX_HOME/scripts/fetch_wechat.py" --doctor
    
  2. Extract article:

    python3 "$WX_HOME/scripts/fetch_wechat.py" "<mp.weixin.qq.com URL>" \
      --output-dir "<desired output directory>"
    
  3. The script prints a JSON result to stdout:

    {
      "status": "ok",
      "title": "文章标题",
      "author": "公众号名称",
      "publish_time": "2026-07-14 00:18",
      "char_count": 7025,
      "output_path": "path/to/extracted.md"
    }
    
  4. Read the output file and present the full text or pass it to the next skill.

  5. On failure:

    • Exit 1 (fetch/CAPTCHA): suggest retry after a few minutes or ask the user to paste text
    • Exit 2 (parse failure): rerun with --raw to save HTML for debugging

Command Reference

fetch_wechat.py <url> [options]

Arguments:
  url                    mp.weixin.qq.com article URL

Options:
  --output-dir <dir>     Output directory (default: current directory)
  --raw                  Also save the raw HTML alongside the Markdown
  --doctor               Check dependencies and exit

No external dependencies — Python stdlib only (urllib, re, html, json).

Integration Examples

This skill provides text for any downstream content workflow:

ScenarioCall chain
Rewrite article into video scriptrn-wechat-extract → rewrite skill
Save article as topic idearn-wechat-extract → topic management
Read and discuss an articlern-wechat-extract (standalone)
Turn article into image cardsrn-wechat-extract → content adaptation

Comments

Markdown supported