Agent skill

Wechat Article Fetch

by cat-xierluo in cat-xierluo/legal-skills

抓取微信公众号文章(mp.weixin.qq.com)到本地。当用户发来公众号链接要求"抓取""保存""存下来""归档""留痕""转成 Markdown"时使用。默认双产出:Markdown 整理版(供检索引用)+ HTML 原件保真归档(离线双击可读,供回溯核对)。默认 HTTP 直抓零依赖,失败自动切浏览器兜底。

MITAuto-check passedProductivity & Automation

Install Wechat Article Fetch

skills CLI
$ npx skills add cat-xierluo/legal-skills --skill wechat-article-fetch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cat-xierluo/legal-skills wechat-article-fetch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/wechat-article-fetch .claude/skills/wechat-article-fetch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wechat-article-fetch
GitHub stars
720
Token cost
~793 tokens
SKILL.md length
115 words
Files
6 (incl. scripts)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

抓取微信公众号文章(mp.weixin.qq.com)到本地。当用户发来公众号链接要求"抓取""保存""存下来""归档""留痕""转成 Markdown"时使用。默认双产出:Markdown 整理版(供检索引用)+ HTML 原件保真归档(离线双击可读,供回溯核对)。默认 HTTP 直抓零依赖,失败自动切浏览器兜底。

  • Tasks that involve Messaging and chat bots
  • SKILL.md covers 概述, 使用方法, 抓取后检查(必做,不要跳过) and 陷阱与要点, plus 2 more sections
  • Runs JavaScript scripts from its folder; calls node and npx; reaches mp.weixin.qq.com
  • Tasks that involve Markdown

What it does

Wechat Article Fetch is an agent skill from cat-xierluo/legal-skills. 抓取微信公众号文章(mp.weixin.qq.com)到本地。当用户发来公众号链接要求"抓取""保存""存下来""归档""留痕""转成 Markdown"时使用。默认双产出:Markdown 整理版(供检索引用)+ HTML 原件保真归档(离线双击可读,供回溯核对)。默认 HTTP 直抓零依赖,失败自动切浏览器兜底。

Its SKILL.md is about 790 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `CHANGELOG.md`, `package-lock.json` and `package.json`).

It sits in Productivity & Automation, covering Messaging and chat bots and Markdown. It works with WeChat and Playwright. The licence is MIT.

When your agent uses it

  • Tasks that involve Messaging and chat bots
  • Tasks that involve Markdown

Example prompts

  • “转成 Markdown”
  • “/wechat-article-fetch”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit db2c58c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • mp.weixin.qq.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wechat Article Fetch loads about 793 tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 115 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~793

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cat-xierluo/legal-skills at commit db2c58c, republished under its MIT licence (© cat-xierluo). 115 words, ~793 tokens.

Download SKILL.mdSave it as .claude/skills/wechat-article-fetch/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
wechat-article-fetch
description
抓取微信公众号文章(mp.weixin.qq.com)到本地。当用户发来公众号链接要求"抓取""保存""存下来""归档""留痕""转成 Markdown"时使用。默认双产出:Markdown 整理版(供检索引用)+ HTML 原件保真归档(离线双击可读,供回溯核对)。默认 HTTP 直抓零依赖,失败自动切浏览器兜底。
homepage
https://github.com/cat-xierluo/legal-skills
author
杨卫薪律师(微信ywxlaw)
version
1.4.0
license
Complete terms in LICENSE.txt

微信公众号文章抓取工具

概述

抓取微信公众号文章到本地,默认一次产出两份:

产物用途特点
Markdown 整理版检索、引用、下游加工纯文本段落 + 图片本地化,自动过滤小装饰图
HTML 原件保真留痕、回溯核对完整页面 + 全部图片本地化(不过滤),离线双击可读,原外链保留在 data-src 备查

为什么两份都要:公众号分享链接常带 tempkey 临时凭证,过期后打不开;Markdown 整理会丢排版和配图,日后无法回溯核对原文。原件保真,整理版好用,两者互补不互替。

抓取引擎:

  • HTTP 直抓(默认主路线):微信文章是服务端渲染,正文与图片地址都在初始 HTML 里,直接请求即可。零依赖、速度快。
  • Playwright 浏览器兜底(--engine auto 自动切换):HTTP 路线失败或页面需要 JS 渲染时启用。

使用方法

bash
# 默认:双产出,保存到 skill 内 archive/<时间戳>_<标题>/
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx"

# 指定输出根目录(文章产物归入其下子目录)
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" "./articles/"

# 兼容旧用法:直接指定 .md 文件路径(其余产物同目录平铺)
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" "./articles/my-article.md"

# 只要 Markdown 整理版 / 只要 HTML 原件
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" --mode markdown
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" --mode archive

