zhuzhaoyun/molio/wechat-article-extractor

Claude Code and agent skill by zhuzhaoyun/molio

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

提取微信公众号文章(mp.weixin.qq.com)内容为 Markdown。遇到 mp.weixin.qq.com 链接时使用此 skill,禁止使用 WebFetch。

Install

npx vskill@latest install zhuzhaoyun/molio/wechat-article-extractor

SKILL.md

WeChat Article Extractor

提取微信公众号文章内容为结构化 Markdown,保留表格、代码块、图片占位。

⚠️ 重要:禁止使用 WebFetch

WebFetch 对 mp.weixin.qq.com 会被企业安全策略拦截。必须使用本 skill 的 extract.js 脚本提取文章内容。

使用方法

从 URL 提取
bash
node "<skill_dir>/extract.js" "https://mp.weixin.qq.com/s?__biz=...&mid=...&idx=...&sn=..."

其中 <skill_dir> 是本 skill 所在目录的绝对路径(即包含此 SKILL.md 的目录)。

从本地 HTML 文件提取
bash
node "<skill_dir>/extract.js" --html /path/to/article.html [source_url]

输出格式

成功(退出码 0)
  • stdout: Markdown 格式的文章正文(保留表格、代码块、图片占位)
  • stderr: 一行 JSON 元数据:
json
{"title":"文章标题","author":"作者","account":"公众号名称","publishTime":"2024/01/15 10:30:00","url":"原始链接","type":"post","chars":12345}
失败(退出码非 0)
  • stderr: [wechat-extractor] ERROR <code>: <错误信息>
  • 退出码含义:
  • 1: 一般性错误(缺少输入、不支持的链接等)
  • 2: 内容不可用(风控拦截、已删除、已过期、违规等)— 不要重试,提示用户手动粘贴正文
  • 3: 网络/HTTP 错误 — 可重试 1 次

错误码表

代码错误信息处理方式
1000文章获取失败检查 URL 是否正确
1001无法获取文章信息页面结构异常
1002请求失败网络问题,可重试
1003响应为空网络问题,可重试
1004访问过于频繁等待后重试或请用户手动粘贴
1006公众号已迁移自动跟随重定向
2001请提供文章内容或链接缺少输入
2002链接已过期请用户提供新链接
2003内容涉嫌侵权内容不可用
2005内容已被发布者删除内容不可用
2006内容因违规无法查看内容不可用
2009不支持的链接仅支持 mp.weixin.qq.com
2012帐号已被屏蔽内容不可用
2013帐号已自主注销内容不可用

与知识库工作流集成

提取成功后,按以下步骤处理:

  1. 将 Markdown 正文暂存到 raw/wechat/YYYY-MM-DD/HHmm-简短标题.md
  2. 在暂存文件头部添加 frontmatter:
yaml
---
title: "文章标题"
author: "作者"
source: "公众号名称"
url: "原始链接"
published: "YYYY/MM/DD HH:mm:ss"
extracted_at: "ISO时间戳"
---
  1. 回复用户:已暂存到哪个路径,提示"回复入库/保存到知识库/归档后,我再整理进知识库"
  2. 用户确认后,按增量导入流程整理进 wiki

失败兜底

当退出码为 2(内容不可用)时:

  • 不要重试抓取
  • 回复用户:"该文章无法自动提取(原因:xxx)。请在浏览器中打开文章,复制正文内容发给我,我来帮你保存。"

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
437
Repository forks
55
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/zhuzhaoyun/molio/wechat-article-extractor/badge)](https://verified-skill.com/skills/zhuzhaoyun/molio/wechat-article-extractor)

Something wrong with this skill or its page? Tell us.