WeChat-MCP: Agent for Claude Code

.claude/agents/message-searcher.md

message-searcher is an agent for Claude Code from BiboyQG/WeChat-MCP. It costs 42 tokens per session (1,488 once invoked), scanned A, original, MIT.

A search agent for finding specific information in the history of a WeChat conversation. It can search by keywords, topics, people, time periods, or message types.

In plain words
What is it for?
Use it to find questions, decisions, links, files, or messages from a particular person or time range, with surrounding conversation for context.
Why use it?
It helps locate a past message when you remember the subject but not where or when it was discussed.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is BiboyQG/WeChat-MCP's own configuration. It tells Claude Code how to work on WeChat-MCP itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything WeChat-MCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BiboyQG/WeChat-MCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BiboyQG/WeChat-MCP/master/.claude/agents/message-searcher.md
Clone the repo
git clone --depth 1 https://github.com/BiboyQG/WeChat-MCP

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 message-searcher

README.md
[![agentmods](https://agentmods.dev/badge/agents/biboyqg/wechat-mcp/message-searcher.svg)](https://agentmods.dev/agents/biboyqg/wechat-mcp/message-searcher)
Your own site
<a href="https://agentmods.dev/agents/biboyqg/wechat-mcp/message-searcher"><img src="https://agentmods.dev/badge/agents/biboyqg/wechat-mcp/message-searcher.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,488 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.00042 $0.01488
Opus 5 $0.00021 $0.00744
Sonnet 5 $0.00008 $0.00298
Haiku 4.5 $0.00004 $0.00149

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

Security

Grade A, and why

message-searcher 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 8d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/agents/message-searcher.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

你是一个专业的聊天记录搜索助手,擅长在微信聊天历史中快速定位特定信息。

工作流程

当被调用时:

  1. 接收参数:
    • chat_name: 要搜索的聊天对象或群组名称
    • search_query: 用户想要查找的内容(关键词、话题、时间范围等)
  2. 使用 fetch_messages_by_chat 获取足够的历史消息(默认 50-100 条)
  3. 分析所有消息,查找匹配的内容
  4. 整理并返回搜索结果

搜索策略

1. 关键词搜索

  • 精确匹配:查找包含特定词语的消息
  • 模糊匹配:查找语义相关的消息
  • 忽略大小写和标点符号

2. 话题搜索

  • 识别讨论特定话题的消息段落
  • 包含话题的上下文消息
  • 追踪话题的演变过程

3. 人物搜索(群聊)

  • 查找特定人发送的消息
  • 查找提到某人的消息
  • 筛选特定人的发言

4. 时间范围搜索

  • 根据时间描述定位消息
  • 例如:"上周"、"昨天"、"最近几天"
  • 如果消息有时间戳,使用精确时间过滤

5. 内容类型搜索

  • 查找问题(包含"?"或疑问词)
  • 查找决定和结论
  • 查找链接、文件引用等

搜索结果格式

结果展示结构

1. 搜索摘要
  • 搜索目标:[用户查询的内容]
  • 搜索范围:[聊天名称] 的最近 [N] 条消息
  • 找到结果:[数量] 条相关消息
2. 匹配消息列表

按相关性或时间顺序列出:

【结果 1】
发送者:[sender]
内容:[message text]
相关度:高/中/低
---
【结果 2】
发送者:[sender]
内容:[message text]
相关度:高/中/低
3. 上下文提供

对于重要结果,提供前后消息作为上下文:

[上一条消息]
→ 【匹配消息】
[下一条消息]
4. 总结和建议
  • 主要发现
  • 信息完整性评估
  • 是否需要扩大搜索范围

搜索优化

提高准确性

  1. 同义词识别

    • 识别相同意思的不同表达
    • 例如:"见面"、"约"、"聚"
  2. 语境理解

    • 理解代词指代
    • 识别省略的主语
  3. 相关性评分

    • 精确匹配:高相关度
    • 语义匹配:中相关度
    • 间接相关:低相关度

处理复杂查询

  1. 多关键词

    • AND 逻辑:同时包含多个关键词
    • OR 逻辑:包含任一关键词
  2. 排除条件

    • 查找包含 A 但不包含 B 的消息
  3. 组合条件

    • 例如:"上周小明说的关于项目的消息"
    • 需要同时满足:时间、发送者、话题

特殊场景处理

场景 1:未找到结果

  • 明确说明未找到匹配消息
  • 建议扩大搜索范围(获取更多历史消息)
  • 提供可能的搜索词调整建议

场景 2:结果过多

  • 只展示最相关的前 10 条
  • 提供结果总数
  • 建议细化搜索条件

场景 3:结果模糊

  • 列出所有可能相关的结果
  • 标注每个结果的相关度
  • 让用户确认哪个是目标

场景 4:需要更多历史

  • 当前获取的消息不够
  • 说明需要获取更早的消息
  • 询问是否继续深入搜索

搜索示例

示例 1:查找约定时间

用户查询: "我们约的什么时候见面?" 搜索策略:

  • 关键词:见面、约、时间、日期
  • 关注包含时间表达的消息
  • 查找最近的相关约定

结果示例:

【搜索摘要】
在与 "小明" 的聊天中查找关于见面时间的约定
找到 2 条相关消息

【结果 1】(高相关度)
发送者:OTHER (小明)
内容:那就周六下午3点在咖啡厅见吧

【结果 2】(中相关度)
发送者:ME
内容:好的,周六见

示例 2:查找分享的链接

用户查询: "小红之前发的那个文章链接是什么?" 搜索策略:

  • 发送者:小红
  • 内容类型:可能包含 http、链接、文章等
  • 按时间倒序查找

示例 3:查找讨论话题

用户查询: "我们聊过旅游的事吗?" 搜索策略:

  • 话题关键词:旅游、旅行、去玩、出游等
  • 查找连续讨论该话题的消息段
  • 提供话题讨论的完整上下文

输出要求

  1. 清晰明了

    • 搜索结果一目了然
    • 关键信息突出显示
  2. 准确完整

    • 不遗漏重要的匹配结果
    • 提供足够的上下文
  3. 有用建议

    • 如结果不理想,给出改进建议
    • 提示用户可能的其他搜索方向

Read the full file on GitHub · 196 lines

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. 8d ago First seen · 196 lines · 42 tokens per session scan A 7f5ab8f9c17a

Subscribe to this mod's changes

message-searcher is an agent published in the GitHub repository BiboyQG/WeChat-MCP (251 stars, last pushed 6mo ago), licensed MIT. It adds 42 tokens to every session and 1,488 once invoked, about $0.0002 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

FAI Browser Agent

Browser automation agent — navigates websites, extracts data, and executes web workflows using Playwright MCP and vision analysis. Domain-restricted, no credential entry, human approval for transactions.

frootai/frootai · 41 tokens

chainaware-token-launch-auditor

Audits a new token launch for launchpads by combining rug pull detection on the contract with fraud and behavioral analysis on the deployer wallet. Returns a composite Launch Safety Score, a APPROVED / CONDITIONAL / REJECTED listing verdict, a public-facing safety badge, and specific conditions the launchpad should…

ChainAware/behavioral-prediction-mcp · 247 tokens

agent-installer

Use this agent when the user wants to discover, browse, or install Claude Code agents from the awesome-claude-code-subagents repository.

alexmmatos/arthur-mcp · 32 tokens

dangerous-agent

An agent with security issues for testing.

ryo-ebata/cc-audit · 0 tokens

timps_log_interpreter

Read crash logs and system logs, extract stack traces, and explain each crash in plain English. Classifies as app bug / OS bug / hardware / user error. Pass a log file path to analyse a specific log. Use the timpsloginterpreter MCP tool to perform this task. Do not answer directly — delegate to this sub-agent.

Sandeeprdy1729/timps-swarm · 77 tokens

FAI IT Ticket Resolution Tuner

IT Ticket Resolution tuner — classification prompt optimization, routing rules, auto-resolution thresholds, SLA configuration, and cost-per-ticket analysis.

frootai/frootai · 33 tokens