Skip to content
Back to search

wechat-article-to-markdown

Fetch WeChat Official Account (微信公众号) articles from mp.weixin.qq.com and convert to Markdown. 微信文章转 Markdown 工具。

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jackwener-wechat-article-to-markdown/badge.svg)](/listings/jackwener-wechat-article-to-markdown)

HTML

<a href="/listings/jackwener-wechat-article-to-markdown"><img src="/api/listings/jackwener-wechat-article-to-markdown/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

# Recommended: uv tool (fast, isolated)
uv tool install wechat-article-to-markdown

# Or: pipx
pipx install wechat-article-to-markdown

Or from source:

git clone git@github.com:jackwener/wechat-article-to-markdown.git
cd wechat-article-to-markdown
uv sync

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 64 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: wechat-article-to-markdown
  3. description: Fetch WeChat Official Account (微信公众号) articles from mp.weixin.qq.com and convert to Markdown. 微信文章转 Markdown 工具。
  4. author: jackwener
  5. version: "1.0.0"
  6. tags:
  7. - wechat
  8. - 微信
  9. - 微信文章
  10. - 公众号
  11. - mp.weixin.qq.com
  12. - markdown
  13. - article
  14. - converter
  15. - cli
  16. ---
  17. # WeChat Article to Markdown
  18. Fetch a WeChat Official Account article and convert it to a clean Markdown file.
  19. ## When to use
  20. Use this skill when you need to save WeChat articles as Markdown for:
  21. - Personal archive
  22. - AI summarization input
  23. - Knowledge base ingestion
  24. ## Prerequisites
  25. - Python 3.8+
  26. ```bash
  27. # Install
  28. uv tool install wechat-article-to-markdown
  29. # Or: pipx install wechat-article-to-markdown
  30. ```
  31. ## Usage
  32. ```bash
  33. wechat-article-to-markdown "<WECHAT_ARTICLE_URL>"
  34. ```
  35. Input URL format:
  36. - `https://mp.weixin.qq.com/s/...`
  37. Output files:
  38. - `<cwd>/output/<article-title>/<article-title>.md`
  39. - `<cwd>/output/<article-title>/images/*`
  40. ## Features
  41. 1. Anti-detection fetch with Camoufox
  42. 2. Metadata extraction (title, account name, publish time, source URL)
  43. 3. Image localization to local files
  44. 4. WeChat code-snippet extraction and fenced code block output
  45. 5. HTML to Markdown conversion via markdownify
  46. 6. Concurrent image downloading
  47. ## Limitations
  48. - Some code snippets are image/SVG rendered and cannot be extracted as source code
  49. - Public `mp.weixin.qq.com` URL is required
