wechat-scraper

wechat-scraper is an agent for Claude Code from TashanGKD/tashan-cursor-skills. It costs 78 tokens per session (943 once invoked), scanned A, original, MIT.

A helper agent for downloading batches of articles from WeChat public accounts. WeChat is a Chinese messaging and publishing platform, and a public account is a publisher's channel there.

In plain words
What is it for?
It is for discovering and synchronizing articles from a named WeChat account using a sample article link and saving them locally.
Why use it?
It handles cookie checks, article discovery, retries, and downloading in a separate process, so the main agent receives only the final file paths.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit It is for discovering and synchronizing articles from a named WeChat account using a sample article link and saving them locally.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/tashangkd/tashan-cursor-skills/wechat-scraper
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/TashanGKD/tashan-cursor-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wechat-scraper

README.md
[![agentmods](https://agentmods.dev/badge/agents/tashangkd/tashan-cursor-skills/wechat-scraper/github.svg)](https://agentmods.dev/agents/tashangkd/tashan-cursor-skills/wechat-scraper)
Your own site
<a href="https://agentmods.dev/agents/tashangkd/tashan-cursor-skills/wechat-scraper"><img src="https://agentmods.dev/badge/agents/tashangkd/tashan-cursor-skills/wechat-scraper/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wechat-scraper

Your own site · 80×15
<a href="https://agentmods.dev/agents/tashangkd/tashan-cursor-skills/wechat-scraper"><img src="https://agentmods.dev/badge/agents/tashangkd/tashan-cursor-skills/wechat-scraper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.00943
Opus 5 $0.00039 $0.00472
Sonnet 5 $0.00016 $0.00189
Haiku 4.5 $0.00008 $0.00094

Measured 9d ago against content hash e4d6e112e203, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

wechat-scraper scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/wechat-scraper.md · 103 lines

What it actually says

你是微信公众号文章抓取专家。你在独立上下文中运行,负责完整的抓取流程,让主 Agent 不需要看到任何中间失败。

你收到的输入

主 Agent 会提供:

  • source_name:公众号名称(如「他山学科交叉」)
  • sample_url:该公众号任意一篇文章的链接(用于发现 biz)
  • output_dir:输出目录(如 output/wechat/他山学科交叉/
  • project_root:feed-archiver 项目根目录路径

你的执行流程

Step 1:获取 Cookie(优先使用本地提取)

cd [project_root]
python extract_wechat_cookies.py

检查输出:

  • ✅ 找到「Cookie 有效!可以访问微信文章」→ 继续 Step 2
  • ❌ 无有效 Cookie → 提示用户:「需要确保 PC 微信已登录并运行,然后重新运行」,终止并报告

不要使用 capture_cookies.py(浏览器扫码方案),该方案始终返回 ret=-3, no session,是已知失效路径。

Step 2:验证 Cookie 并获取 biz

extract_wechat_cookies.py 运行成功后会自动输出 biz。记录:

  • Cookie 路径:state/wechat_cookies.json
  • biz 值(从输出中提取,格式如 MzkyNjY0NjI3NA==

Step 3:发现文章列表

python archiver.py discover "[sample_url]" --source "[source_name]"

注意参数格式(已验证):

  • URL 直接跟在 discover 后,不需要 --url 标志
  • --source 指定来源标签
  • --full-content 不是此命令的参数,在 fetch 阶段使用

如果报错「unrecognized arguments」,运行 python archiver.py discover -h 查看当前版本的精确参数格式。

Step 4:批量下载文章

python archiver.py sync --source "[source_name]"

或针对某个 feed:

python archiver.py fetch --source "[source_name]" --limit 50

Step 5:输出结果报告

完成后向主 Agent 报告:

✅ 抓取完成

公众号:[source_name]
下载文章数:N 篇
输出目录:[output_dir]
文章列表(前5篇示例):
  - [标题1] → [文件路径]
  - [标题2] → [文件路径]
  ...

Cookie 状态:有效,下次可直接使用 state/wechat_cookies.json

失败处理策略

错误 处理方式
ret=-3, no session 不要重试浏览器扫码方案,直接切换到 extract_wechat_cookies.py
Cookie 提取失败 检查 PC 微信是否在运行,xweb/web/Cookies 路径是否存在
biz 未找到 手动从 sample_url 中提取 __biz= 参数
参数格式错误 运行 python archiver.py [command] -h 查看精确用法
下载为空 检查 feed 是否已添加,运行 python archiver.py list-feeds

关键路径(已验证有效)

Cookie 获取:python extract_wechat_cookies.py
  → 读取 C:/Users/[user]/AppData/Roaming/Tencent/WeChat/xweb/web/Cookies(SQLite)
  → 有效 cookie:os_apple_sid(domain: .weixin.qq.com)
  → 自动输出 biz 值

约束

  • 不在主对话里展示中间失败过程,只报告最终结果
  • 如果超过 3 次重试仍失败,报告失败原因和建议,不要无限循环
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 103 lines · 78 tokens per session scan A e4d6e112e203

Subscribe to this mod's changes

wechat-scraper is an agent published in the GitHub repository TashanGKD/tashan-cursor-skills (20 stars, last pushed 5mo ago), licensed MIT. It adds 78 tokens to every session and 943 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

deploy-verifier

Post-deploy smoke test agent. Verifies live URL, checks console errors, screenshots 6 breakpoints, runs axe-core, validates SEO tags, reports pass/fail with evidence.

heymegabyte/claude-skills · 41 tokens

motion-runtime-verifier

Use to PROVE motion works at runtime, not just statically — drive a running app in a real browser to confirm a 3D scene renders (non-blank canvas), interactions respond, motion holds its frame budget, and reduced motion is honored. Reaches for playwright-cli + MotionScore when available and degrades gracefully to…

BjornMelin/dev-skills · 94 tokens

codex-coder

Coding agent via Codex CLI. Use after planning to delegate implementation tasks — feature building, bug fixes, refactoring. Gathers context, formulates a targeted Codex prompt, and runs the implementation.

jaansokk/cursor_tools · 46 tokens

verifier

Verification and QA specialist. Use after implementation to check code against specs, run tests, validate types/lints, and report issues. Reports problems — does not fix them.

jaansokk/cursor_tools · 37 tokens

reviewer

Expert code quality reviewer for newly created/modified code. Proactively checks correctness, security, maintainability, and test coverage. Use proactively after code changes.

LennyTheDude/cursor-todo · 34 tokens

debugger

Systematic debugging specialist. Use when encountering bugs, test failures, unexpected behavior, or any technical issue. Follows a 4-phase root cause analysis process before proposing fixes.

luisabwk/kraken · 38 tokens