email-search-disambiguation

email-search-disambiguation is a skill for Claude Code from PsychQuant/che-apple-mail-mcp. It costs 91 tokens per session (1,524 once invoked), scanned A, original, MIT.

A clarification step for email searches when a person, time period, direction, or scope is unclear. It presents specific possible meanings so the user can choose one.

In plain words
What is it for?
Use it before searching emails with vague names, roles, organizations, time references, mailbox scope, or unclear sent-versus-received direction.
Why use it?
It prevents searching the wrong contact, date range, or set of messages because words such as “recent,” “everyone,” or “the boss” can mean different things.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the che-apple-mail-mcp plugin — 3 skills, 5 commands, 1 hook shipped together

Good fit Use it before searching emails with vague names, roles, organizations, time references, mailbox scope, or unclear sent-versus-received direction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/psychquant/che-apple-mail-mcp/email-search-disambiguation
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.

Any agent
npx skills add PsychQuant/che-apple-mail-mcp --skill email-search-disambiguation
Clone the repo
git clone --depth 1 https://github.com/PsychQuant/che-apple-mail-mcp

Made for: Claude Code.

Or install che-apple-mail-mcp, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 1 hook.

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 email-search-disambiguation

README.md
[![agentmods](https://agentmods.dev/badge/skills/psychquant/che-apple-mail-mcp/email-search-disambiguation/github.svg)](https://agentmods.dev/skills/psychquant/che-apple-mail-mcp/email-search-disambiguation)
Your own site
<a href="https://agentmods.dev/skills/psychquant/che-apple-mail-mcp/email-search-disambiguation"><img src="https://agentmods.dev/badge/skills/psychquant/che-apple-mail-mcp/email-search-disambiguation/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 email-search-disambiguation

Your own site · 80×15
<a href="https://agentmods.dev/skills/psychquant/che-apple-mail-mcp/email-search-disambiguation"><img src="https://agentmods.dev/badge/skills/psychquant/che-apple-mail-mcp/email-search-disambiguation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,524 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.00091 $0.01524
Opus 5.5 $0.00036 $0.00610
Sonnet 5.5 $0.00018 $0.00305
Haiku 4.5 $0.00009 $0.00152

Measured yesterday against content hash 271a1b624640, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

email-search-disambiguation 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 yesterday.

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.

plugin/skills/email-search-disambiguation/SKILL.md · 149 lines

How it starts

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

Email Search Disambiguation

借鑑 nsql 的 disambiguation triggers,adapt 到 email search 領域。

Triggers

E1 — Vague Contact Reference

Examples:

  • 中文人名:「陳老師」、「王教授」、「林助理」
  • 角色稱呼:「老闆」、「主管」、「指導教授」、「客戶」
  • 公司/組織:「中研院的人」、「stat.sinica 的信」

Resolution pattern:

「{contact}」可能對應到:
1. {email_1} ({description_1},推薦)
2. {email_2} ({description_2})
3. 其他({user 補充})

你要哪一個?

範例:

「陳老師」可能對應到:
1. [email protected] [workspace][推薦] "陳老師(研究所)"
2. [email protected] [thread] "同單位的另一位陳"
3. 其他

你要哪一個?

怎麼找候選:

  • 在 archive-mail 內,使用 Step 1.4 已解析的 EFFECTIVE_PARTICIPANT_ALIASES:全域 ~/.claude/.mail/identity.yaml 為基底,workspace ${CONFIG_FILE} 的 aliases 原樣補充未涵蓋的地址;重複鍵以全域為準並留待報告具名揭露。
  • 獨立使用本 skill 時(不在 archive-mail 內),workspace config 取目前目錄的 .claude/.mail/config.yaml(不存在即空),不執行 archive-mail Step 1.6 的 legacy 遷移,其餘依 commands/archive-mail.md Step 1.4 的同一規則(缺檔靜默、格式錯誤警告、只為比對做正規化、衝突揭露)。不回頭讀 .claude/emails.md,也不建立另一套覆寫優先序。
  • email → 顯示名稱只能提供候選;顯示名稱命中多個 email 時逐一列出,保留 email 讓使用者選擇,不自動改 filter 或略過確認。每個候選標示來源(identity/workspace/thread),來源與「推薦」由 agent 放在固定位置,不取自顯示名稱;顯示名稱去掉換行與控制字元、截斷到 64 個字元並加引號。只來自全域 identity 的候選不得標「推薦」;identity 與 workspace 以同一顯示名稱指向不同地址時,這些候選都不標「推薦」。使用者以 --no-confirm/「直接做」跳過確認時,若全域 identity 把模糊人名對到的地址不在本 workspace 的 aliases 與 thread participants,仍列候選;其餘照舊跳過(規則同 commands/archive-mail.md Step 1.5)。
  • 從 contacts 或之前 archive 的 thread participants 找匹配
  • 如果完全找不到,問 user「我找不到匹配的 contact,你能給我 email 地址嗎?」

E2 — Vague Time Reference

Examples: 「最近」、「上週」、「這個月」、「之前」、「半年內」

Resolution pattern:

「{term}」可以有不同解釋:
1. 過去 7 天 (今天 - 7d)
2. 上一個完整週/月
3. 自從某事件 (例如:上次 archive 之後)

你指的是哪一個?

E3 — Vague Scope

Examples: 「全部」、「所有」、「都」、「整個 thread」

Resolution pattern:

「全部」可能指:
1. 符合 filter 的 emails (用 search criteria 限縮)
2. 整個 mailbox 的 emails (沒有 filter)
3. 過去 N 天/月的 emails (時間限縮)

範圍多大?

E4 — Ambiguous Operation Direction

Examples:

  • 「寄給陳老師的信」← 我寄出?還是收到?
  • 「跟陳老師往來的信」← 雙向

Resolution pattern:

「{phrase}」可能指:
1. 我寄出去給 {contact} 的(Sent direction)
2. {contact} 寄給我的(Received direction)
3. 雙向(整個 thread)

你要哪一個?

Read the full file on GitHub · 149 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. yesterday Changed 271a1b624640
  2. 4d ago Changed · +2 lines 468ea70f8f11
  3. 1mo ago First seen · 147 lines · 91 tokens per session scan A ab49f5a89c23

Subscribe to this mod's changes

email-search-disambiguation is a skill published in the GitHub repository PsychQuant/che-apple-mail-mcp (10 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 1,524 once invoked, about $0.0004 per session on Opus 5.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.