TopRank Skills

Home / Claw Skills / Git / GitHub / WeChat-article-reader
Official OpenClaw rules 36%

WeChat-article-reader

将微信公众号文章导出为 Markdown 格式。当用户提供微信公众号链接 (mp.weixin.qq.com) 或要求下载/导出/保存微信文章时触发。默认保存到工作空间的 source 目录。

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 WeChat-article-reader 技能。 若已安装,则直接安装 WeChat-article-reader 技能。

Overview

Skill Key
8421bit/wechat-article-reader
Author
8421bit
Source Repo
openclaw/skills
Version
-
Source Path
skills/8421bit/wechat-article-reader
Latest Commit SHA
01e35431f3d4ecc63e8100f6d703891badcd43df

Extracted Content

SKILL.md excerpt

# 微信公众号文章导出技能 (WeChat-Article-Reader)

## 触发条件

当以下情况时触发此技能:

- 用户提供微信公众号文章链接 (mp.weixin.qq.com)
- 用户要求"下载"、"导出"或"保存"微信文章
- 用户要求将微信文章转换为 Markdown
- 用户提到"公众号文章"、"微信文章"、"下载微信"、"导出公众号"

**触发示例:**
- "下载这篇文章 https://mp.weixin.qq.com/s/xxx"
- "把这篇公众号文章导出为 markdown"
- "保存微信文章到本地"
- "帮我保存这篇微信文章"

## 工作原理

此技能使用 Python 脚本执行以下操作:
1. 获取微信文章 HTML 页面
2. 从 Open Graph 元标签提取元数据(标题、作者、发布时间)
3. 从 `#js_content` div 提取正文内容
4. 使用 markdownify 将 HTML 转换为 Markdown
5. 保存为带 YAML Front Matter 的 Markdown 文件

## 脚本目录

**基础目录**:`~/.npm-global/lib/node_modules/openclaw/skills/WeChat-article-reader`

**脚本位置**:`scripts/export.py`

## 安装设置

### 首次安装

1. **检查 Python 依赖**:
```bash
python3 -c "import requests, bs4, markdownify" 2>/dev/null || echo "需要安装依赖"
```

2. **如需安装依赖**:
```bash
pip3 install requests beautifulsoup4 lxml markdownify
```

### 无需配置

此技能开箱即用,无需 API Key 或额外配置。使用带浏览器头部的 HTTP 请求来获取微信文章。

## 执行步骤

当此技能被触发时,按以下步骤执行:

### 步骤 1:提取 URL

从用户请求中识别微信文章 URL。有效 URL 以以下开头:
- `https://mp.weixin.qq.com/s/`
- `https://mp.weixin.qq.com/...`

### 步骤 2:确定输出目录

默认输出目录:`~/.openclaw/workspace-qiming/source`

用户可以指定自定义输出目录。

### 步骤 3:运行导出脚本

```bash
# 如需要则创建输出目录
mkdir -p "$OUTPUT_DIR"

# 运行导出脚本
python3 ~/.npm-global/lib/node_modules/openclaw/skills/WeChat-article-reader/scripts/export.py "$URL" "$OUTPUT_DIR"
```

### 步骤 4:报告结果

告知用户:
- 成功或失败状态
- 输出文件路径
- 文章标题和元数据
- 任何错误或警告

## 命令示例

```bash
# 基本导出
python3 ~/.npm-global/lib/node_modules/openclaw/skills/WeChat-article-reader/scripts/export.py "https://mp.weixin.qq.com/s/xxx" ~/.openclaw/workspace-qiming/source

# 指定自定义输出目录
python...

README excerpt

# 微信公众号文章导出技能

> 一个可以将微信公众号文章导出为 Markdown 格式的 SKILL 技能,支持 Claude Code / OpenClaw

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)

## 功能特性

- 一键导出微信公众号文章为 Markdown
- 自动提取元数据(标题、作者、发布时间)
- 输出带 YAML Front Matter 的规范格式
- 无需配置 API Key,开箱即用
- 支持中英文双语

## 安装

### 作为 Claude Code / OpenClaw 技能使用

1. 将此仓库克隆到你的 skills 目录:

```bash
# Claude Code
git clone https://github.com/启明/WeChat-article-reader.git ~/.claude/skills/WeChat-article-reader

# OpenClaw
git clone https://github.com/启明/WeChat-article-reader.git ~/.openclaw/workspace/skills/WeChat-article-reader
```

2. 安装 Python 依赖:

```bash
pip3 install -r requirements.txt
```

### 独立命令行使用

```bash
# 安装依赖
pip3 install -r requirements.txt

# 导出文章
python3 scripts/export.py "https://mp.weixin.qq.com/s/xxx" ./output
```

## 使用方法

### 在 Claude Code 中使用

直接提供微信公众号文章链接:

```
下载这篇文章:https://mp.weixin.qq.com/s/xxx
```

技能会自动:
1. 抓取文章内容
2. 提取元数据和正文
3. 保存为 Markdown 文件
4. 报告输出位置

### 命令行使用

```bash
python3 scripts/export.py <文章URL> [输出目录]
```

## 输出格式

导出的 Markdown 文件包含完整的 YAML Front Matter:

```yaml
---
title: 文章标题
author: 作者名称
publish_time: 发布时间
source_url: 原文链接
exported_at: 导出时间戳
description: 文章描述
---

# 文章标题

> 原文链接: URL

**作者**: XXX
**发布时间**: XXX

-----

文章正文内容...
```

## 文件命名

生成的文件遵循格式:`YYYYMMDD_HHMMSS_文章标题.md`

特殊字符会被自动清理以确保文件系统兼容性。

## 使用限制

- 部分文章需要微信登录才能查看
- 微信有反爬虫机制,频繁请求可能被限制
- 仅导出文本内容,不下载图片
- 复杂排版可能无法完全还原

## 技术实现

- **HTTP 请求**:`requests` - 获取文章页面
- **HTML 解析**:`BeautifulSoup` + `lxml` -...

Related Claw Skills

heyixuan2

bambu-studio-ai

★ 41

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).

capt-marbles

geo-optimization

★ 1

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.

carlulsoe

parakeet-stt

★ 0

Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, or processing voice recordings locally without cloud APIs.

carlzhao007

feishu-process-feedback

★ 0

飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化。 使用场景:飞书自动化工作流、任务进度追踪、批量任务处理、需要实时反馈的场景。

cartoonitunes

bottyfans

★ 0

BottyFans agent skill for autonomous creator monetization. Lets AI agents register, build a profile, publish posts (public, subscriber-only, or pay-to-unlock), upload media, accept USDC subscriptions and tips on Base, send and receive DMs, track earnings, and appear on the creator leaderboard. Use this skill when an agent needs to monetize content, interact with fans, manage a creator profile, handle payments in USDC, or operate as an autonomous creator on the BottyFans platform.

camopel

arxivkb

★ 0

Local arXiv paper manager with semantic search. Crawls arXiv categories, downloads PDFs, chunks content, and indexes with FAISS + Ollama embeddings. No cloud API keys required — everything runs locally.