Skip to content
Back to skills

Wechat To Md

ASecurity

Convert WeChat Official Account (微信公众号) articles to clean Markdown files with locally downloaded images.

  • 43 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added December 4, 2026
ai-agentspythonbash

Works with

  • cli
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 6 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add skillmds/SkillMD --skill wechat-to-md --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wechat To Md?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Wechat To Md
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/skillmds-wechat-to-md-skillmd/badge)](https://www.skillsdirectory.com/skills/skillmds-wechat-to-md-skillmd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: wechat-to-md
description: Convert WeChat Official Account (微信公众号) articles to clean Markdown files with locally downloaded images.
metadata:
  source: https://skillmd.com/skills/bzd6661/wechat-to-md
---

# WeChat Article to Markdown Converter

## What this tool does

Converts WeChat public account articles into clean Markdown files with:
- YAML frontmatter (title, author, date, source URL)
- Locally downloaded images
- Preserved code blocks with language detection
- Audio/video reference extraction
- Clean formatting (no WeChat UI noise)

## Prerequisites

- Python 3.10+
- Install dependencies: `pip install -r requirements.txt`
- Camoufox browser will be auto-downloaded on first run

## Usage

### CLI (single article)

```bash
python main.py "https://mp.weixin.qq.com/s/ARTICLE_ID"
```

### CLI (batch from file)

```bash
python main.py -f urls.txt -o ./output -v
```

### CLI Options

| Flag | Description |
|------|-------------|
| `-f FILE` | Text file with URLs (one per line) |
| `-o DIR` | Output directory (default: ./output) |
| `-c N` | Image download concurrency (default: 5) |
| `--no-images` | Skip image download, keep remote URLs |
| `--no-headless` | Show browser (for solving CAPTCHAs) |
| `--force` | Overwrite existing output |
| `--no-frontmatter` | Use blockquote metadata instead of YAML |
| `-v` | Verbose/debug logging |

### MCP Server

Run as an MCP server for AI tool integration:

```bash
python mcp_server.py
```

Exposes two tools:
- `convert_article(url, output_dir, download_images, concurrency, use_frontmatter)` — Convert a single article
- `batch_convert(urls, output_dir, download_images, concurrency)` — Convert multiple articles

### MCP Configuration (for claude_desktop_config.json or similar)

```json
{
  "mcpServers": {
    "wechat-to-md": {
      "command": "python",
      "args": ["mcp_server.py"],
      "cwd": "<path-to-this-project>"
    }
  }
}
```

## Output Structure

```
output/
  <article-title>/
    <article-title>.md    # Markdown file with YAML frontmatter
    images/
      img_001.png
      img_002.jpg
      ...
```

## Common Issues

- **CAPTCHA/verification page**: Run with `--no-headless` to manually solve the CAPTCHA in the browser window, then retry.
- **Empty content**: WeChat may rate-limit requests. Wait a few minutes and try again.
- **Image download failures**: Failed images keep their remote URLs in the markdown. Re-run with `--force` to retry.

## Limitations

- Only supports articles from `mp.weixin.qq.com`
- Requires a working internet connection and the ability to run a headless browser
- WeChat may block automated access; Camoufox helps evade detection but is not guaranteed

Files in this skill

  • .gitignore88 B
  • README.md7.8 KB
  • SKILL.md2.6 KB
  • main.py114 B
  • mcp_server.py140 B
  • requirements.txt53 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.