mail-setup

mail-setup is a skill for Claude Code, Codex from henry200803/mailbridge. It costs 78 tokens per session (1,035 once invoked), scanned A, original, MIT.

A setup and repair guide for connecting email accounts to mailbridge, a mailbox-search tool. It covers account checks, IMAP passwords, Microsoft app registration, OAuth sign-in, and common authorization failures.

In plain words
What is it for?
Use it to connect or repair iCloud, Outlook, Gmail, and other mailboxes, check account status, complete Microsoft authorization, and diagnose login errors.
Why use it?
It helps identify whether an account is missing, lacks credentials, or has not completed authorization. It also keeps passwords out of the conversation by using a local setup wizard.

Skill for Claude CodeCodex

Part of the mailbridge plugin — 2 skills, 1 MCP server shipped together

Install

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.

agentmods
npx agentmods add skills/henry200803/mailbridge/mail-setup
Any agent
npx skills add henry200803/mailbridge --skill mail-setup
Clone the repo
git clone --depth 1 https://github.com/henry200803/mailbridge

Made for: Claude Code, Codex.

Or install mailbridge, the plugin that ships this one along with the rest of its 2 skills, 1 MCP server.

Wrote 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.

agentmods badge for mail-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/henry200803/mailbridge/mail-setup.svg)](https://agentmods.dev/skills/henry200803/mailbridge/mail-setup)
Your own site
<a href="https://agentmods.dev/skills/henry200803/mailbridge/mail-setup"><img src="https://agentmods.dev/badge/skills/henry200803/mailbridge/mail-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,035 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00078 $0.01035
Opus 5 $0.00039 $0.00517
Sonnet 5 $0.00016 $0.00207
Haiku 4.5 $0.00008 $0.00103

Measured 4d ago against content hash a60d10fbb619, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mail-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 4d 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.

skills/mail-setup/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Connecting a mailbox to mailbridge

All configuration happens on the user's own machine via a setup wizard. Never ask the user to paste a password or app password into the conversation — the wizard reads it with hidden input and writes it to ~/.mailbridge/accounts.json (mode 0600). Credentials must never enter the transcript.

First: find out what is actually wrong

Call mail_list_accounts. It reports every configured account and, for Microsoft accounts, whether OAuth has been completed. Match what it returns:

Symptom Cause Fix
Empty account list Nothing configured yet Run the wizard (below)
has_password: false IMAP account with no credential Re-run setup.py add, or edit the config
has_client_id: false Microsoft account, no app registration references/azure-app-registration.md
authorized: false Registered but never signed in python3 <plugin>/server/setup.py auth NAME
Login failures on IMAP Provider rejects the plain password references/app-passwords.md
403 from Graph on a work account Tenant has not consented Escalate to their IT — see below

Running the wizard

Tell the user to run this in a terminal on the machine where the plugin is installed:

python3 ~/.claude/plugins/mailbridge/server/setup.py

If that path does not exist, have them locate the plugin directory and run server/setup.py inside it. The wizard is menu-driven and self-explanatory; it covers adding accounts, signing in to Microsoft, testing a connection, and removing accounts.

Non-interactive shortcuts worth knowing:

python3 setup.py add            # add one mailbox
python3 setup.py list           # show what is configured
python3 setup.py auth NAME      # Microsoft device-code sign-in
python3 setup.py test NAME      # connect and report what works

Always finish by having them run setup.py test NAME, then call mail_list_accounts yourself to confirm the server sees the same thing.

Read the full file on GitHub · 94 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 4d ago First seen · 94 lines · 78 tokens per session scan A a60d10fbb619

Subscribe to this mod's changes

mail-setup is a skill published in the GitHub repository henry200803/mailbridge (7 stars, last pushed 24d ago), licensed MIT. It adds 78 tokens to every session and 1,035 once invoked, about $0.0004 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.