Token导航 LogoToken导航

Agent Skill · 开发

wechat-article-to-markdown-v2(wechat article TO Markdown V2 控制)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

wechat-article-to-markdown-v2 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为操作浏览器;许可证为 MIT-0,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 8,177。

总安装 3,293周安装 140GitHub Stars 公开资料未说明下载 1,154核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.1.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:wechat-article-to-markdown-v2(wechat article TO Markdown V2 控制)
来源仓库:https://github.com/benzking/wechat-article-to-markdown-v2
安装命令:
openclaw skills install wechat-article-to-markdown-v2
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install wechat-article-to-markdown-v2

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

wechat-article-to-markdown-v2 将微信公众号文章转换为高质量 Markdown 格式。适用于内容标准化、文档迁移与跨平台发布等开发需求。通过 clawhub 安装并使用 openclaw skills install wechat-article-to-markdown-v2 命令集成。

使用前需确认权限范围,注意可能涉及样式剥离与链接转换操作。建议查看原始仓库以了解转换规则与图片嵌入方式。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install wechat-article-to-markdown-v2;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

wechat-article-to-markdown-v2 怎么安装?

在终端执行 openclaw skills install wechat-article-to-markdown-v2。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

wechat-article-to-markdown-v2 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

wechat-article-to-markdown-v2 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

wechat-article-to-markdown-v2 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

wechat-article-to-markdown-v2 用的人多吗?

公开数据是累计安装 3,293 次,近一周安装 140 次,下载 1,154 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

wechat-article-to-markdown-v2 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
wechat-article-to-markdown-v2

wechat article TO Markdown V2 控制 · 本页

3,293—操作浏览器MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
wechat-article-to-markdown
description
This skill converts WeChat Official Account (微信公众号) article pages into high-quality, clean Markdown format. It should be used when the user provides a WeChat article URL (mp.weixin.qq.com) and wants to convert, extract, save, or archive the article content as Markdown. Trigger phrases include "convert WeChat article", "微信文章转Markdown", "save this WeChat article", "extract article content", "抓取微信文章", "文章转MD", or when a mp.weixin.qq.com URL is provided.
version
1.1.0

Changelog

v1.1.0 (2026-04-11)

修复:

  • fetch_with_playwright 改用移动端 Chromium(is_mobile=True + iPhone UA + 393×852 viewport),临时分享链接(tempkey)可正常渲染
  • 新增懒加载图片处理:滚动触发 data-src 图片加载
  • 新增「页面不存在」错误检测

对比(v1.0 → v1.1):

项目旧版新版
User Agent桌面 ChromeiPhone Safari
Viewport1280×900393×852
临时链接❌ 无法渲染✅ 正常
懒加载图片❌✅ 滚动触发

WeChat Article to Markdown

Overview

Convert WeChat Official Account articles (mp.weixin.qq.com) into clean, high-quality Markdown. The skill uses a Python script optimized for WeChat's unique DOM structure, featuring deep noise removal, smart code block detection, rich text preservation, and intelligent paragraph formatting.

Workflow

Decision Tree

User provides WeChat article URL?
├── Yes → Go to Step 1: Install Dependencies & Run Script
├── User wants to convert HTML directly?
│   └── Use Step 2: In-Line Conversion (for fetched HTML)
└── User asks about multiple URLs?
    └── Use batch mode with -f flag

Step 1: Install Dependencies & Convert

  1. Ensure Python dependencies are available. Install if missing:
   pip install requests beautifulsoup4 markdownify
  1. Run the conversion script:
   python scripts/wechat_to_md.py "<WECHAT_URL>" -o "<OUTPUT_DIR>"

Options: - --no-images — Skip image downloading, keep remote URLs - --no-frontmatter — Omit YAML frontmatter - Multiple URLs: python scripts/wechat_to_md.py url1 url2 url3

  1. The output structure:
   <OUTPUT_DIR>/
   └── <Article_Title>/
       ├── <Article_Title>.md
       └── images/
           ├── img_000.png
           └── img_001.jpg

Step 2: In-Line Conversion (for Pre-Fetched HTML)

If the HTML has already been fetched (e.g., via web_fetch), use the script's convert_simple() function programmatically:

import sys
sys.path.insert(0, "<SKILL_DIR>/scripts")
from wechat_to_md import convert_simple

# 基础用法:仅转换,不下载图片
result = convert_simple("https://mp.weixin.qq.com/s/xxxxx")
markdown = result["markdown"]       # Full Markdown string
metadata = result["metadata"]       # {title, author, date, url, ...}
code_blocks = result["code_blocks"] # [{lang, code}, ...]
image_urls = result["image_urls"]   # 原始图片 URL 列表

