公众号文章转 Markdown

SKILL效率
效率 未标注权限 许可证不明确
安装这个技能

一键将微信公众号文章转为完整 Markdown 文件。忠实保留原文每一个字,不做任何修改、总结或优化;自动提取文中全部图片 CDN 地址并准确插入对应位置。支持代码块、列表、引用等全部格式保留。粘贴链接即可,无需手动操作。适用于笔记归档、内容引用、资料整理等场景。

一句话选型结论

按资料字段整理

公众号文章转 Markdown是效率类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类效率 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_6ddc8f77/wechat-to-markdown
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

效率
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_6ddc8f77仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791736016
正文体量13.8 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
整理待办与日程

把零散任务收进清单,排出优先级。

批量处理重复任务

把固定动作做成模板,重复执行。

把流程写成清单

把口头流程整理成可复用的步骤。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在效率场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
公众号文章转 Markdown当前 未标注权限 未标注 未标注 未标注 有
Nano PDF 文档 联网访问 ClawHub 市场 424.9 万 OpenClaw 有
自动更新程序 浏览器控制 ClawHub 市场 296.4 万 OpenClaw 有
Gemini 助手 联网访问 ClawHub 市场 254.7 万 OpenClaw 有
word DOCX 文档 联网访问 ClawHub 市场 239.6 万 OpenClaw 有
Excel XLSX 前端 联网访问 ClawHub 市场 227.0 万 OpenClaw 有

SKILL.md 全文

13.8 KB
模型实际读到的说明书原文,来自技能仓库

WeChat Article to Markdown

Overview

Convert a WeChat public account article (mp.weixin.qq.com) into a Markdown file. Preserve all original text verbatim — no rewriting, no summarization, no polishing. Include every image from the article with its original CDN URL. Also detect and mark videos, audio, and other embedded media so no content is silently lost.

Workflow

Step 0: Validate URL & Preflight Check

Before fetching anything, validate the input:

  1. Check URL format: Must contain mp.weixin.qq.com. If not, tell the user:
    > ⚠️ 这个链接不是微信公众号文章地址。请确认链接以 https://mp.weixin.qq.com/ 开头。

  2. Clean the URL: Strip tracking parameters (?mpshare=1&scene=1&srcid=...&sharer_shareinfo=... etc.). Keep only the base URL up to and including the article ID. This avoids anti-scraping triggers.

  3. Proceed only if URL is valid.

Step 1: Fetch Article Text

Use WebFetch to retrieve the article content:

WebFetch with prompt: "Extract the complete article: title, author, publish date, all body text exactly as written (no summarization). Preserve headings, paragraphs, lists, quotes. Note where images appear."

Error handling — if WebFetch returns empty or fails:

  • If the response contains "环境异常" / "访问过于频繁" / "verify" → the article is behind an anti-scraping wall. Tell the user:
    > ⚠️ 微信反爬机制触发,暂时无法抓取。请稍后重试,或在手机上打开文章确认链接是否有效。

  • If the response is empty or garbled → try the raw HTML fetch in Step 2 directly. If that also fails:
    > ⚠️ 无法获取文章内容。可能原因:① 链接已失效/文章被删除 ② 网络连接问题 ③ 需要微信登录验证。请确认链接在浏览器中能正常打开后重试。

  • If the response looks like a login/verification page → tell the user:
    > ⚠️ 该文章可能需要微信登录才能查看,暂不支持转换。

Step 2: Fetch Raw HTML & Extract All Media

WeChat articles lazy-load images via data-src attributes. WebFetch alone cannot capture these — the raw HTML must be fetched with curl. This single fetch also extracts videos and audio.

curl -sL --max-time 30 -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "<article-url>" 2>/dev/null > /tmp/wx_raw.html