# 强制走浏览器(或只走 HTTP 不装 Playwright)
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" --engine playwright
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" --engine http

完整参数运行 node scripts/fetch.js --help 查看。

产物结构
archive/<YYYYMMDD_HHMMSS>_<文章标题>/
├── <文章标题>.md            # 整理版(头部注明原文链接与 HTML 原件位置)
├── <文章标题>.html          # 原件(src 已本地化,离线可读)
├── <文章标题>_assets/       # 整理版图片(智能过滤小装饰图)
└── <文章标题>_html_assets/  # 原件图片(全量保真,含小图标)
编程接口
javascript
import { fetchWechatArticle } from './scripts/fetch.js';

const report = await fetchWechatArticle("https://mp.weixin.qq.com/s/xxxxx", {
  engine: 'auto',        // 'auto' | 'http' | 'playwright'
  mode: 'both',          // 'both' | 'markdown' | 'archive'
  outputPath: null,      // 输出路径(可选)
  retries: 3             // Playwright 路线重试次数
});
// report: { title, url, engine, md, archive: { htmlPath, images, missing, remoteLeft, failed } }

抓取后检查(必做,不要跳过)

看脚本输出:

  • HTML 原件行首为 [OK ] 即归档完整;[警告] 时查看"缺失本地图"与"残留外链"两项
  • 残留外链只剩微信官方空白占位 pic_blank.gif 属正常,可忽略
  • Markdown 的图片统计里"失败"应为 0,过滤数是装饰图属正常
  • 页面报"该内容已被发布者删除""环境异常"等 → 链接失效,脚本会自动切换引擎重试;两条引擎都失败时不要再盲试链接

陷阱与要点

坑处理
tempkey 链接会过期收到就立刻抓,不要等"有空再存"
图片真地址在 data-src 不在 srcsrc 多为 base64 占位;脚本已处理,手工排查时注意
URL 属性里是 &amp; 不是 &解码后才能下载,否则 403;脚本已处理
图片域名不止 mmbiz.qpic.cn还有 mmecoa.qpic.cn 等,按 qpic.cn 后缀识别,别写死子域
wx_fmt 参数定扩展名微信图 URL 无 .jpg 后缀,靠 ?wx_fmt=jpeg 推断,PNG 不会存成 jpg 名
svg 小图标看着像 0KB原件目录里的几百字节装饰图标不是下载失败,别删(原件全量保真)
"环境异常"页引擎自动切换重试;仍失败说明链接失效或需验证

下游加工建议

抓取完成后,如内容为法律法规、裁判文书等结构化法律文本,可在汇报时提示用户:如需进一步格式化整理,可指定相应的格式化技能(若环境中有)继续处理。是否调用、调用哪个技能由用户或上层流程决定——本技能不自动调用、不绑定任何下游技能。

注意事项

⚠️ 仅用于个人学习和研究,请遵守网站服务条款 ⚠️ 频繁抓取可能被限流,建议控制请求频率 ⚠️ 抓取内容版权归原作者所有 ⚠️ Playwright 兜底路线首次使用会自动安装 chromium(npx playwright install chromium);HTTP 直抓路线零依赖

© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts) in skills/wechat-article-fetch of cat-xierluo/legal-skills.

  • SKILL.md
  • CHANGELOG.md
  • LICENSE.txt
  • package-lock.json
  • package.json
  • scripts/fetch.js

Open the folder on GitHubat commit db2c58c

Compare with similar skills

Wechat Article Fetch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wechat Article Fetch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wechat Article Fetch this skillcat-xierluo/legal-skills720—~793Automated safety check: PassMIT
Wechat Article Pipelinedavinci-seven/wechat-article-pipeline158—~1.1kAutomated safety check: PassMIT
Qiaomu Epub Book Generatorjoeseesun/qiaomu-epub-book-generator134—~1.1kAutomated safety check: PassNone
Web To Markdownrookie-ricardo/erduo-skills935—~894Automated safety check: PassMIT
Wechat Article Formatterhuangserva/servasyy_skills168—~688Automated safety check: NotesNone
Wechat Md PublisherLeoYeAI/openclaw-master-skills2.2k—~3kAutomated safety check: PassMIT

