wechat-article-to-md
抓取微信公众号文章并转换为 Markdown 文档。使用脚本自动获取文章标题、作者、正文内容,保留格式并保存为 .md 文件,支持下载图片到本地。适用场景:用户要求抓取/获取/下载/保存微信公众号文章内容为 Markdown 格式,或给出 mp.weixin.qq.com 链接需要提取内容。支持 Obsidian 模式(使用 -obsidian 参数)。
pinned to #bae29fbupdated last month
Ask your AI client: “install skills/wechat-article-to-md”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/wechat-article-to-mdmetahub onboarded this repo on the author's behalf.
If you own github.com/likemaoke/wechat-article-to-md on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
27
Last commit
last month
Latest release
published
- #anthropic
- #article-scraper
- #claude-ai
- #claude-code
- #claude-skill
- #knowledge-management
- #markdown
- #note-taking
- #obsidian
- #obsidian-plugin
- #python
- #scraper
- #weixin
- #weixin-mp
About this skill
Pulled from SKILL.md at publish time.
抓取微信公众号文章并将其转换为 Markdown 文档。
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.bae29fb· last month
Kind-specific
31Skill: SKILL.md present
found at SKILL.md · frontmatter source: SKILL.md
Skill: body content present
325 words · 755 chars · 6 sections · 2 code blocks
Skill: triggers declaredwarn
No `trigger` phrases in SKILL.md frontmatter
Add `trigger:` lines so Claude knows when to activate this skill — e.g. `when building MCP servers` or `for diagram creation`.
Skill: allowed-tools scope
no allowed-tools restriction (Claude may use anything)
Release history
1- releasecurrentbae29fbwarnlast month
Contents
微信公众号文章转 Markdown
Claude Code Skill - 抓取微信公众号文章并转换为 Markdown 文档,自动下载图片
一个专为 Claude Code 设计的技能,用于快速抓取微信公众号文章并将其转换为格式整洁的 Markdown 文档。支持自动下载图片、标记视频位置,完美适配 Obsidian 等笔记工具。
✨ 功能特性
- 📄 自动提取文章标题、作者、来源链接
- 🖼️ 自动下载文章中的所有图片到本地
- 🔄 完整转换为 Markdown 格式(标题、列表、代码块、引用等)
- 🎥 视频标记自动标记微信视频位置(提示到原文观看)
- 📁 灵活输出支持普通模式和 Obsidian 模式
- 🛠️ 文件名清理自动处理文件名中的非法字符
- 🤖 Claude Code 集成无缝集成 Claude Code 工作流
- 💎 Obsidian 深度适配专为 Obsidian 优化的图片引用格式
🚀 快速开始
安装依赖
pip install requests beautifulsoup4
使用方法
# 普通模式
python scripts/wechat_article_to_md.py https://mp.weixin.qq.com/s/xxxxxx
# Obsidian 模式(推荐)
python scripts/wechat_article_to_md.py https://mp.weixin.qq.com/s/xxxxxx . -obsidian
# 指定 Obsidian 的图片目录
python scripts/wechat_article_to_md.py https://mp.weixin.qq.com/s/xxxxxx . -obsidian -img-dir /path/to/obsidian/vault/attachments/img
💎 Obsidian 完美适配
为什么推荐 Obsidian 模式?
| 特性 | 普通模式 | Obsidian 模式 |
|---|---|---|
| 图片引用格式 |  | ![[filename.png]] |
| 图片目录 | images/ | attachments/img/ |
| 通用性 | 通用 Markdown | Obsidian 专用 |
| 便携性 | 图片路径相对固定 | 自动查找 vault 目录 |
Obsidian 使用场景
- 📚 将公众号文章收藏到知识库
- 🔍 支持 Obsidian 全文搜索和双向链接
- 📸 图片自动保存到 vault,离线可用
- 🔄 方便二次编辑和笔记整理
Obsidian 快速上手
- 创建一个 Obsidian vault
- 将脚本输出到 vault 目录
- 使用
-obsidian参数运行,图片自动保存到attachments/img/ - 在 Obsidian 中打开生成的 .md 文件,图片正常显示
📖 详细文档
查看 SKILL.md 了解完整使用说明。
🤖 在 Claude Code 中使用
将此技能添加到 Claude Code 后,即可在对话中使用:
请帮我抓取 https://mp.weixin.qq.com/s/xxxxxx 这篇文章并转换为 Markdown(Obsidian 模式)
⚠️ 注意事项
- 微信视频无法直接下载,脚本会在视频位置添加提示标记
- 图片下载可能受网络环境影响
- 部分微信文章可能有访问限制
📄 许可证
MIT License
🤝 贡献
欢迎提交 Issue 和 Pull Request!
🔗 相关链接
Reviews
No reviews yet. Be the first.
Related
Frontend Slides
Create beautiful slides on the web using Claude's frontend skills
Browser Use
🌐 Make websites accessible for AI agents. Automate tasks online with ease.
Guizang Ppt Skill
AI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
mh install skills/wechat-article-to-md