wechat-mcp-friend-automation: Agent for Claude Code

.claude/agents/message-searcher.md

message-searcher is an agent for Claude Code from zbvxbb622-code/wechat-mcp-friend-automation. It costs 42 tokens per session (1,488 once invoked), scanned A, a copy of message-searcher, MIT.

A search helper for finding messages in a named WeChat chat or group using words, topics, people, dates, or message types.

In plain words
What is it for?
Use it to find past questions, decisions, links, files, or discussions in WeChat, including messages from a particular person or time period.
Why use it?
It removes the need to scroll through chat history when you only remember part of a conversation. It can also include nearby messages to show the surrounding context.

Agent for Claude Code

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

This is zbvxbb622-code/wechat-mcp-friend-automation's own configuration. It tells Claude Code how to work on wechat-mcp-friend-automation 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-friend-automation configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zbvxbb622-code/wechat-mcp-friend-automation. 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/zbvxbb622-code/wechat-mcp-friend-automation/main/.claude/agents/message-searcher.md
Clone the repo
git clone --depth 1 https://github.com/zbvxbb622-code/wechat-mcp-friend-automation

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/zbvxbb622-code/wechat-mcp-friend-automation/message-searcher/github.svg)](https://agentmods.dev/agents/zbvxbb622-code/wechat-mcp-friend-automation/message-searcher)
Your own site
<a href="https://agentmods.dev/agents/zbvxbb622-code/wechat-mcp-friend-automation/message-searcher"><img src="https://agentmods.dev/badge/agents/zbvxbb622-code/wechat-mcp-friend-automation/message-searcher/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 message-searcher

Your own site · 80×15
<a href="https://agentmods.dev/agents/zbvxbb622-code/wechat-mcp-friend-automation/message-searcher"><img src="https://agentmods.dev/badge/agents/zbvxbb622-code/wechat-mcp-friend-automation/message-searcher.svg" alt="Reviewed on agentmods" width="80" 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 100% copy Near-identical to another mod 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-09, 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

This is a copy

100% identical to message-searcher — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.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 zbvxbb622-code/wechat-mcp-friend-automation (0 stars, last pushed 1mo 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. It is 100% identical to message-searcher, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

context-finder

Read-only, memory- and index-aware codebase search. Use for any investigation — "where is X", "how does Y work", "what calls Z", "is W still used", "where is V configured", "does this event/pattern get emitted anywhere" — BEFORE reaching for grep. Consults the knowledge graph, code index, and prior session memory…

futuregerald/futuregerald-claude-plugin · 111 tokens

wiki-ingest

Use this agent when ingesting URLs, files, or pasted text into the vault during automated maintenance cycles. Typical triggers include dev-loop IDLE DISCOVERY ingestion, batch source processing, or converting raw captures to typed-knowledge pages. See "When to invoke" in the agent body for worked scenarios.

karlorz/llm-wiki · 64 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens