Skip to content
Agent Memory
Skill

/wechat-article-extractor

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

From plugin
molio
45113 skills

Claude Code

$ npx -y skills add zhuzhaoyun/Molio --skill wechat-article-extractor --agent claude-code

SKILL.md

wechat-article-extractor.SKILL.md
name: wechat-article-extractor
description: 提取微信公众号文章(mp.weixin.qq.com)内容为 Markdown。遇到 mp.weixin.qq.com 链接时使用此 skill,禁止使用 WebFetch。
version: 1.0.0

WeChat Article Extractor

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

⚠️ 重要:禁止使用 WebFetch

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

使用方法

从 URL 提取

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

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

从本地 HTML 文件提取

node "<skill_dir>/extract.js" --html /path/to/article.html [source_url]

输出格式

成功(退出码 0)

  • **stdout**: Markdown 格式的文章正文(保留表格、代码块、图片占位)
  • **stderr**: 一行 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:

---
title: "文章标题"
author: "作者"
source: "公众号名称"
url: "原始链接"
published: "YYYY/MM/DD HH:mm:ss"
extracted_at: "ISO时间戳"
---

3. 回复用户:已暂存到哪个路径,提示"回复入库/保存到知识库/归档后,我再整理进知识库" 4. 用户确认后,按增量导入流程整理进 wiki

失败兜底

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

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

Give AI your personal knowledge base. Local-first, and every byte stays yours.

Stars on GitHub

Momentum

stars in total
451
Star history of zhuzhaoyun/Molio on GitHub, a chart by star-history.com

Other skills on molio.

molio-kb

molio-kb

Query the user's local Molio knowledge base — browse files, full-text search, read documents, and run AI Q&A grounded in the…

@zhuzhaoyun@zhuzhaoyunInstall Skill
docling

docling

PRIMARY skill for converting .pdf, .docx, .pptx, .xlsx, .doc, .ppt, .xls, images, and audio/video files (.mp3, .wav, .m4a, .mp4,…

@zhuzhaoyun@zhuzhaoyunInstall Skill
quiz-generate

quiz-generate

从当前知识库内容生成带出处的题目(单选/多选/判断/填空/解答),在聊天中直接作答、判分、看解析并跳回原文。适用于任何领域的学习与练习——备考、课程学习、职业成长、兴趣研究均可,不绑定学科、考试或考纲。Triggers on: 出题, 考考我, 练习,…

@zhuzhaoyun@zhuzhaoyunInstall Skill
quiz-repractice

quiz-repractice

重练「存为题库」保存过的题——从当前知识库的题库目录选题,把存档里的题原样重发成题卡重新作答,判分与解析复用现有链路,答对的题可以从题库移除。不生成新题。Triggers on: 重练, 错题, 题库, 再做一遍, 重做错题, 重练错题, quiz…

@zhuzhaoyun@zhuzhaoyunInstall Skill
remotion

remotion

Molio's builtin skill for MAKING a video from any source — wiki notes, articles, scripts, product info, or a brief — and…

@zhuzhaoyun@zhuzhaoyunInstall Skill
rule-sandbox

rule-sandbox

从当前知识库内容生成可交互的阈值演示——用户拖动参数越过边界,判定与解释实时翻转。适用于任何领域的边界规则(负载与警戒线、时效与期限、资格与条件、温压与安全区间),不绑定学科或考试。Triggers on: 演示, 可视化, 解释给我看, 拖动, 沙盘,…

@zhuzhaoyun@zhuzhaoyunInstall Skill

More skills from other plugins.

agent-cost-report

agent-cost-report

Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…

claude-mem13d116k
@thedotmack@thedotmackInstall Skill
bot-handoff

bot-handoff

Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…

@vectorize-io@vectorize-ioInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@mempalace@mempalaceInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@milla-jovovich@milla-jovovichInstall Skill

Questions about wechat-article-extractor.

Which coding agents can use wechat-article-extractor?
wechat-article-extractor installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.