Borrowing it
Nothing to install: this file belongs to marlinjai/email-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/marlinjai/email-mcp/main/.claude/commands/clean-email.mdgit clone --depth 1 https://github.com/marlinjai/email-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/marlinjai/email-mcp/clean-email)<a href="https://agentmods.dev/commands/marlinjai/email-mcp/clean-email"><img src="https://agentmods.dev/badge/commands/marlinjai/email-mcp/clean-email/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/marlinjai/email-mcp/clean-email"><img src="https://agentmods.dev/badge/commands/marlinjai/email-mcp/clean-email.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.00998 |
| Opus 5.5 | $0.00008 | $0.00399 |
| Sonnet 5.5 | $0.00004 | $0.00200 |
| Haiku 4.5 | $0.00002 | $0.00100 |
Grade A, and why
clean-email 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- clean-email — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean My Email
You are an email triage assistant. Use the IMAP MCP tools to clean junk/spam folders across all connected email accounts.
Setup
- Blocklist location:
config/blocklist.jsonin this project directory (/Users/marlinjai/software dev/clean-my-email/) - MCP Server:
imap(nikolausm/imap-mcp-server with multi-account support)
Workflow
1. Load blocklist
Read config/blocklist.json from the project directory. This contains domains whose emails should be auto-deleted without classification.
2. Connect to all accounts
Use imap_list_accounts to see available accounts. For each account, use imap_connect to ensure it's connected.
3. For each account, process junk/spam folder
Use imap_list_folders to find the junk/spam folder for the account. Common names:
- Gmail:
[Gmail]/Spam - iCloud:
Junk - Outlook:
Junk Email
Use imap_search_emails on the junk/spam folder to get recent emails (last 7 days). If there are many, process in batches of 20.
4. Pre-filter: Auto-delete blocklisted domains
For each email, extract the sender's domain. If it matches a domain in blocked_domains, delete it immediately using imap_delete_email. Count these as "auto-deleted".
5. Classify remaining emails
For each remaining email, use imap_get_email to read its content. Classify it into one of:
-
JUNK: Obvious spam, scams, phishing, unwanted marketing from unknown senders → Delete using
imap_delete_email→ Add sender domain toblocked_domainsin blocklist -
NOT JUNK: Legitimate email that was incorrectly flagged as spam → Use
imap_send_emailto forward the email content to the user's own inbox address with subject prefix "[Rescued from Spam] " → Delete the original from spam usingimap_delete_email→ Print a summary: sender, subject, brief description of contents -
PROMOTION/NEWSLETTER: Legitimate promotional or newsletter content → Use
imap_list_foldersto find a matching promotions folder → If a matching folder exists and move is possible, describe what folder it belongs in → If no matching folder, leave it and note it in the report → Do NOT add to blocklist (these are opted-in)
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.
- 1mo ago First seen · 102 lines · 21 tokens per session scan A b11d9ee0c189
clean-email is a command published in the GitHub repository marlinjai/email-mcp (26 stars, last pushed 4d ago), licensed MIT. It adds 21 tokens to every session and 998 once invoked, about $0.0001 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.
Other commands, from other repositories
cancel-ralph
Cancel active Ralph Loop.
engage.actions
Execute Phase 7 - Actions on Objectives and Goal Achievement.
r
Resume the last handoff and carry on with the outstanding work.
quickstart
Interactive onboarding guide — set up credentials, connect to orq.ai, and learn every command and skill.
focus
You are an ADHD focus assistant. Help the user commit to ONE task and block mental distractions.
stuck
You are an ADHD-friendly unblocking assistant. Help users get unstuck when they don't know what to do.