agentsclimarketplace

Wechat article downloader

Skill ar-gen-tin/wechat-article-downloader

Downloads WeChat Official Account (微信公众号) articles and converts to Markdown with local images. Supports single URL, batch file, search by account name via Sogou, or bulk download via WeChat API. Use when user mentions "download wechat article", "保存公众号文章", "下载公众号", "微信文章转markdown", "备份公众号", or provides mp.weixin.qq.com URLs.From its SKILL.md

Install
npx -y skills add ar-gen-tin/wechat-article-downloader

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.0 KB, 938 tokens by cl100k_base, as published. Nobody here has run it

WeChat Article Downloader

Downloads WeChat Official Account articles via Chrome CDP and converts to clean Markdown with locally saved images.

Script Directory

Agent Execution Instructions:

  1. Determine this SKILL.md file's directory path as SKILL_DIR
  2. Detect runtime: if bun is available use bun, otherwise use npx -y bun. Store as ${BUN_X}
  3. Script path = ${SKILL_DIR}/scripts/main.ts

Runtime Detection (one-time per session):

command -v bun >/dev/null 2>&1 && echo "bun" || echo "npx -y bun"

Run ${BUN_X} ${SKILL_DIR}/scripts/main.ts --help for full CLI options.

Preferences (EXTEND.md)

Check for user preferences (priority order):

test -f .wechat-article-downloader/EXTEND.md && echo "project"
test -f "$HOME/.wechat-article-downloader/EXTEND.md" && echo "user"
ResultAction
FoundRead, parse, apply settings
Not foundUse defaults

See references/config/preferences-schema.md for full schema.

Usage

Single Article

${BUN_X} ${SKILL_DIR}/scripts/main.ts "https://mp.weixin.qq.com/s/xxxx"

Custom Output Directory

${BUN_X} ${SKILL_DIR}/scripts/main.ts "https://mp.weixin.qq.com/s/xxxx" -o ./articles/

Search by Account Name (via Sogou)

${BUN_X} ${SKILL_DIR}/scripts/main.ts --search "公众号名称" --max 5
${BUN_X} ${SKILL_DIR}/scripts/main.ts --search "公众号名称" --list

Batch Download from URL List

${BUN_X} ${SKILL_DIR}/scripts/main.ts urls.txt -o ./backup/

Download from Own Account (API)

Requires WeChat Official Account API credentials (see Environment Variables):

${BUN_X} ${SKILL_DIR}/scripts/main.ts --account --list
${BUN_X} ${SKILL_DIR}/scripts/main.ts --account -o ./my-articles/
${BUN_X} ${SKILL_DIR}/scripts/main.ts --account --max 20

Download Modes

ModeTriggerBehavior
Single URLPass a mp.weixin.qq.com URLDownload one article via CDP
Batch filePass a .txt file pathDownload all URLs sequentially
Search--search "name"Find articles via Sogou, then download
Account--account flagList + download all via WeChat API
Wait--wait flagOpen Chrome, user logs in, press Enter to capture

Output Format

YAML frontmatter + Markdown body:

---
title: "Article Title"
author: "Author Name"
date: "2024-01-15"
source_url: "https://mp.weixin.qq.com/s/xxxx"
description: "Article digest..."
captured_at: "2024-01-15T12:00:00.000Z"
---

Environment Variables

VariableDescription
WECHAT_DL_CHROME_PATHCustom Chrome executable path
WECHAT_DL_CHROME_PROFILE_DIRCustom Chrome profile directory
WECHAT_APP_IDWeChat Official Account App ID (for --account mode)
WECHAT_APP_SECRETWeChat Official Account App Secret (for --account mode)

API credentials can also be set in .wechat-article-downloader/.env or ~/.wechat-article-downloader/.env.

Troubleshooting

IssueFix
Chrome not foundInstall Chrome or set WECHAT_DL_CHROME_PATH
TimeoutIncrease --timeout value
Login requiredUse --wait mode
API errorsCheck WECHAT_APP_ID and WECHAT_APP_SECRET
Images not loadingPage may need more scroll time; increase timeout
Sogou captchaTry again later or use direct article URL

What ships with it: 21 files

69.5 KB alongside SKILL.md, 11 of them executable

scripts/

Keep looking

Skills are one crate of 326,790. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.