Error handling — check curl result:

  • If curl exits with code 6 (DNS failure) → ⚠️ 网络连接失败,请检查网络后重试。
  • If curl exits with code 28 (timeout) → ⚠️ 请求超时,微信服务器响应过慢,请稍后重试。
  • If curl exits with code 35/51 (SSL) → ⚠️ SSL 证书问题,请检查系统时间是否正确。
  • If the output file is empty or very small (<500 bytes) → likely behind anti-scraping wall, see Step 1 error handling.
  • If the output contains &quot;msg&quot;: &quot;need verify&quot; or &quot;environment&quot; → anti-scraping triggered. Tell user to retry later.

Then extract all media types from the saved HTML in one pass:

python3 -c &quot;
import sys, re, html

with open(&#x27;/tmp/wx_raw.html&#x27;, &#x27;r&#x27;, encoding=&#x27;utf-8&#x27;, errors=&#x27;ignore&#x27;) as f:
    content = f.read()

# --- Images (data-src on img tags) ---
img_pattern = r&#x27;&lt;img[^&gt;]*data-src=\&quot;(https://mmbiz\.qpic\.cn/[^\&quot;]+)\&quot;[^&gt;]*/?&gt;&#x27;
for i, m in enumerate(re.finditer(img_pattern, content)):
    start = max(0, m.start() - 800)
    end = min(len(content), m.end() + 200)
    context = content[start:end]
    clean = re.sub(r&#x27;&lt;[^&gt;]+&gt;&#x27;, &#x27; &#x27;, context)
    clean = html.unescape(clean)
    clean = re.sub(r&#x27;\s+&#x27;, &#x27; &#x27;, clean).strip()[-400:]
    url = m.group(1).replace(&#x27;&amp;amp;&#x27;, &#x27;&amp;&#x27;)
    print(f&#x27;=== Image {i+1} ===&#x27;)
    print(f&#x27;Type: image&#x27;)
    print(f&#x27;URL: {url}&#x27;)
    print(f&#x27;Context: ...{clean}...&#x27;)
    print()

# --- Videos (mp-commonvideosnap, iframe video player, video tags) ---
video_patterns = [
    (r&#x27;&lt;mp-commonvideosnap[^&gt;]*&gt;(.*?),&quot;(https://[^&quot;]+)&quot;&#x27;, &#x27;WeChat video&#x27;),
    (r&#x27;&lt;iframe[^&gt;]*data-src=\&quot;(https://mp\.weixin\.qq\.com/mp/readtemplate[^\&quot;]*mpvideo[^\&quot;]*)\&quot;&#x27;, &#x27;Embedded video&#x27;),
    (r&#x27;&lt;video[^&gt;]*poster=\&quot;([^\&quot;]+)\&quot;[^&gt;]*src=\&quot;([^\&quot;]+)\&quot;&#x27;, &#x27;HTML5 video&#x27;),
]
vid_idx = 0
for pattern, label in video_patterns:
    for m in re.finditer(pattern, content, re.DOTALL):
        vid_idx += 1
        start = max(0, m.start() - 800)
        end = min(len(content), m.end() + 200)
        context = content[start:end]
        clean = re.sub(r&#x27;&lt;[^&gt;]+&gt;&#x27;, &#x27; &#x27;, context)
        clean = html.unescape(clean)
        clean = re.sub(r&#x27;\s+&#x27;, &#x27; &#x27;, clean).strip()[-400:]
        url = m.group(m.lastindex).replace(&#x27;&amp;amp;&#x27;, &#x27;&amp;&#x27;)
        poster = m.group(1).replace(&#x27;&amp;amp;&#x27;, &#x27;&amp;&#x27;) if m.lastindex &gt;= 2 else &#x27;&#x27;
        print(f&#x27;=== Video {vid_idx} ===&#x27;)
        print(f&#x27;Type: video ({label})&#x27;)
        print(f&#x27;URL: {url}&#x27;)
        if poster:
            print(f&#x27;Poster: {poster}&#x27;)
        print(f&#x27;Context: ...{clean}...&#x27;)
        print()

# --- Audio (mpvoice, mpmusic) ---
audio_patterns = [
    (r&#x27;&lt;mpvoice[^&gt;]*voice_encode_fileid=\&quot;([^\&quot;]+)\&quot;[^&gt;]*&gt;&#x27;, &#x27;WeChat voice&#x27;),
    (r&#x27;&lt;mpmusic[^&gt;]*src=\&quot;([^\&quot;]+)\&quot;[^&gt;]*&gt;&#x27;, &#x27;Music card&#x27;),
]
aud_idx = 0
for pattern, label in audio_patterns:
    for m in re.finditer(pattern, content):
        aud_idx += 1
        start = max(0, m.start() - 800)
        end = min(len(content), m.end() + 200)
        context = content[start:end]
        clean = re.sub(r&#x27;&lt;[^&gt;]+&gt;&#x27;, &#x27; &#x27;, context)
        clean = html.unescape(clean)
        clean = re.sub(r&#x27;\s+&#x27;, &#x27; &#x27;, clean).strip()[-400:]
        print(f&#x27;=== Audio {aud_idx} ===&#x27;)
        print(f&#x27;Type: audio ({label})&#x27;)
        print(f&#x27;ID: {m.group(1)}&#x27;)
        print(f&#x27;Context: ...{clean}...&#x27;)
        print()
&quot;

This single script outputs all images, videos, and audio in order of appearance, each with surrounding context for position mapping.

Step 3: Map All Media to Article Positions

Use the context text before each media element to determine where it belongs in the article flow:

  • Images → insert as ![alt text](image-url)
  • Videos → insert as ![视频封面](poster-url)\n\n&gt; 📹 视频({label}):[点击查看]({video-url})
  • If no direct video URL is available (common for WeChat native videos), insert: &gt; 📹 视频({label}):请前往原文查看
  • If a poster/cover image is available, include it above the note
  • Audio → insert as &gt; 🎵 音频({label}):请前往原文收听
  • WeChat audio cannot be directly linked in markdown, so always note the position and direct users to the original article

Step 4: Write the Markdown File

Create a Markdown file with:

  • Article title as # heading
  • Author and source as metadata
  • All body text preserved exactly as-is
  • Images inserted at correct positions: ![alt text](image-url)
  • Videos marked at correct positions with cover image (if available) + video note
  • Audio marked at correct positions with audio note
  • Code blocks, bold, lists, and other formatting preserved from the original
  • ▸ captions (image captions in WeChat articles) kept verbatim, placed near their corresponding images

Step 5: Verify

After writing, run two checks:

# Check no empty image placeholders remain
grep -c &#x27;!\[\]()&#x27; &lt;output-file.md&gt;

Should return 0.

# List all media markers to confirm videos/audio were captured
grep -n &#x27;📹\|🎵&#x27; &lt;output-file.md&gt;

If the article was known to contain videos/audio but none are found, warn the user:
> ⚠️ 原文可能包含视频/音频内容,但未能自动提取。请前往原文确认。

Step 6: Report to User

After presenting the file, include a brief summary:

  • Total images extracted and inserted
  • Total videos found (and whether URLs were available or just marked)
  • Total audio clips found
  • Any warnings (missing media, anti-scraping issues, etc.)

Key Rules

  1. Never alter the original text. No summarization, no polishing, no rewording. Keep every character.
  2. Never skip images. Every image in the article must have its CDN URL in the markdown.
  3. Never silently drop media. Videos and audio must be marked at their positions even if a direct URL cannot be extracted — the user must know content exists there.
  4. Validate before fetching. Check URL format, clean tracking params, and handle network errors with clear Chinese messages.
  5. Map all media by context. Use the raw HTML context around each element to correctly place it. Ignore decorative/minor images only if they are not part of the article content (e.g., WeChat UI elements).
  6. Use the article title as filename. Save as {article-title}.md in the current workspace directory.
  7. Present the file to the user when done, with a summary of what was extracted.

FAQ — 常见问题与排查

Q1: 提示"微信反爬机制触发"怎么办?

微信对同一 IP 的频繁请求会触发反爬。解决办法:
- 等待 5-10 分钟后重试
- 确认链接在手机微信中能正常打开
- 如果多次重试仍失败,可能是该文章被限制了访问频率,建议换个时间段再试

Q2: 图片地址在 Markdown 中显示裂图?

微信图片 CDN(mmbiz.qpic.cn)的 URL 会设置防盗链和过期时间。可能原因:
- 防盗链:部分图片限制了 Referer,直接在 Markdown 编辑器中打开会裂图。解决:在浏览器中打开图片 URL 确认是否可访问;如果图片已过期,需重新从原文获取
- URL 过期:微信图片 URL 并非永久有效,建议转换后尽快下载图片到本地归档
- HTML 实体未解码:检查 URL 中是否残留 &amp;amp;,应为 &amp;

Q3: 文章里的视频为什么只有标记没有播放链接?

微信原生视频使用 mp-commonvideosnap 自定义标签,视频流地址是动态生成的,无法直接提取为静态 URL。技能会在对应位置插入 &gt; 📹 视频 标记,并保留封面图(如果有),用户可前往原文查看视频内容。第三方嵌入视频(如腾讯视频 iframe)可以提取到链接。

Q4: 转换后的文章内容不完整?

可能原因及排查:
- 文章过长被截断:超长文章(万字以上)的 HTML 可能被分页或延迟加载。检查 curl 抓取的 HTML 是否包含完整 &lt;/div&gt; 闭合标签
- 正文在 JS 中动态渲染:部分文章正文内容由 JavaScript 渲染,curl 只能拿到静态 HTML。这种情况下 WebFetch 提取的文本可能更完整,以 WebFetch 的文本为准,图片位置参考 HTML 上下文
- 付费/会员文章:需要付费才能查看完整内容的文章,免费部分可以正常转换

Q5: curl 命令在 Windows 上报错?

  • 确认使用的是 Git Bash 环境(WorkBuddy 默认使用 bash)
  • 如果提示 curl: command not found,尝试用完整路径或改用 PowerShell 的 Invoke-WebRequest
  • Python 命令在不同系统上可能不同:Windows 上可能需要用 python 而非 python3

Q6: 文章包含小程序卡片、投票、红包等特殊元素怎么办?

这些微信特有元素无法转为标准 Markdown,技能会在对应位置插入提示标记:
- 小程序卡片 → &gt; 🔗 小程序卡片:请前往原文查看
- 投票 → &gt; 📊 投票:请前往原文参与
- 红包/赞赏 → &gt; 💰 红包/赞赏:请前往原文查看

Q7: 提示"该文章可能需要微信登录才能查看"?

部分文章设置了仅粉丝可见或需要关注公众号才能阅读。这类文章无法直接抓取,建议:
- 在手机微信中打开文章,完成关注/登录后复制完整内容
- 或截图后用 OCR 工具转换

Q8: 转换速度很慢怎么办?

  • 图片较多的文章(20张以上)需要多次 Edit 操作来填入图片 URL,属正常现象
  • 可在转换完成后提示用户"图片较多,转换耗时稍长,请耐心等待"
  • 如果 curl 超过 30 秒未响应,会自动超时并提示重试

Q9: 如何保存图片到本地而不是引用 CDN 链接?

本技能默认保留 CDN 原始链接。如果需要将图片下载到本地,转换完成后可追加一步:

# 批量下载 Markdown 文件中引用的图片
grep -oP &#x27;!\[.*?\]\(\K[^)]+&#x27; &lt;output-file.md&gt; | while read url; do
  filename=$(echo &quot;$url&quot; | grep -oP &#x27;[^/]+\.(jpg|png|gif|webp)&#x27; | head -1)
  curl -sL &quot;$url&quot; -o &quot;images/$filename&quot;
done

然后批量替换 Markdown 中的 CDN 链接为本地路径。

常见问题

5 问
答案由本站依据条目字段整理
公众号文章转 Markdown怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_6ddc8f77/wechat-to-markdown。安装方式为未标注。装完刷新技能列表或重开客户端。

公众号文章转 Markdown支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

公众号文章转 Markdown权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

公众号文章转 Markdown收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

公众号文章转 Markdown用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。