# wechat-article-extractor

Pulls title, author, publish time and HTML body out of WeChat Official Account links. Useful when you need that content as structured data.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3900 installs · ★ 137
- Author: freestylefly
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/freestylefly/wechat-article-extractor-skill/tree/HEAD/SKILL.md
- Updated: 2026-02-19
- HTML: https://affpapa.org/en/nevibecode/skills/wechat-article-extractor

## What it does

The skill takes a `mp.weixin.qq.com` URL or an already fetched HTML page and returns one object with account and article fields. You get the account name, alias, avatar, description, plus the article title, summary, author, publish time, cover image and HTML content. Article type is detected from the page: post, video, image, voice, text or repost.

Under the hood it calls `scripts/extract.js` through `require`, and the call is async. Options control what comes back: `shouldReturnContent` (default `true`), `shouldReturnRawMeta`, `shouldFollowTransferLink`, `shouldExtractMpLinks`, `shouldExtractTags`, `shouldExtractRepostMeta`. It needs the npm packages `cheerio`, `dayjs`, `request-promise`, `qs` and `lodash.unescape`.

Failures come back as numbered codes: `1004` for rate limiting, `2002` for an expired link, `2005` when the author deleted the piece, `2006` when it is blocked, `2012` when the account is blocked. If you batch requests, `1004` is what you will hit, so keep the pace slow. Some fields can be null depending on the article type and page structure.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/wechat-article-extractor-skill --skill wechat-article-extractor -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/wechat-article-extractor/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/wechat-article-extractor/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/wechat-article-extractor-skill --skill wechat-article-extractor -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/wechat-article-extractor/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/wechat-article-extractor-skill --skill wechat-article-extractor -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/wechat-article-extractor/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install freestylefly/wechat-article-extractor-skill wechat-article-extractor
```

2. **Manually: put the files in place**
- File: `.github/skills/wechat-article-extractor/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/wechat-article-extractor-skill --skill wechat-article-extractor -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/freestylefly/wechat-article-extractor-skill
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/wechat-article-extractor/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add freestylefly/wechat-article-extractor-skill --skill wechat-article-extractor -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/freestylefly/wechat-article-extractor-skill/tree/HEAD/SKILL.md

## When to use it
- pull title and author from a WeChat article URL
- turn an article into a structured object for later processing
- grab the HTML body and cover image
- detect whether the item is a post, video, image or repost
- parse links from Sogou WeChat search results

## Example prompts
- parse this mp.weixin.qq.com link and show me the title, author and publish time
- extract the HTML content and cover image from this WeChat article
- get the account and article metadata from this URL

## Similar
- [baoyu-post-to-wechat](https://affpapa.org/en/nevibecode/skills/baoyu-post-to-wechat.md) — skill · 34400 installs
- [wechat-binding](https://affpapa.org/en/nevibecode/skills/wechat-binding.md) — skill · 2200 installs
- [baoyu-wechat-summary](https://affpapa.org/en/nevibecode/skills/baoyu-wechat-summary.md) — skill · 9800 installs
- [auth-wechat-miniprogram](https://affpapa.org/en/nevibecode/skills/auth-wechat-miniprogram.md) — skill · 2200 installs
- [cloudbase-document-database-in-wechat-miniprogram](https://affpapa.org/en/nevibecode/skills/cloudbase-document-database-in-wechat-miniprogram.md) — skill · 1500 installs
- [wechat-miniprogram-skill](https://affpapa.org/en/nevibecode/skills/wechat-miniprogram-skill.md) — skill · 1400 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
