email-mentor AGENTS.md

email-mentor AGENTS.md is an instructions file for Codex, OpenCode from Theia-pro/email-mentor. It costs 1,693 tokens per session, scanned A, original, MIT.

Instructions for a read-only email-organising workflow that translates English messages into Chinese, classifies them, identifies senders and deadlines, and creates reports and calendar files.

In plain words
What is it for?
Use it to locate and parse Thunderbird mail or supplied email files, create Chinese整理清单, extract deadlines into an ICS calendar, and produce weekly or monthly reports.
Why use it?
It turns a mailbox into an actionable record without replying to, deleting, or sending messages.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

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 instructions/theia-pro/email-mentor/agents-md
Clone the repo
git clone --depth 1 https://github.com/Theia-pro/email-mentor

Made for: Codex, OpenCode.

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 email-mentor AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/theia-pro/email-mentor/agents-md.svg)](https://agentmods.dev/instructions/theia-pro/email-mentor/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/theia-pro/email-mentor/agents-md"><img src="https://agentmods.dev/badge/instructions/theia-pro/email-mentor/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,693 This file is loaded in full into every session.
When invoked 1,693 The same file — it is already loaded in full.
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.1 $0.01693 $0.01693
Opus 5 $0.00847 $0.00847
Sonnet 5 $0.00339 $0.00339
Haiku 4.5 $0.00169 $0.00169

Measured 6d ago against content hash 3103cf8e55c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

email-mentor AGENTS.md 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.

AGENTS.md · 120 lines

How it starts

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

邮件管家(Email Mentor)· 通用版

一个与具体 AI 工具无关的邮件整理工作流:把英文邮件翻译成中文、分类、标注发件人、提取处理截止时间(DDL),并生成整理清单、日历文件和可视化报告。只读整理,绝不回复、不删除、不发送任何邮件。

本文件是什么

AGENTS.md 是给所有主流 AI 编程工具读取的通用指令(Codex、Claude Code、Cursor、Gemini CLI、OpenCode 等均支持)。当你(agent)在本项目中工作时,请按本文件的流程执行。

目录约定

  • 邮件数据:优先自动定位 Thunderbird 的本地同步数据(scripts/find_thunderbird.py);备选目录 ~/Documents/EmailMentor/inbox/ 存放用户手动放入的 .eml / .txt / .md
  • 输出目录:~/Documents/EmailMentor/output/
    • 整理清单_YYYY-MM-DD.md:每次整理的中文清单
    • deadlines.ics:DDL 日历文件(可导入飞书/Outlook/Google 日历)
    • weekly_report.md / monthly_report.md:定期汇总报告
    • 邮件报告.html:可视化报告(浏览器直接打开)
    • processed/processed.jsonl:历史处理记录(累积所有已处理邮件的分类、翻译、DDL)

工作流程

第 1 步:定位并解析邮件

先自动定位 Thunderbird 邮件数据:

python scripts/find_thunderbird.py --json
  • 输出 "found": true 时,取第一个 mail_dirs 路径作为解析输入
  • 输出 "found": false 时,提示用户:a) 先启动一次 Thunderbird 完成邮箱登录;b) 或把 .eml/.txt 邮件放入 ~/Documents/EmailMentor/inbox/

然后运行解析脚本,把邮件转成 JSON:

python scripts/parse_mailbox.py --input "<Thunderbird Mail 目录或 inbox 路径>" --output "<输出>/emails.json" [--since YYYY-MM-DD]
  • --since 传入上次处理日期,只处理新邮件
  • 若用户指定了邮件路径,优先使用用户指定的路径

第 2 步:逐封整理(LLM 核心工作)

读取 emails.json,对每一封邮件执行:

  1. 翻译:把正文翻译成通顺的中文摘要(1-3 句),保留关键信息(时间、地点、数字、金额、链接、截止日期)
  2. 分类:按下面的分类体系归入唯一类别
  3. 发件人:标注发件人身份(如"课程教授""学校财务处""公司 HR"),帮助用户判断重要性
  4. 关键词:提取 3-5 个关键词
  5. 重要性:高 / 中 / 低(结合 DDL 紧迫度与发件人身份判断)
  6. DDL:若邮件明确包含截止时间/会议时间/回复期限,提取为 ddltitlestartend,格式 YYYY-MM-DD HH:MM);只有日期没时间就写 YYYY-MM-DD;没有则省略 ddl 字段

整理结果写入 processed/processed.jsonl(新邮件在文件末尾追加一行,不重复记录已处理邮件)。

第 3 步:生成整理清单

输出 整理清单_YYYY-MM-DD.md,包含每封邮件的:日期、发件人(含身份)、主题、翻译摘要、分类、重要性、关键词、DDL,按 DDL 临近程度排序。

第 4 步:生成日历文件

从有 DDL 的邮件生成 .ics 文件:

python scripts/make_calendar.py --input "<输出>/emails_ddl.json" --output "<输出>/deadlines.ics"
  • emails_ddl.json 只包含本次整理中有 DDL 的邮件(脚本会自动提取其中的 ddl 字段,也可直接传入整个 processed.jsonl)
  • 生成后提示用户导入飞书日历(飞书 → 日历 → 设置 → 导入日历)

第 5 步:生成定期汇总(用户要求时)

Read the full file on GitHub · 120 lines

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. 6d ago First seen · 120 lines · 1,693 tokens per session scan A 3103cf8e55c5

Subscribe to this mod's changes

email-mentor AGENTS.md is an instructions file published in the GitHub repository Theia-pro/email-mentor (4 stars, last pushed 1mo ago), licensed MIT. It adds 1,693 tokens to every session, about $0.0085 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.