wechat-article-fetcher
AGENTS.md1 starsChanged 38 days agoMITView on GitHub
Instructions for coding agents (Claude Code, Cursor, Codex, etc.) that want to use this tool or work on this repo. Only uv is needed (curl -LsSf https://astral.sh/uv/install.sh | sh). No API keys or environment variables; defaults work as-is. Register the MCP server (Python 3.10+; the MCP SDK installs automatically): Cursor (~/.cursor/mcp.json or .cursor/mcp.json): MCP tools: fetch_wechat_article(url, format="markdown"|"text"|"both", max_chars=40000) and parse_wechat_html(html, url=None, format, max_chars). Install the skill (works even without the package):
- Pipes a download into a shell
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- llms.txtllms.txt
- wechat-article-fetcherSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Only uv is needed (curl -LsSf https://astral.sh/uv/install.sh | sh).
- Distinctive: line 51
Never add captcha solving or logged-in session reuse.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — wechat-article-fetcher
Instructions for coding agents (Claude Code, Cursor, Codex, etc.) that want to use this tool or work on this repo.
Use it in one step (no install, no config)
uvx --from git+https://github.com/mrlong0129/wechat-article-fetcher wxfetch <url> # Markdown to stdout
uvx --from git+https://github.com/mrlong0129/wechat-article-fetcher wxfetch <url> -f json # JSONOnly uv is needed (curl -LsSf https://astral.sh/uv/install.sh | sh). No API keys or environment variables; defaults work as-is.
Register the MCP server (Python 3.10+; the MCP SDK installs automatically):
claude mcp add wechat-article-fetcher -- uvx --from git+https://github.com/mrlong0129/wechat-article-fetcher wxfetch-mcpCursor (~/.cursor/mcp.json or .cursor/mcp.json):
{"mcpServers": {"wechat-article-fetcher": {"command": "uvx", "args": ["--from", "git+https://github.com/mrlong0129/wechat-article-fetcher", "wxfetch-mcp"]}}}MCP tools: fetch_wechat_article(url, format="markdown"|"text"|"both", max_chars=40000) and parse_wechat_html(html, url=None, format, max_chars).
Install the skill (works even without the package):
mkdir -p ~/.claude/skills/wechat-article-fetcher && curl -fsSL https://raw.githubusercontent.com/mrlong0129/wechat-article-fetcher/main/skill/SKILL.md -o ~/.claude/skills/wechat-article-fetcher/SKILL.mdHow to read results
- CLI exit codes:
0all ok,1at least one article failed (reason on stderr),2usage error. - MCP:
ok: true→title,account_nickname,author,publish_time,content_markdown,images,extraction_method.ok: false→errorisverification_required,article_unavailable(withreason),invalid_urlorfetch_error. - On
verification_required, do not retry in a loop or try to solve the captcha: tell the user, suggest opening the article in WeChat, or saving the page as HTML and usingwxfetch --from-html page.html/parse_wechat_html. - For general (non-WeChat) web pages use the sibling project agent-web-fetch.
Work on this repo
uv venv && . .venv/bin/activate && uv pip install -e ".[dev]"
pytest # offline, fast; must pass before committing
pytest -m live # optional live smoke tests- Code:
src/wxfetch/—fetcher.py(UA fallback, retries),pagecheck.py(verification / deleted detection),extractor.py(candidates),render.py(HTML → Markdown),cli.py,mcp_server.py. - Fixtures must not contain third-party article text or real account IDs/tokens; use placeholders like the existing
text_post_trimmed.html. - Never add captcha solving or logged-in session reuse.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

