Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/PsychQuant/che-apple-mail-mcpnpx agentmods add commands/psychquant/che-apple-mail-mcp/archive-mail-viewWrote 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.
[](https://agentmods.dev/commands/psychquant/che-apple-mail-mcp/archive-mail-view)<a href="https://agentmods.dev/commands/psychquant/che-apple-mail-mcp/archive-mail-view"><img src="https://agentmods.dev/badge/commands/psychquant/che-apple-mail-mcp/archive-mail-view/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.
<a href="https://agentmods.dev/commands/psychquant/che-apple-mail-mcp/archive-mail-view"><img src="https://agentmods.dev/badge/commands/psychquant/che-apple-mail-mcp/archive-mail-view.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.02017 |
| Opus 5 | $0.00006 | $0.01009 |
| Sonnet 5 | $0.00003 | $0.00403 |
| Haiku 4.5 | $0.00001 | $0.00202 |
Grade A, and why
archive-mail-view 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Archive Mail — Thread View
讀 .threads.json + per-email md 檔,聚合成單一 thread 視圖檔。用來把散在多個 md 檔裡的對話串整理成敘事性的一篇。
使用方式
/archive-mail-view "SE manuscript 10xx-2025"
/archive-mail-view "SE manuscript" communications
/archive-mail-view "SE" communications/emails
- 第一個參數:thread key(可以是 substring,會模糊匹配
.threads.json裡的 key) - 第二個參數(可選):archive 目錄,預設
communication/emails
執行步驟
Step 1: 解析參數
從 $ARGUMENTS 取得:
thread_query: 要找的 thread key(必填)archive_dir: archive 目錄,預設communication/emails
若無參數,提示:
Usage: /archive-mail-view <thread-key> [archive-dir]
Try: /archive-mail-view "SE manuscript 10xx-2025"
Step 2: 載入索引(v2.8.0+ 從 .claude/.mail/state/archives/${SLUG}/)
NAMESPACE_DIR=".claude/.mail"
SLUG=$(echo "${archive_dir}" | tr '/' '-' | sed 's/^[-.]*//;s/[-.]*$//')
THREADS_FILE="${NAMESPACE_DIR}/state/archives/${SLUG}/threads.json"
# Auto-migrate from legacy(silent)
if [ ! -f "${THREADS_FILE}" ] && [ -f "${archive_dir}/.threads.json" ]; then
mkdir -p "$(dirname "${THREADS_FILE}")"
mv "${archive_dir}/.threads.json" "${THREADS_FILE}"
echo "🔄 Migrated ${archive_dir}/.threads.json → ${THREADS_FILE}"
fi
[ -f "${THREADS_FILE}" ] || {
echo "ERROR: ${THREADS_FILE} not found (also no legacy ${archive_dir}/.threads.json)."
echo "Run /archive-mail first to create the index, or /archive-mail-rebuild-threads to regenerate from existing md files."
exit 1
}
Step 3: 匹配 thread key
在 .threads.json 的 threads 物件中用 case-insensitive substring match 找符合的 key:
- 0 個匹配:列出前 20 個可用 thread key 給使用者參考,退出
- 1 個匹配:使用該 key
- 多個匹配:列出所有匹配的 thread key(含 message_count、last_message),讓使用者用更具體的 query 重跑
Step 4: 讀取 messages 並依時序排序
對選定的 thread entry:
- 從
messages陣列讀取所有file路徑 - 依
date欄位排序(asc,最早的在前) - 對每個 md 檔:
Read該檔- 解析 YAML frontmatter 取得
message_id/sender/direction/date/in_reply_to - 提取
## 信件內容到下一個---之間的 body(不含 thread quote 尾巴;thread quote 的辨識 pattern 同 archive-mail Step 5.5:差出人:/寄件者:/From:/On .* wrote:) - 提取
## 重點摘要(若有) - 提取
Attachments:區塊(若有)
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.
- 10d ago First seen · 189 lines · 13 tokens per session scan A 6d2f86e6a4e8
archive-mail-view is a command published in the GitHub repository PsychQuant/che-apple-mail-mcp (8 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 2,017 once invoked, about $0.0001 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.
Other commands, from other repositories
remind
Create a reminder from natural language.
week
Show this week's calendar overview.
today
Show today's calendar events and pending reminders.
watch-toggle
Temporarily disable or re-enable the popcorn hooks.
analyze-email
Quick analysis of a single email. Read metadata, summarize content, and list attachments.
browser
Set or check the browser popcorn should control (Chrome / Arc / Safari / Brave / Edge).