A Hermes-Agent skill that scrapes a WeChat public-account article and produces a deep-rewritten, copy-pasteable HTML.
- Takes a
https://mp.weixin.qq.com/s/...URL - Scrapes title, author, body blocks (paragraphs, headings, images, blockquotes, lists)
- Downloads images to local with the WeChat referer header
- Hermes-Agent LLM rewrites the content (deep rewrite — change perspective, structure, examples, tone)
- Generates a new title
- Renders into a beautified HTML using inline CSS
- Outputs
index.htmlthat can be directly copy-pasted into the WeChat editor
cd /Users/shike/Desktop/code/mp-copy # this repo
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtTo make it a Hermes-Agent skill:
ln -s /Users/shike/Desktop/code/mp-copy ~/.hermes/skills/mp-rewriteAsk Hermes-Agent something like:
帮我改写这篇公众号文章:https://mp.weixin.qq.com/s/...
The skill is triggered. Output lands in your current working directory under ./output/<article_id>/index.html. Open the file:// link in a browser, select all, copy, paste into the WeChat editor.
# 1. Scrape
PYTHONPATH=. python3 scripts/scrape.py "https://mp.weixin.qq.com/s/..." --output ./output
# 2. Manually copy/edit original.json -> rewritten.json (or have Claude/Hermes do it)
# 3. Render
PYTHONPATH=. python3 scripts/generate_html.py \
./output/<id>/rewritten.json \
--template templates/article.htmlmp-rewrite/
├── SKILL.md
├── README.md
├── requirements.txt
├── scripts/
│ ├── scrape.py
│ ├── generate_html.py
│ └── similarity.py
├── templates/
│ └── article.html
└── tests/
├── unit/
├── integration/
└── e2e/
# Unit + integration (offline, fast)
PYTHONPATH=. pytest tests/unit tests/integration
# E2E Case A — real network (requires editing tests/e2e/fixtures.yaml with a real URL)
PYTHONPATH=. pytest tests/e2e -m network
# E2E Case B — manual run with similarity check
PYTHONPATH=. python tests/e2e/run_full_skill.py ./output/<id>- Only works with public, non-paywalled WeChat articles
- Does not bypass login walls or captchas
- Assumes Chinese-language input (no translation)
- Does not auto-publish to WeChat