技能图谱SKILLSGROVE
技能图谱/效率工具/tjx666/wx-search-cli/wx-search

wx-search

安装

$npx skills add https://github.com/tjx666/wx-search-cli --skill wx-search
$git clone --depth 1 https://github.com/tjx666/wx-search-cli.git /tmp/wx-search-cli && mkdir -p ~/.claude/skills && cp -r /tmp/wx-search-cli/. ~/.claude/skills/wx-search
请帮我安装这个 Agent Skill:https://github.com/tjx666/wx-search-cli/tree/70b75b71384b4bcfce86be744b685f02f9440c16/ ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MITSearch and read WeChat official account (微信公众号) articles from the command line via Sogou WeChat search. Use this skill whenever the user wants to find, search, read, summarize, or analyze 公众号 articles or WeChat content — including requests like "搜一下公众号关于 X 的文章", "find WeChat articles about X", reading an mp.weixin.qq.com link, or researching Chinese-language coverage of a topic where WeChat official accounts are a primary source.
以下 SKILL.md 内容转载自 tjx666/wx-search-cli(提交 70b75b7),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2026 weixin-search-mcp contributors 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

wx-search: Search & Read WeChat Official Account Articles

wx-search-cli searches WeChat official account (公众号) articles through Sogou WeChat search and extracts article body text. Output is JSON (search) or plain text (content) on stdout; all failures exit 1 with the message on stderr.

Run it with npx wx-search-cli or bunx wx-search-cli (no install needed), or plain wx-search-cli if globally installed.

Typical workflow

  1. Search for articles by keyword:

    npx wx-search-cli search "人工智能"
    

    Output is a JSON array; each item has:

    • title — article title
    • link — Sogou redirect URL (use as --referer when fetching content)
    • real_url — resolved mp.weixin.qq.com URL (empty string "" if resolution failed, usually due to rate limiting)
    • publish_time — ISO 8601 timestamp
    • page — result page number, as a string
  2. Read an article's body text, passing real_url as the argument and link as --referer:

    npx wx-search-cli content "<real_url>" --referer "<link>"
    

Commands

Command Purpose
search <query> [--page <n>] One page of results (~10 items) as JSON. --page defaults to 1.
search-all <query> [--max-pages <n>] Auto-paginate (1s delay between pages), stop on empty page or --max-pages (default 10).
content <real_url> [--referer <url>] Print article body as plain text.
skill Print this skill document.

Important tips

  • Keep request volume low. Heavy usage triggers Sogou's captcha; the symptom is real_url coming back as "" or the search command erroring with an anti-spider message. When that happens, back off and retry later — don't hammer the endpoint.
  • Prefer search over search-all unless the user genuinely needs many results; fewer requests means less captcha risk.
  • Always pass --referer when fetching content if you have the link field — it noticeably improves the success rate against WeChat's anti-scraping checks.
  • Search queries in Chinese generally return better results than English for 公众号 content.
  • Nonzero exit code means failure; the reason is on stderr. Don't parse stdout on failure.
查看许可证全文(MIT)
MIT License

Copyright (c) 2026 weixin-search-mcp contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.