Similar skills

  • Wechat Article Pipeline

    davinci-seven/wechat-article-pipeline

    把定稿Markdown和本地配图生成公众号兼容内联HTML、图片内嵌稳定版、复制预览、390px手机长截图及完整性和隐私报告。适用于公众号文章定稿后的排版、检查和交付;不负责改稿,也不会在未经确认时创建公众号草稿。

    158 GitHub stars~1.1k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Qiaomu Epub Book Generator

    joeseesun/qiaomu-epub-book-generator

    Generate EPUB ebooks from Markdown files with SVG→PNG conversion, remote/local image embedding, compressed illustrations, and WeChat Reading compatibility.

    134 GitHub stars~1.1k tokensUpdated 6 mo ago
    Documents & OfficeAuto-check passed
  • Web To Markdown

    rookie-ricardo/erduo-skills

    Convert a web URL into cleaned Markdown with deterministic routing.

    935 GitHub stars~894 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Wechat Article Formatter

    huangserva/servasyy_skills

    将 Markdown 文章转换为微信公众号 HTML 格式,支持自动插入配图、微信样式优化. An agent skill from huangserva/servasyy_skills.

    168 GitHub stars~688 tokensUpdated 8 days ago
    Productivity & AutomationAuto-check: notes
  • Wechat Md Publisher

    LeoYeAI/openclaw-master-skills

    发布 Markdown 文章到微信公众号,支持草稿管理、多主题、智能图片处理、自动封面图。推荐与 news-to-markdown-skill 配合使用实现一键转载。

    2.2k GitHub stars~3k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Wechat Publisher

    NeverSight/learn-skills.dev

    一键发布 Markdown 到微信公众号草稿箱。基于 wenyan-cli,支持多主题、代码高亮、图片自动上传. An agent skill from NeverSight/learn-skills.dev.

    217 GitHub starsUsed in 1 repo~1.2k tokens
    Productivity & AutomationAuto-check passed

More from cat-xierluo/legal-skills

All 62 skills in this repo
  • Elements-Style Complaint Generator

    cat-xierluo/legal-skills

    Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.

    720 GitHub stars~2.5k tokensUpdated today
    Auto-check: notes
  • Lecture Performance Review

    cat-xierluo/legal-skills

    Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.

    720 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • De-AI Polish for Chinese Articles

    cat-xierluo/legal-skills

    Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.

    720 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • GitHub Star Manager

    cat-xierluo/legal-skills

    Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.

    720 GitHub stars~2k tokensUpdated today
    Auto-check: notes
  • Legal Harness Initializer

    cat-xierluo/legal-skills

    Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.

    720 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Moot Court Simulation Builder

    cat-xierluo/legal-skills

    Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.

    720 GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Questions about Wechat Article Fetch

What does Wechat Article Fetch do?

抓取微信公众号文章(mp.weixin.qq.com)到本地。当用户发来公众号链接要求"抓取""保存""存下来""归档""留痕""转成 Markdown"时使用。默认双产出:Markdown 整理版(供检索引用)+ HTML 原件保真归档(离线双击可读,供回溯核对)。默认 HTTP 直抓零依赖,失败自动切浏览器兜底。. Wechat Article Fetch is an agent skill from cat-xierluo/legal-skills.

When should I use Wechat Article Fetch?

Wechat Article Fetch fits situations like: tasks that involve Messaging and chat bots; tasks that involve Markdown.

How do I install Wechat Article Fetch in Claude Code?

Run `npx skills add cat-xierluo/legal-skills --skill wechat-article-fetch -a claude-code`. Or copy the skill folder (skills/wechat-article-fetch in cat-xierluo/legal-skills) into .claude/skills/wechat-article-fetch in your project. Claude Code loads it when a task matches its description.

How do I install Wechat Article Fetch in Codex?

Run `npx skills add cat-xierluo/legal-skills --skill wechat-article-fetch -a codex`. Or copy the skill folder (skills/wechat-article-fetch in cat-xierluo/legal-skills) into .agents/skills/wechat-article-fetch in your project. Codex loads it when a task matches its description.

Can I use Wechat Article Fetch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill wechat-article-fetch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wechat-article-fetch, .gemini/skills/wechat-article-fetch, .github/skills/wechat-article-fetch and .opencode/skills/wechat-article-fetch in your project.

What does Wechat Article Fetch need to run?

Going by SKILL.md and its folder, Wechat Article Fetch needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node and npx). Our summary lists: Node.js.

Does Wechat Article Fetch access the network?

SKILL.md names 1 domain. In commands or code: mp.weixin.qq.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Wechat Article Fetch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Wechat Article Fetch use?

Wechat Article Fetch is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wechat Article Fetch use?

About 793 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wechat Article Fetch?

Skills that share tags, products or a category with Wechat Article Fetch: Wechat Article Pipeline (davinci-seven/wechat-article-pipeline, 158 stars), Qiaomu Epub Book Generator (joeseesun/qiaomu-epub-book-generator, 134 stars), Web To Markdown (rookie-ricardo/erduo-skills, 935 stars) and Wechat Article Formatter (huangserva/servasyy_skills, 168 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wechat Article Fetch?

cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 720 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 10, 2026.

Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.