README.md · README · 176 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # wechat-article-to-markdown
  2. Fetch WeChat Official Account articles and convert them to clean Markdown.
  3. [English](#features) | [中文](#功能特性)
  4. ## Features
  5. - Anti-detection fetching with Camoufox
  6. - Extract article metadata (title, account name, publish time, source URL)
  7. - Convert WeChat article HTML to Markdown
  8. - Download article images to local `images/` and rewrite links
  9. - Handle WeChat `code-snippet` blocks with language fences
  10. ## Installation
  11. ```bash
  12. # Recommended: uv tool (fast, isolated)
  13. uv tool install wechat-article-to-markdown
  14. # Or: pipx
  15. pipx install wechat-article-to-markdown
  16. ```
  17. Or from source:
  18. ```bash
  19. git clone git@github.com:jackwener/wechat-article-to-markdown.git
  20. cd wechat-article-to-markdown
  21. uv sync
  22. ```
  23. ## Usage
  24. ```bash
  25. # Installed CLI
  26. wechat-article-to-markdown "https://mp.weixin.qq.com/s/xxxxxxxx"
  27. # Run in repo with uv
  28. uv run wechat-article-to-markdown "https://mp.weixin.qq.com/s/xxxxxxxx"
  29. # Backward-compatible local entry
  30. uv run main.py "https://mp.weixin.qq.com/s/xxxxxxxx"
  31. ```
  32. Output structure:
  33. ```text
  34. output/
  35. └── <article-title>/
  36. ├── <article-title>.md
  37. └── images/
  38. ├── img_001.png
  39. ├── img_002.png
  40. └── ...
  41. ```
  42. ## Testing
  43. ```bash
  44. # Unit tests (default CI path)
  45. uv run --with pytest pytest -q -m "not e2e"
  46. # Live E2E against real WeChat articles
  47. WECHAT_E2E_URLS="https://mp.weixin.qq.com/s/Y7dyRC7CJ09miHWU6LBzBA,https://mp.weixin.qq.com/s/xxxxxxxx" \
  48. uv run --with pytest pytest -q -m e2e -s
  49. ```
  50. `e2e` tests require network and browser runtime, so they run via manual GitHub Actions workflow `.github/workflows/e2e.yml`.
  51. ## Use as AI Agent Skill
  52. This project ships with [`SKILL.md`](./SKILL.md), so AI agents can discover and use this tool workflow.
  53. ### [Skills CLI](https://github.com/vercel-labs/skills) (Recommended)
  54. ```bash
  55. npx skills add jackwener/wechat-article-to-markdown
  56. ```
  57. | Flag | Description |
  58. | --- | --- |
  59. | `-g` | Install globally (user-level, shared across projects) |
  60. | `-a claude-code` | Target a specific agent |
  61. | `-y` | Non-interactive mode |
  62. ### Manual Install
  63. ```bash
  64. mkdir -p .agents/skills
  65. git clone git@github.com:jackwener/wechat-article-to-markdown.git \
  66. .agents/skills/wechat-article-to-markdown
  67. ```
  68. ```bash
  69. # Claude Code user-level skills directory (global)
  70. mkdir -p ~/.claude/skills/wechat-article-to-markdown
  71. curl -o ~/.claude/skills/wechat-article-to-markdown/SKILL.md \
  72. https://raw.githubusercontent.com/jackwener/wechat-article-to-markdown/main/SKILL.md
  73. ```
  74. After adding the file, restart Claude Code to reload skills.
  75. ### ~~OpenClaw / ClawHub~~ (Deprecated)
  76. > ⚠️ ClawHub install method is deprecated and no longer supported. Use [Skills CLI](#skills-cli-recommended) or Manual Install above.
  77. ## PyPI Publishing (GitHub Actions)
  78. Repository: `jackwener/wechat-article-to-markdown`
  79. Workflow: `.github/workflows/release.yml`
  80. Environment: `pypi`
  81. `release.yml` triggers on `v*` tags, runs unit tests + live e2e tests, then publishes to PyPI with trusted publishing (`id-token: write`).
  82. For release e2e targets, set repository variable `RELEASE_E2E_URLS` (comma-separated article URLs).
  83. If not set, workflow falls back to `https://mp.weixin.qq.com/s/Y7dyRC7CJ09miHWU6LBzBA`.
  84. ---
  85. ## 功能特性
  86. - 使用 Camoufox 进行反检测抓取
  87. - 提取标题、公众号名称、发布时间、原文链接
  88. - 将微信公众号文章 HTML 转换为 Markdown
  89. - 下载图片到本地 `images/` 并自动替换链接
  90. - 处理微信 `code-snippet` 代码块并保留语言标识
  91. ## 安装
  92. ```bash
  93. # 推荐:uv tool
  94. uv tool install wechat-article-to-markdown
  95. # 或者:pipx
  96. pipx install wechat-article-to-markdown
  97. ```
  98. ## 使用示例
  99. ```bash
  100. wechat-article-to-markdown "https://mp.weixin.qq.com/s/xxxxxxxx"
  101. ```
  102. ## 作为 AI Agent Skill 使用
  103. 项目自带 [`SKILL.md`](./SKILL.md),可供支持 `.agents/skills/` 约定的 Agent 自动发现。
  104. ### [Skills CLI](https://github.com/vercel-labs/skills)(推荐)
  105. ```bash
  106. npx skills add jackwener/wechat-article-to-markdown
  107. ```
  108. | 参数 | 说明 |
  109. | --- | --- |
  110. | `-g` | 全局安装(用户级别,跨项目共享) |
  111. | `-a claude-code` | 指定目标 Agent |
  112. | `-y` | 非交互模式 |
  113. ### 手动安装
  114. ```bash
  115. mkdir -p ~/.claude/skills/wechat-article-to-markdown
  116. curl -o ~/.claude/skills/wechat-article-to-markdown/SKILL.md \
  117. https://raw.githubusercontent.com/jackwener/wechat-article-to-markdown/main/SKILL.md
  118. ```
  119. ### ~~OpenClaw / ClawHub~~(已过时)
  120. > ⚠️ ClawHub 安装方式已过时,不再支持。请使用上方的 Skills CLI 或手动安装。
  121. ## License
  122. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.