yichen-wechat-mp-batch-exporter
它能做什么
它获取 WeChat 公众号文章的正文,并可导出文章列表和数据指标,供你自己留档。适合希望为私人用途在本地保存某个公众号文章的人。
适用场景
- ✓当你想保存特定 WeChat 公众号文章的正文时。
- ✓当你想把某个公众号的历史文章列表导出为文件时。
- ✓当你想查看某个 WeChat 公众号文章的阅读量和评论数时。
技能链接
https://github.com/mcncarl/yichen-skills/blob/main/yichen-wechat-mp-batch-exporter/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这三篇 WeChat 文章的全文保存为 Markdown 文件,方便我离线阅读。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体先运行本地检查工具,然后从你提供的链接或某个公众号的历史记录中获取文章正文,并将结果保存为文件。它从不操作你的 WeChat 应用,也从不打印登录凭据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
WeChat MP Batch Exporter
Core Rule
Never operate the user's WeChat UI. Do not publish, delete, mass-send, follow, unfollow, send messages, or click inside WeChat. For any workflow requiring WeChat desktop, tell the user exactly what to do and wait for confirmation.
Never print raw cookies, auth-key, token, pass_ticket, key, uin, credentials JSON, or QR login secrets in chat or saved reports.
Downloaded article content belongs to the original authors or rights holders. Use exports only within the user's lawful/private-use scope unless the user confirms they have permission to republish or redistribute.
First Step
Run the local doctor before choosing a workflow:
python3 {baseDir}/scripts/doctor.py
Use --check-network only when the task needs the public exporter API or online download endpoint.
Decision Tree
- User provides known article URLs and only needs正文/Markdown: use
scripts/download_urls.py; no login or WeChat action is required. - User wants a public account's历史文章列表 or latest N articles: use exporter mode from
wechat-article-exporter; this requires a user-owned WeChat Official Account backend login/auth-key. - User needs阅读量、点赞、转发、评论、评论回复: use
wxdown-servicecredentials flow first, then export enhanced fields fromwechat-article-exporter. - User says“不登录”“代理模式” or exporter mode fails: use the proxy/history fallback only after explicit confirmation; read
references/manual-gates.mdfirst.
For simple single-URL extraction without batch/enhanced needs, prefer the existing $wechat-article skill.
Count Discipline
Never report a public account total as just “N 篇文章” until the count scope is clear.
After any history sync or imported history JSON, run:
python3 {baseDir}/scripts/analyze_history.py --history-json /path/to/history.dedup.json
python3 {baseDir}/scripts/analyze_history.py --chunk-dir /path/to/chunks --output-dir /path/to/output
Use these labels in user-facing answers:
publish_groups: uniquemsgidvalues; roughly one WeChat publish/message group.expanded_url_items: every unique article URL after expanding multi-article messages.original_articles: frontend-style original article count, usingcopyright_type=1,copyright_stat=1, andis_deleted=false.
If counts disagree with what the user sees in WeChat, explain the scope difference first and point to the generated history.summary.json / history.summary.md.
Known-URL Body Download
Use this path for pasted URLs, .txt, .csv, or .json URL lists:
python3 {baseDir}/scripts/download_urls.py --file /path/to/urls.txt --format markdown
python3 {baseDir}/scripts/download_urls.py "https://mp.weixin.qq.com/s/..."
Report only: success count, failure count, failed URLs, output directory, and index.csv.
Default output:
~/Downloads/wechat-mp-batch/<run-id>/
|-- index.csv
|-- errors.json
`-- articles/
`-- 001-<safe-title>.md
History And Enhanced Export
Read references/exporter-workflow.md before running exporter/history/enhanced-data tasks.
Start the local credential helper with:
python3 {baseDir}/scripts/start_wxdown_service.py
Use the mature upstream stack:
wechat-article/wechat-article-exporterfor account search, article history, body download, and multi-format export.wechat-article/wxdown-servicefor user-owned credential capture needed by read/comment metrics.
Local source paths are environment-specific. Prefer environment variables or explicit script flags:
export WECHAT_ARTICLE_EXPORTER_DIR=/path/to/wechat-article-exporter
export WXDOWN_SERVICE_DIR=/path/to/wxdown-service
python3 {baseDir}/scripts/doctor.py --exporter-path "$WECHAT_ARTICLE_EXPORTER_DIR" --wxdown-path "$WXDOWN_SERVICE_DIR"
python3 {baseDir}/scripts/start_wxdown_service.py --wxdown-dir "$WXDOWN_SERVICE_DIR"
If using the public exporter, default base URL is:
https://down.mptext.top
Manual Gates
Read references/manual-gates.md whenever the task involves login, credentials, comments, read counts, proxy, certificate trust, or WeChat desktop.
These actions always require explicit user confirmation:
- Scanning a QR code and selecting the user's Official Account or service account.
- Installing or trusting a mitmproxy certificate.
- Enabling or changing macOS system proxy settings.
- Asking the user to open an article/history page inside WeChat desktop and scroll.
- Using a pasted auth-key or credentials file.
常见问题
它会在 WeChat 里发布或修改任何内容吗?
不会。该技能规定绝不发布、删除、发送消息,也绝不在 WeChat 内点击操作。
下载文章正文需要登录吗?
不需要。已知的文章链接无需登录即可下载,但公众号历史记录和数据指标需要你自己的账号凭据。
我可以转载导出的文章吗?
只能用于合法的私人用途,除非权利人已授权你转载。
详情
作者的原始描述
批量下载微信公众号文章正文、历史文章列表、原创文章筛选、历史计数口径、阅读量、点赞/转发等指标、评论和评论回复。Use when the user asks to batch fetch mp.weixin.qq.com articles, export WeChat public-account history, distinguish publish groups vs expanded article URLs vs original articles, use wechat-article-exporter, use wxdown-service credentials, collect read/comment metrics, or create an archive for Obsidian/Feishu/local analysis. Do not use for ordinary one-off article summarization unless batch/enhanced data is requested.
repo: mcncarl/yichen-skills
热度
- GitHub 星标
- 5.2k
- 排名
- #15038
- 许可证
- —
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
yichen-grok-consult
5.2k让你的智能体向 xAI Grok 征求第二意见、审阅内容,或进行网页或 X 搜索,同时主 AI 仍掌握控制权。
yichen-chatgpt-web-research
5.2k让你的智能体使用你已登录的 ChatGPT 网站账户(包括 Pro 模型)进行产品、市场或竞争对手研究。
yichen-codex-chatgpt
5.2k让你的智能体把 ChatGPT 作为本地项目的设计者和审阅者,而由 Codex 编写并测试代码。
yichen-mac-wechat-dual-open
5.2k帮你的智能体在 Mac 上设置第二个 WeChat 应用,让两个 WeChat 账号可以同时打开。