Wxmp Article Harvester logo

Wxmp Article Harvester

Community
zjp1997720
wxmp-article-harvester

抓取、筛选并导出微信公众号公开文章的独立 Skill。用户提到微信公众号、公众号文章、mp.weixin、wcx、搜索公众号、导出最近 N 天或某年度文章、批量抓取、断点续抓、正文补全、教程文章筛选、微信文章链接保存时使用。支持 Markdown/JSON/CSV,默认用 wcx 获取索引、Playwright 提取正文;付费 Metaso 兜底必须显式授权。

Overview

Publisherzjp1997720
Repositoryzhijian-skills
Skill namewxmp-article-harvester
Stars
780
Forks
99
Bundled files
12
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 12 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by zjp1997720 on GitHub. Read the source before you install it.

Installation

Install the Wxmp Article Harvester AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/zjp1997720/zhijian-skills/tree/main/skills/wxmp-article-harvester
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zjp1997720/zhijian-skills.git /tmp/zhijian-skills
mkdir -p .claude/skills
cp -r /tmp/zhijian-skills/skills/wxmp-article-harvester .claude/skills/wxmp-article-harvester
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wxmp Article Harvester in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wxmp Article Harvester on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wxmp Article Harvester is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

wxmp-article-harvester

目标:把公开公众号文章稳定加工成可检索、可审计、可恢复的本地资料包。

运行架构

  1. preflight.py 只检查依赖,不自动安装或升级任何软件。
  2. wcx_run.py 搜索公众号、刷新登录态、抓元数据并导出索引。
  3. harvest_wxmp.py 过滤日期和标题,复用一个 Playwright 上下文提取正文并保留图片顺序。
  4. 首次命中微信验证码或风控页后打开浏览器熔断,停止本轮后续页面请求;刷新失败时保留已通过质量门的旧正文。
  5. 没有可信正文时标记 partial。只有用户明确授权付费和第三方 URL 传输后,才加 --allow-metaso。

开始前

运行预检:

bash
python3 <skill-root>/scripts/preflight.py --json

缺少依赖时明确报告并停止。安装命令见 README.md。登录过期由 wcx_run.py 打开浏览器刷新一次;token 不打印,cookie 不进入进程参数。

意图路由

用户意图执行
搜索公众号python3 scripts/wcx_run.py -- search "账号名"
最近文章索引python3 scripts/harvest_wxmp.py --account "账号名" --limit 50 --no-fulltext
日期范围全文python3 scripts/harvest_wxmp.py --account "账号名" --from-date YYYY-MM-DD --to-date YYYY-MM-DD --fulltext
教程类文章在日期范围命令后加 `--title-regex '(教程
年度/深历史首轮加 --batch,冷却后只用 --resume;状态会恢复账号、范围和全文策略
保存单篇链接python3 scripts/browser_reader.py --url "https://mp.weixin.qq.com/s/..." --output-dir "目录"

没有指定数量时默认最近 50 篇。最近 N 天默认最多取 min(N × 8, 80) 篇元数据。

硬规则

  • 只接受 https://mp.weixin.qq.com/s... 公开文章链接;拒绝其他域名、协议和带用户信息的 URL。
  • 所有 wcx search/fetch/list/export/status 都走 wcx_run.py。运行时禁止自动 pip install 或强制升级。
  • --limit、--batch-size 的代码硬上限都是 80。深历史任务使用 offset 游标分批,每轮最多 80 篇,并校验远端总数、头部文章 ID 和上一批边界 ID。
  • 只补正文或重新筛选时加 --skip-fetch,避免重复触发微信频控。
  • 默认不调用 Metaso。用户明确接受付费和把文章 URL 发给第三方后,才使用 --allow-metaso。
  • wcx 摘要占位、正文尚未抓取、微信页面壳、通用 Video 页面和低信息量结果都不能标记成功。
  • 正文成功后同步更新标题、页面发布时间、作者、来源 URL 和提取通道。索引保存相对路径,迁移目录后仍可用。
  • 默认输出到系统用户数据目录下的 wxmp-article-harvester/exports/<公众号>/;可用 WXMP_HARVEST_HOME 覆盖。
  • 文章仅用于用户授权的研究、学习和归档。保留原文 URL、作者和发布时间;不把抓取结果包装成可再分发版权。

分批与恢复

bash
# 第一轮:按真实 offset 抓一批
python3 scripts/harvest_wxmp.py --account "账号名" --year 2025 --fulltext --batch --batch-size 60

# 到达 .harvest-state.json 的 resume_after 后继续
python3 scripts/harvest_wxmp.py --resume

存在多个待恢复账号时,--resume 会停止并要求补 --account 或 --output-dir。监控 JSON 中的 status、task_id 和 batch.completion_reason;complete 才代表本次契约完成,cursor_drift 必须停止并重新建任务。

常用命令

bash
# 最近 30 天全文,默认不使用付费兜底
python3 scripts/harvest_wxmp.py --account "账号名" --since 30d --fulltext

# 精确日期范围 + 教程标题筛选
python3 scripts/harvest_wxmp.py --account "账号名" \
  --from-date 2026-06-25 --to-date 2026-07-25 --fulltext \
  --title-regex '(教程|手把手|教你|技巧|实操|实践|工作流)'

# 已有索引,只补正文;用户已明确授权 Metaso
python3 scripts/harvest_wxmp.py --account "账号名" --skip-fetch --fulltext --allow-metaso

输出契约

  • index.json、index.csv、index.md:文章元数据、相对路径、状态和失败原因。
  • articles/*.md:保留原文 URL、发布时间、作者、提取通道以及正文中的图片顺序。
  • harvest-report.md:success、partial、failed 分开统计;任何页面壳或摘要占位进入 unresolved。
  • .harvest-state.json:稳定任务 ID、配置指纹、批次 offset、远端头/边界 ID、范围、完成原因、全文策略、Metaso 授权和冷却状态。

回执必须说明保存目录、成功/部分/失败数量、报告路径和未解决文章。排障时读取 references/troubleshooting.md。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Wxmp Article Harvester AI skill do?

抓取、筛选并导出微信公众号公开文章的独立 Skill。用户提到微信公众号、公众号文章、mp.weixin、wcx、搜索公众号、导出最近 N 天或某年度文章、批量抓取、断点续抓、正文补全、教程文章筛选、微信文章链接保存时使用。支持 Markdown/JSON/CSV,默认用 wcx 获取索引、Playwright 提取正文;付费 Metaso 兜底必须显式授权。

Why use Wxmp Article Harvester on TypingMind?

Because you install it once and use it with any model. Wxmp Article Harvester is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wxmp Article Harvester in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zjp1997720/zhijian-skills/tree/main/skills/wxmp-article-harvester. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Wxmp Article Harvester?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wxmp Article Harvester?

As many as you like. As long as a model supports skills, you can use Wxmp Article Harvester with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wxmp Article Harvester AI skill free?

Yes. It is published on GitHub by zjp1997720 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