agentleFS
mrlong0129mrlong0129/wechat-article-fetcher/skill/SKILL.md

wechat-article-fetcher

Skill1 starsChanged 38 days agoMITView on GitHub

Read public WeChat Official Account articles (微信公众号文章, mp.weixin.qq.com links) as clean Markdown or JSON with title, account name, author and publish time. Use whenever the user shares an mp.weixin.qq.com link or asks to read, summarise or save a 公众号 article. Handles WeChat's "环境异常" verification page by switching to the WeChat in-app client, and reports deleted / violation / verification cases instead of bypassing them.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. wwwzhouhui/skills_collection★ 292same name
    2. wulaosiji/skills★ 28same name
    3. Liuzln/openclaw-skills★ 6same name
    4. AlienHub/wechat-article-skill★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

Files
SKILL.md

Reading WeChat Official Account articles

1. Use the tool if you can (zero install, zero config)

uvx --from git+https://github.com/mrlong0129/wechat-article-fetcher wxfetch <url>            # Markdown
uvx --from git+https://github.com/mrlong0129/wechat-article-fetcher wxfetch <url> -f json    # JSON

Or, if installed: wxfetch <url>. With the MCP server registered, call fetch_wechat_article(url); for a page saved as HTML, parse_wechat_html(html).

Exit code 1 means the article could not be read; stderr says why (需要验证 verification required, 文章不可用 article unavailable (deleted / violation / invalid_link …)). Tell the user that reason; do not retry in a loop.

2. The same method by hand (no tool available)

  1. Use the short link https://mp.weixin.qq.com/s/<id>. Long ?__biz=...&mid=... links are almost always challenged outside WeChat.
  2. Request it as WeChat's in-app browser would (the pages are built for it):
    User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.47(0x18002f2f) NetType/WIFI Language/zh_CN
    Accept-Language: zh-CN,zh;q=0.9
    Referer: https://mp.weixin.qq.com/
    A different network egress (your own machine instead of a cloud fetch service) often helps.
  3. Check what you got. If the page says 环境异常 / 完成验证后即可继续访问 / 去验证, it is the verification page: try the Android WeChat UA, then desktop Chrome, once each with a pause of 1–2 s. Never solve the captcha. 该内容已被发布者删除, 此内容因违规无法查看, 参数错误 mean the article is gone or the link is bad: stop and report.
  4. Extract, richest source first:
    • Long articles: the #js_content element (it is hidden with CSS until JS runs; read it anyway). Images use data-src, not src.
    • Short text posts (item_show_type 10): #js_content is empty; the full text is the JS string content_noencode inside window.cgiDataNew (decode \x0a, \x22, &amp;), and usually also in og:title.
    • Image posts (item_show_type 8): the images are in picture_page_info_list.
    • Metadata: account name nick_name, author author, publish time ori_create_time / ct (Unix seconds; show as China time, +08:00), account id user_name (gh_…).
  5. Images on mmbiz.qpic.cn load with no Referer or with https://mp.weixin.qq.com/; other Referers get a placeholder.

When you can't read it

Say so plainly and offer a way forward, e.g. "WeChat returned its 环境异常 verification page, so I couldn't read the article. If you open it in WeChat and paste the text (or save the page as HTML and send it), I'll work from that."

Responsible use

Public articles only (no login, paid or fans-only content). Keep at least ~2 s between articles, don't bulk-mirror accounts, respect authors' copyright (summarise and link; don't republish whole articles).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.