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/askie/cfmail/email-adminnpx skills add askie/cfmail --skill email-admingit clone --depth 1 https://github.com/askie/cfmailWhat 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.00084 | $0.01176 |
| Opus 5 | $0.00042 | $0.00588 |
| Sonnet 5 | $0.00017 | $0.00235 |
| Haiku 4.5 | $0.00008 | $0.00118 |
Grade A, and why
email-admin 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.
This is a copy
100% identical to email-admin — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
email-admin
用管理员密钥管理一台 cloudflare-email 服务:开通邮箱、签发/吊销访问密钥、配置新邮件通知。
管理员密钥就是服务部署时设置的 MCP_TOKEN。它能解锁普通邮箱密钥看不到的管理工具。普通用户拿到这里签发的 Key 后,用配套的 email-inbox 技能收发邮件。
所有操作走 cfmail admin 子命令,从任何目录都能跑。
何时使用
当用户(管理员)要求:给某人开一个邮箱 / 签发或重置访问密钥 / 看已经开通了哪些邮箱 / 吊销某人的密钥 / 设置新邮件通知地址时。
两个要素
- 服务地址:例如
https://mail.example.com(不带/mcp)。 - 管理员密钥:服务的
MCP_TOKEN。这是最高权限凭证,绝不能交给普通用户、不要泄露。
前置:安装 cfmail(一次性)
cfmail --version
没有就装(需要 Node 20+):
npm install -g cfmail
要跑仓库里最新未发布的代码才用源码安装:
git clone https://github.com/askie/cfmail.git
cd cfmail/cli && npm i -g $(npm pack | tail -1)
第一步:设置接入点(一次性)
cfmail admin setup --base <服务地址> --key <管理员MCP_TOKEN>
命令会连服务确认这把钥匙确实是管理员密钥(能看到管理工具才算通过),通过后写到 ~/.config/email-admin/config.json(与普通用户的配置文件分开存放)。密钥只存在本机。
开通一个邮箱
cfmail admin create-key alice@你的域名
输出里的 API Key 只显示这一次,请立刻交给使用者。命令会顺带打印对方该跑的配置命令,直接转给他即可。
地址不需要预先创建。服务对整个域名做 catch-all 收信,签发 Key 的动作就是把某个地址的收件权限绑给这把 Key。
其余管理命令
cfmail admin list-keys # 看已发放的 Key(只列邮箱,不回显密钥)
cfmail admin delete-key alice@你的域名 # 吊销,立即失效
cfmail admin webhook # 看当前通知设置
cfmail admin webhook --set whk_xxx # 新邮件推到 Grix 聊天里
cfmail admin webhook --set https://... # 或 POST 原始 JSON 给自己的程序
cfmail admin webhook --clear # 关闭通知
新邮件通知支持两种目标,服务按值的形态自动判断:whk_ 开头是 Grix key(推送成一条可读的聊天消息),http(s):// 开头是普通 webhook(发原始 JSON 事件)。推送失败只记日志,不影响收信。
任何命令加 --json 可得到机器可读输出,失败时也是 JSON 且退出码非 0。
给 Agent 的执行提示
- 首次管理操作而没有配置(报
no service URL configured)时,先问齐服务地址和管理员密钥,跑cfmail admin setup。 - 用户说「给 X 开个邮箱」→
cfmail admin create-key X,把输出里的 Key 和配置命令一起转达,并提醒只显示这一次。 - 用户说「谁在用」→
cfmail admin list-keys;说「停掉某人」→cfmail admin delete-key <邮箱>,执行前先复述要吊销谁并确认。 - 管理员密钥绝不能出现在给普通用户的输出里。要给普通用户的只有
create-key签发出来的那把。 - 报
this key is not an admin token说明配的是普通邮箱 Key,不是MCP_TOKEN。
故障排查
cfmail: command not found:CLI 没装,重新跑上面「前置」里的安装命令。- 401:管理员密钥不对 —— 确认它是部署时
wrangler secret put MCP_TOKEN设的那个值。 this key is not an admin token:连上了,但这把 Key 只有普通邮箱权限。- 连不上 / 超时:确认服务地址正确且可访问。
- 签发后用户收不到信:确认域名的 Email Routing catch-all 已指向这个 Worker,且地址域名和服务域名一致。
What ships with it
1 file 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.
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 · 90 lines · 84 tokens per session scan A 7973d680a5bf
email-admin is a skill published in the GitHub repository askie/cfmail (0 stars, last pushed 4d ago), licensed MIT. It adds 84 tokens to every session and 1,176 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to email-admin, differing in 4 lines, and is treated as a copy.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…