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.
npx agentmods add skills/csitte/mailwarden/setupnpx skills add csitte/mailwarden --skill setupgit clone --depth 1 https://github.com/csitte/mailwardenWhat 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 | $0.00094 | $0.00752 |
| Opus 5 | $0.00047 | $0.00376 |
| Sonnet 5 | $0.00019 | $0.00150 |
| Haiku 4.5 | $0.00009 | $0.00075 |
Grade A, and why
setup 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 yesterday.
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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Set up mailwarden
mailwarden runs locally and talks to Gmail with the user's OWN Google OAuth client — there is no hosted service and no shared credential. Setup is a one-time dance with the Google Cloud console and one terminal command. The authoritative, step-by-step guide ships with this plugin:
${CLAUDE_PLUGIN_ROOT}/docs/SETUP.md
Read it before you start (it is short) and follow it rather than improvising — in particular the part about setting the OAuth consent screen to Production, which is what keeps the token from expiring after seven days.
How to run this
- Diagnose first. Run
npx -y mailwarden --checkand read its report. It tells you exactly which step is missing (nocredentials.json, no token, wrong scopes, encrypted token without passphrase, …) and what to do. If it passes, setup is already done — say so and stop. - Walk the user through the console steps from
docs/SETUP.md§1–§4 (Cloud project → Gmail API → consent screen in Production → Desktop-app OAuth client → downloadcredentials.jsoninto~/.mailwarden/). These happen in the user's browser; you cannot do them for them. Give one step at a time and wait. - Authorize (§5): the user runs
npx -y mailwarden --authin their own terminal — it opens a browser for Google consent and stores the refresh token in~/.mailwarden/token.json. Do not run this from a tool call yourself; it needs an interactive browser session. The "unverified app" warning is expected for a personal OAuth client (§5, "The unverified app warning is normal"). - Verify with
npx -y mailwarden --checkagain, then call theget_profiletool to confirm which mailbox is connected.
Options worth mentioning
- Least privilege:
MAILWARDEN_TOOLS=read(orMAILWARDEN_READONLY=1) registers only the read tools and requests onlygmail.readonlyat--auth. The plugin's default server entry runs the full surface; a user who wants a narrower tier should add the server themselves withclaude mcp add mailwarden -e MAILWARDEN_TOOLS=read -- npx -y mailwardenand disable this plugin's server. Widening the tiers needs a fresh--auth; narrowing does not. - Second account:
npx -y mailwarden --auth --account work, then a second server entry withMAILWARDEN_ACCOUNT=work(README → "Multiple accounts"). One server = one mailbox, by design. - Troubleshooting: every known error message has an entry in
docs/SETUP.md→ Troubleshooting. Quote the matching entry instead of guessing.
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.
- yesterday First seen · 46 lines · 94 tokens per session scan A df16f72a2133
setup is a skill published in the GitHub repository csitte/mailwarden (0 stars, last pushed yesterday), licensed MIT. It adds 94 tokens to every session and 752 once invoked, about $0.0005 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 skills, from other repositories
gmail
Send, read, and manage Gmail messages and email attachments automatically.
gmail-tool
Gmail integration tool for unread checks, reading bodies, and drafts via OAuth2 Gmail API access. Use when: reading inbox mail, fetching message bodies, writing drafts, or searching labeled mail.
c-email
Read, send, search, and label email via gog (Gmail CLI) or himalaya (IMAP). Supports inbox management, drafting replies, thread viewing, and label/folder operations across Gmail and standard IMAP accounts.
imap-smtp-email
Read, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, 126.com, QQ Mail, and any standard IMAP/SMTP server with multi-account support.
mail-operations
Use this skill whenever the user wants to interact with email. This includes reading inbox, sending emails, replying, searching messages, managing labels and categories, downloading attachments, setting up auto-reply rules, or triggering agents to handle incoming emails. Supports Gmail, Outlook, and IMAP/SMTP (QQ…
mail-muncher
Give an agent or script its own read-only mailbox as files on disk. Works with any IMAP server (Fastmail, iCloud, Gmail, Proton Bridge, work and self-hosted accounts) or with the Gmail API. Use when the user wants email in an agent workflow, wants to archive or export mail, wants to monitor an inbox for specific…