# 高级用法:同时下载图片到本地
result = convert_simple(
    "https://mp.weixin.qq.com/s/xxxxx",
    download_imgs=True,              # 启用图片下载
    output_dir="./my_article"        # 指定输出目录(可选)
)
markdown = result["markdown"]        # 图片链接已替换为本地路径
image_mapping = result["image_mapping"]  # URL -> 本地路径映射
output_dir = result["output_dir"]    # 实际输出目录

Return the Markdown content directly to the user or write it to a file.

Step 3: Present Results

  • Display the generated Markdown file path to the user.
  • If the user wants to review the content, read the .md file and present a summary.
  • For batch conversions, report success/failure count.

Core Capabilities

1. Deep Noise Removal (WeChat-Specific)

The script removes 30+ WeChat-specific noise elements including:

  • Ad banners and promotional content (.mp_profile_iframe, #ad_content)
  • QR codes and reward/tip areas (.reward_area, .qr_code_pc)
  • Comment sections (#comment_container, #js_cmt_area)
  • Audio/video players (mpvoice, mpvideo)
  • Related article recommendations (#relation_article)
  • Tool bars, footers, copyright areas, tag sections
  • Hidden elements (display:none, visibility:hidden)
  • Empty <span> placeholders

2. Smart Code Block Detection

Handles all 3 WeChat code block formats:

  • pre.code-snippet with data-lang attribute
  • .code-snippet__fix container with nested pre[data-lang]
  • Generic pre[data-lang]

Features:

  • Auto-detects programming language from data-lang, CSS class, and code content
  • Removes line numbers (.code-snippet__line-index)
  • Filters CSS counter leaks (counter(line) garbage text)
  • Uses placeholder strategy: extract code blocks before conversion, restore after
  • Supports 25+ languages: Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, SQL, HTML, CSS, JSON, YAML, Shell, Dockerfile, etc.

3. Rich Text Preservation

  • Bold/Italic: Normalizes <b> → <strong>, <i> → <em>, handles inline font-weight: bold
  • Lists: Converts WeChat marker-based lists (•, ·, 1., (1)) to proper Markdown lists
  • Blockquotes: Detects left-border styled sections as blockquotes
  • Tables: Preserves table structure
  • Links: Preserves article links
  • Headings: Detects font-size based headings (≥22px → H2, ≥19px → H3)

4. Intelligent Paragraph Formatting

  • Fixes lazy-loaded images (data-src → src)
  • Cleans HTML entity residuals (&nbsp; → space, zero-width spaces removed)
  • Collapses excessive blank lines (max 2 consecutive)
  • Trims trailing whitespace per line
  • Proper spacing around code blocks
  • Full-width spaces → half-width spaces

5. Metadata Extraction

Generates YAML frontmatter:

---
title: "Article Title"
author: "Account Name"
date: "2026-04-08"
source: "https://mp.weixin.qq.com/s/xxxxx"
description: "Article description if available"
---

6. Image Handling

  • 自动下载:下载所有文章图片到 images/ 子目录
  • 并发下载:默认 5 个并发线程,支持重试机制(默认重试 2 次)
  • 格式检测:从 URL 和 Content-Type 自动检测图片格式
  • 链接替换:自动将 Markdown 中的远程 URL 替换为本地相对路径 (images/img_000.png)
  • URL 变体处理:智能处理微信图片 URL 的不同查询参数变体
  • 失败回退:下载失败时保留原始远程 URL
  • 文件验证:验证下载文件大小(过滤小于 100 字节的损坏文件)

图片下载增强功能:

# 下载图片并获取映射关系
from wechat_to_md import download_images, replace_image_urls

# 下载图片
url_to_local = download_images(
    img_urls=["https://mmbiz.qpic.cn/..."],
    output_dir=Path("./output"),
    concurrency=5,    # 并发数
    timeout=30,       # 超时时间(秒)
    retries=2         # 重试次数
)

# 替换 Markdown 中的图片链接
md = replace_image_urls(markdown, url_to_local)

Error Handling

ErrorCauseResolution
NetworkErrorHTTP failure, timeout, 404Retries 3x with exponential backoff
CaptchaErrorCaptcha page detectedInform user to wait and retry
ParseErrorContent element not foundCheck URL validity, may be restricted article
Missing dependenciespip install not runInstall: pip install requests beautifulsoup4 markdownify

Important Notes

  • Only supports mp.weixin.qq.com domain articles
  • Some code blocks are rendered as images/SVG — their source code cannot be extracted
  • Captcha pages may appear under high-frequency access; wait and retry
  • Public articles only — login-gated articles cannot be fetched
  • Respect original author copyright; for personal study/archiving use only

References

For detailed WeChat article DOM structure, selectors, and element handling, refer to:

  • references/wechat-dom-reference.md — Complete WeChat DOM structure documentation

平台分布

OpenClaw

82.15%
按下载量换算948

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills