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に貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“この3つの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にセカンドオピニオン、レビュー、Webや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の2つ目のアプリを設定し、2つのWeChatアカウントを同時に開けるよう支援します。
似ているスキル
tavily
394kTavilyでウェブを検索し、特定のWebページから本文を取り出すようエージェントを支援します。深さ、ドメイン、日付のオプションも使えます。
blogwatcher
394kブログやRSS・Atomフィードを追跡し、新しい記事を確認して、読んだ記事に印を付けるようエージェントを支援します。
data-scraper-agent
280kエージェントが公開されているさまざまな情報源からデータを自動で収集できるよう支援します。スケジュール実行、情報の補強、結果の保存が可能です。オンラインデータの監視や追跡に役立ちます。