archive-mail-registry

archive-mail-registry is a command for Claude Code from PsychQuant/che-apple-mail-mcp. It costs 38 tokens per session (1,486 once invoked), scanned A, original, MIT.

Commands for listing and validating registered email archive targets and previewing how messages would be distributed. A registry is a saved list of destinations and their relationships; an index records archive history.

In plain words
What is it for?
Use it to list targets, validate the registry, inspect an archive tree's history, and create a read-only distribution plan for candidate messages.
Why use it?
They let you inspect the configured archive structure and past message IDs before changing mail. The planning step is read-only, so it does not pretend that messages have already been archived.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

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

Good fit Use it to list targets, validate the registry, inspect an archive tree's history, and create a read-only distribution plan for candidate messages.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/psychquant/che-apple-mail-mcp/archive-mail-registry
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/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, 8 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 archive-mail-registry

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/psychquant/che-apple-mail-mcp/archive-mail-registry"><img src="https://agentmods.dev/badge/commands/psychquant/che-apple-mail-mcp/archive-mail-registry.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 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,486 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.00038 $0.01486
Opus 5.5 $0.00015 $0.00594
Sonnet 5.5 $0.00008 $0.00297
Haiku 4.5 $0.00004 $0.00149

Measured 1mo ago against content hash c0e69fbee517, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

archive-mail-registry 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 1mo 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.

plugin/commands/archive-mail-registry.md · 84 lines

How it starts

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

歸檔目標登錄與分派

全域登錄檔為 ~/.claude/.mail/archives.json,與只存別名的 identity.yaml 分開。只有使用者明確要求新增/修改登錄時才寫檔;不掃描整台機器、不自動推導父子關係、不自動註冊本次工作區。home 檔案不受 workspace gitignore 管轄,也不代表自動跨機器同步。

只讀命令

先定位目前載入的 plugin 根目錄(以下 <plugin-root>),不要假設使用者 cwd 有 plugin/。執行固定 helper,路徑使用獨立 shell 引數/正確引用,不將 registry 內容當程式碼。

python3 "<plugin-root>/scripts/archive_registry.py" list
python3 "<plugin-root>/scripts/archive_registry.py" validate
python3 "<plugin-root>/scripts/archive_registry.py" snapshot --target "target-id"
python3 "<plugin-root>/scripts/archive_registry.py" plan --target "target-id" --candidates "/absolute/candidates.json"
  • list 顯示全部目標的用途、filter 軸、parent/root、路徑與失效項目。
  • validate 檢查完整登錄;失效時為非零 exit 與 JSON error,不當成空登錄。
  • snapshot 讀指定目標整個組織樹的 indexes,包含已離開目錄的歷史 ID。historical_index_only 是去重證據,不能宣稱知道內容現在在哪裡。任何 scope index 失效即停止;不相關樹的問題仍可由 list 看見。
  • plan 是只讀預覽,不代表已執行或已取得分派授權。同祖先鏈取最深匹配、跨支線匹配留最低共同祖先 intake、未匹配留 root intake;所有新信都先 capture 到 root,保留子層獨有候選。

候選 JSON 格式:

[{"message_id":"<[email protected]>","matched_target_ids":["project-a"]}]

matched_target_ids 來自已確認的分類判準;filter_axis 只是說明,不是可執行搜尋語法,也不等同信件歸屬。沒有可靠分類時用空陣列,不猜一個下層。

登錄格式

{
  "version": 1,
  "targets": [
    {
      "id": "intake",
      "parent_id": null,
      "workspace": "/absolute/capture-workspace",
      "config_file": "/absolute/capture-workspace/.claude/.mail/config.yaml",
      "output_dir": "/absolute/capture-workspace/communication/intake",
      "index_file": "/absolute/capture-workspace/.claude/.mail/state/archives/intake/email_index.json",
      "purpose": "待分類的信件",
      "filter_axis": "本人的機構帳號"
    },
    {
      "id": "project-a",
      "parent_id": "intake",
      "workspace": "/absolute/project-a",
      "config_file": "/absolute/project-a/.claude/.mail/config.yaml",
      "output_dir": "/absolute/project-a/communication/emails",
      "index_file": "/absolute/project-a/.claude/.mail/state/archives/emails/email_index.json",
      "purpose": "專案 A 往來",
      "filter_axis": "專案協作者",
      "attachment_roots": ["/absolute/shared-research-data"]
    }
  ]
}

Read the full file on GitHub · 84 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. 1mo ago First seen · 84 lines · 38 tokens per session scan A c0e69fbee517

Subscribe to this mod's changes

archive-mail-registry is a command published in the GitHub repository PsychQuant/che-apple-mail-mcp (11 stars, last pushed 7d ago), licensed MIT. It adds 38 tokens to every session and 1,486 once invoked, about $0.0002 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-10-30.

Related

archive-mail-registry compared with commands from other repositories

archive-mail-registry next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
archive-mail-registryPsychQuant/che-apple-mail-mcpCommand117d agoMITA38Claude Code
mailomarshahine/apple-pimCommand684d agoMITA27Claude Code
remindersomarshahine/apple-pimCommand684d agoMITA21Claude Code
contactsomarshahine/apple-pimCommand684d agoMITA17Claude Code
remindPsychQuant/che-ical-mcpCommand45yesterdayMITA9Claude Code
weekPsychQuant/che-ical-mcpCommand45yesterdayMITA7Claude Code
todayPsychQuant/che-ical-mcpCommand45yesterdayMITA9Claude Code