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-migrateWrote 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-migrate)<a href="https://agentmods.dev/commands/psychquant/che-apple-mail-mcp/archive-mail-migrate"><img src="https://agentmods.dev/badge/commands/psychquant/che-apple-mail-mcp/archive-mail-migrate/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-migrate"><img src="https://agentmods.dev/badge/commands/psychquant/che-apple-mail-mcp/archive-mail-migrate.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.00021 | $0.01999 |
| Opus 5 | $0.00010 | $0.01000 |
| Sonnet 5 | $0.00004 | $0.00400 |
| Haiku 4.5 | $0.00002 | $0.00200 |
Grade A, and why
archive-mail-migrate 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 — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Archive Mail — Migrate to .claude/.mail/ Namespace(v2.8.0+)
把散在各個 archive directory 的 .email_index.json、.threads.json,以及 .claude/emails.md,集中搬到 .claude/.mail/ namespace。學 IDD .claude/.idd/ 的 namespace 收斂 pattern。
為什麼要 migrate
v2.8.0 之前的 file layout:
{cwd}/
├── .claude/
│ └── emails.md ← config 散在 root
└── communications/emails/
├── .email_index.json ← state 散在 archive output 裡
├── .threads.json
├── 2026-01-13_xxx.md ← archive markdown(不動)
└── ...
v2.8.0+ 集中後:
{cwd}/
├── .claude/.mail/
│ ├── config.yaml ← 從 .claude/emails.md 搬來(v2.7.0 ↓);v2.16.0+ 副檔名 .yaml
│ └── state/
│ └── archives/
│ └── communications-emails/
│ ├── email_index.json ← 從 communications/emails/.email_index.json 搬來
│ └── threads.json ← 從 communications/emails/.threads.json 搬來
└── communications/emails/
├── 2026-01-13_xxx.md ← archive markdown 不動
└── ...
archive-mail v2.8.0+ 會 auto-migrate(每次跑時 silent 移動),但若你有多個 archive target 不想等到下次 archive 才觸發,可以一次跑這個 command 全部搬完。
使用方式
# Dry run(預覽會搬什麼,不實際執行)
/archive-mail-migrate --dry-run
# 實際執行
/archive-mail-migrate
執行步驟
Step 1: 解析參數
DRY_RUN=false
if [ "$1" = "--dry-run" ]; then
DRY_RUN=true
fi
NAMESPACE_DIR=".claude/.mail"
Step 2: 掃描所有 archive targets
從當前 working directory 開始,找出所有 legacy index files:
find . -maxdepth 6 -type f \( -name ".email_index.json" -o -name ".threads.json" \) \
-not -path "*/.claude/.mail/*" \
-not -path "*/.git/*" \
-not -path "*/node_modules/*" \
2>/dev/null
對每一個 hit,推斷它所屬的 archive_dir(file 所在的 directory),然後計算 slug。
範例 output:
Detected legacy archive targets:
1. ./communications/emails/.email_index.json (18 entries) + .threads.json (6 threads)
→ slug: communications-emails
2. ./projects/X/comms/.email_index.json (12 entries) + .threads.json (4 threads)
→ slug: projects-X-comms
3. (etc.)
Plus:
./.claude/emails.md → .claude/.mail/config.yaml
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 · 209 lines · 21 tokens per session scan A fe2271a5c562
archive-mail-migrate is a command published in the GitHub repository PsychQuant/che-apple-mail-mcp (8 stars, last pushed yesterday), licensed MIT. It adds 21 tokens to every session and 1,999 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
memory-list
DEPRECATED: Use Serena listmemories instead. Lists recent memories from Forgetful with optional project filtering.
handoff
Create a handoff document for seamless session continuity.
remind
Create a reminder from natural language.
learn
A command that saves reusable discoveries and lessons from a coding session as one-line JSON records. JSONL means one JSON object per line, making the file easy to append to and process.
week
Show this week's calendar overview.
context-budget
Legacy slash-entry shim for the context-budget skill. Prefer the skill directly.