Borrowing it
Nothing to install: this file belongs to coreyepstein/advanced-gmail-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/coreyepstein/advanced-gmail-mcp/main/.claude/commands/checkemail.mdgit clone --depth 1 https://github.com/coreyepstein/advanced-gmail-mcpWrote 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/coreyepstein/advanced-gmail-mcp/checkemail)<a href="https://agentmods.dev/commands/coreyepstein/advanced-gmail-mcp/checkemail"><img src="https://agentmods.dev/badge/commands/coreyepstein/advanced-gmail-mcp/checkemail.svg" alt="Measured on agentmods" 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.00016 | $0.00899 |
| Opus 5 | $0.00008 | $0.00449 |
| Sonnet 5 | $0.00003 | $0.00180 |
| Haiku 4.5 | $0.00002 | $0.00090 |
Grade A, and why
checkemail 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 6d 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 — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/checkemail — Inbox Cleanup + Triage
Two-phase inbox sweep: (1) batch archive junk, (2) walk through real emails one by one.
User's input: $ARGUMENTS
Setup
Load gmail tools: ToolSearch with query +gmail.
Determine accounts: if user specified one, use it. Otherwise all configured accounts.
Phase 1 — Fetch + Classify
list_emailsfor each account (max_results=25, parallel)- For every email with a threadId, check if user already replied:
get_threadfor each thread (parallel, batch by account)- If any message in thread has
from:matching the account's address, mark as already handled
- Classify every inbox email into one of:
- Archive — newsletters, promotions, notifications, social, expired codes, calendar accepts, duplicate sends, FYI-only items user already replied to
- Triage — needs user attention (action required, waiting on reply, unread from a real person, financial/legal)
Always-archive rules
These are ALWAYS classified as Archive without asking:
- Newsletters / Substacks / daily digests
- Promotional emails (CATEGORY_PROMOTIONS)
- Social notifications (CATEGORY_SOCIAL)
- Calendar accepts/declines (no action needed)
- Automated billing receipts
- GitHub PR merge notifications (already merged = FYI)
- Tool/service update notices
- Threads where user already sent the most recent reply (waiting on other party)
Present results
Show a single summary with two sections:
Proposed archives — grouped table by account:
## Proposed Archives (N emails)
### Account-Alias (X)
| From | Subject | Reason |
|------|---------|--------|
Triage queue — numbered list across all accounts:
## Triage Queue (N emails)
| # | Account | From | Subject | Status |
|---|---------|------|---------|--------|
Then ask: "Archive all N? Then we'll walk through triage."
Wait for user confirmation. User may exclude items from archive or add items to archive.
Phase 2 — Archive
On approval, batch_modify per account (archive action). Report count.
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.
- 6d ago First seen · 107 lines · 16 tokens per session scan A b7b79fa1fb2a
checkemail is a command published in the GitHub repository coreyepstein/advanced-gmail-mcp (7 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 899 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-31.
Other commands, from other repositories
resume
Read .claude/session-handoff.json for context from the previous session.
notify
Send a direct notification to one specific session on this project. Wraps broadcast with a target session and warning priority.
start-11-3
Command "start-11-3" from minicoohei/ai-agent-camp, covering 🎓 lesson 11-3: ニュース取得→メール/slack配信ワークフロー, 📍 このセッションでやること, 🎯 準備チェック, 🚀 step 1: ニュース取得スクリプトの作成 and rss フィード url(例: はてなテクノロジー).
start-11-3.en
Lesson 11-3: News Fetching → Email/Slack Distribution!
analyze-email
Quick analysis of a single email. Read metadata, summarize content, and list attachments.
checklist
Generate a custom checklist for the current feature based on user requirements.