一键导入
wechat-article-to-markdown
将微信公众号文章转换为整洁的 Markdown 文件,自动去除广告、赞赏、推广等无关内容,处理代码块格式,支持图片和视频处理。当用户提供微信公众号链接或要求保存微信文章时使用此技能。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
将微信公众号文章转换为整洁的 Markdown 文件,自动去除广告、赞赏、推广等无关内容,处理代码块格式,支持图片和视频处理。当用户提供微信公众号链接或要求保存微信文章时使用此技能。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | wechat-article-to-markdown |
| description | 将微信公众号文章转换为整洁的 Markdown 文件,自动去除广告、赞赏、推广等无关内容,处理代码块格式,支持图片和视频处理。当用户提供微信公众号链接或要求保存微信文章时使用此技能。 |
微信公众号文章网页包含大量无关内容(广告、赞赏、留言区、小程序推广等),直接复制粘贴会产生格式问题。此 Skill 提供一套完整的处理流程,将微信文章转换为干净、规范的 Markdown 文件。
mp.weixin.qq.com)必须同时获取两种格式(并行请求):
# 请求 1:HTML 格式(用于提取图片位置)
mcp__ScraplingServer__stealthy_fetch
- url: 微信文章链接
- extraction_type: html
- main_content_only: true
- wait: 2000
# 请求 2:Markdown 格式(用于提取文本内容)
mcp__ScraplingServer__stealthy_fetch
- url: 微信文章链接
- extraction_type: markdown
- main_content_only: true
- wait: 2000
关键:图片顺序必须按 HTML 中实际出现顺序,而非 imgIndex 数字
从 HTML 中提取图片信息:
# 提取所有正文图片(按出现顺序)
cat html_file | tr '>' '\n' | grep -E 'data-src.*mmbiz_(jpg|png)' | grep -v 'mmbiz_svg'
图片类型判断:
| 类型 | 处理方式 | 说明 |
|---|---|---|
mmbiz_jpg | 保留 | 文章正文图片 |
mmbiz_png | 保留 | 文章正文图片 |
sz_mmbiz_jpg | 保留 | 文章正文图片 |
sz_mmbiz_png | 保留 | 文章正文图片 |
mmbiz_svg | 丢弃 | 装饰性图标、分隔线 |
data:image/svg+xml | 丢弃 | SVG 占位符 |
图片位置判断:
根据 data-index 属性或图片在 HTML 中的出现顺序,将图片插入到 Markdown 对应位置:
data-index="2" → 第一张正文图片
data-index="3" → 第二张正文图片
...
注意:#imgIndex=N 不等于图片在文章中的实际位置!必须按 HTML 源码中的出现顺序排列。
必须移除的内容:
广告和推广
赞赏相关
互动元素
UI 元素
javascript:void(0);)![]())元数据冗余
标题处理:
# 文章主标题
## 二级标题
### 三级标题
代码块处理:
java, python, ```bash)图片格式:

表格处理: 保留原始表格格式,确保对齐。
在文件开头添加 YAML frontmatter:
---
title: 文章标题
author: 作者名称
source: 原始链接
date_saved: 保存日期
tags: [微信公众号, 其他标签]
---
文件命名规则:
YYYY-MM-DD-标题摘要.md2026-03-18-IM系统消息收发设计.md重要警告:微信图片有以下限制:
mmbiz.qpic.cn 链接可直接访问方案 A - 保留原始链接(推荐,简单)

方案 B - 下载到本地
./images/ 目录| 问题 | 原因 | 解决方案 |
|---|---|---|
| 图片不显示 | SVG 占位符 | 过滤掉 data:image/svg+xml 和 mmbiz_svg |
| 图片顺序错乱 | 按 imgIndex 排序 | 按 HTML 中实际出现顺序(data-index) |
| 图片缺失 | 只用了 markdown 提取 | 同时获取 HTML 和 markdown |
原因:imgIndex 数字不代表文章中的实际位置
解决方案:
错误做法:按 imgIndex=0,1,2... 排序
正确做法:按 HTML 中 <img> 标签出现的顺序排列
原因:只用 markdown 格式提取,部分图片链接丢失
解决方案:同时获取 HTML 和 markdown,从 HTML 中提取完整图片列表
原因:微信使用 SVG 作为占位符和装饰
解决方案:过滤掉所有 mmbiz_svg 类型和 data:image/svg+xml 的图片
原因:微信文章代码块格式不规范
解决方案:根据代码内容推断语言,添加标识符
---
title: {{文章标题}}
author: {{作者}}
source: {{原始链接}}
date_saved: {{保存日期}}
tags: [微信公众号, {{其他标签}}]
---
# {{文章标题}}
> 作者:{{作者名称}}
> 来源:{{公众号名称}}
> 链接:{{原始链接}}

{{正文内容,图片按正确位置插入}}
---
*本文由 [wechat-article-to-markdown] 自动转换*
*保存自微信公众号文章,仅供个人学习使用*
用户输入:
保存这篇文章 https://mp.weixin.qq.com/s/xxxxx
处理步骤:
pdf - 处理 PDF 文件docx - 处理 Word 文档excalidraw-diagram - 创建图表Professional API design skill covering RESTful APIs, GraphQL, API versioning, authentication, idempotency, and API documentation best practices. Use this skill when designing RESTful APIs, creating GraphQL schemas, implementing API versioning strategies, or need guidance on authentication, error handling, and API documentation.
Database design and optimization skill covering ER diagrams, normalization, indexing, sharding, query optimization, and database best practices. Use this skill when designing database schemas, optimizing queries, planning data architecture, or need guidance on database scaling and performance tuning.
Expert knowledge in software design patterns covering GoF patterns, architectural patterns, and modern design principles. Apply appropriate patterns to improve code maintainability, scalability, and extensibility. Use this skill when designing new software components, refactoring existing code, reviewing code for design quality, resolving complex design problems, or need guidance on applying SOLID principles and identifying code smells.
Enterprise Java development skill covering Spring ecosystem, microservices, design patterns, performance optimization, and Java best practices. Use this skill when building enterprise Java applications, working with Spring Boot, implementing microservices, or need guidance on Java architecture and performance tuning.
Professional React development skill covering Next.js, React Server Components, Tailwind CSS, and the React ecosystem. Use this skill when building modern React applications, implementing Next.js features, creating UI components with shadcn/ui, or working with complex state management.
Professional frontend development skill covering Svelte, SvelteKit, shadcn-svelte, and Bun ecosystem. Use this skill when building modern web applications, creating UI components, implementing state management, handling forms, or working with TypeScript-based frontend architectures. Ideal for projects requiring reactive frameworks, server-side rendering, or type-safe component development.