Use this skill for any request about email operations via CLI, including mailcli usage, IMAP/SMTP setup, inbox triage, searching/reading/sending mail, draft flows, attachment download, mailbox management, and mail troubleshooting.
Use this skill for any request about email operations via CLI, including mailcli usage, IMAP/SMTP setup, inbox triage, searching/reading/sending mail, draft flows, attachment download, mailbox management, and mail troubleshooting.
Trigger even when users do not explicitly say "mailcli" but clearly want command-line email workflows.
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Read [install.md](references/install.md) before first use. 首次使用前先阅读 [install.md](references/install.md)。
Default install command:
npm install -g @yupingwang/mailcli
Execution Policy / 执行策略
Always use mailcli as the command entrypoint.
Prefer direct execution for the user task; avoid unnecessary confirmation loops.
Validate parameters before executing risky or state-changing commands.
Keep commands explicit and reproducible in output.
固定使用 mailcli 作为入口命令。
默认直接执行,避免不必要的确认回合。
对高风险或写操作命令先做参数校验。
输出时保留可复现的命令文本。
Core Workflow / 核心流程
Identify the operation category.
Load the relevant reference file(s) only.
Build command(s) with scripts/buildmailclicmd.sh when helpful.
Validate argument constraints with scripts/validatemailcliargs.sh.
Execute command(s), then summarize result and next action.
识别任务类型。
仅加载相关 reference 文件。
必要时用 scripts/buildmailclicmd.sh 生成命令。
用 scripts/validatemailcliargs.sh 校验参数约束。
执行命令并汇总结果与下一步。
Command Rules / 命令规则
Respect runtime behavior from the project implementation.
For send:
- --reply-all requires --reply-uid - --quote requires --reply-uid - --body and --body-file are mutually exclusive - At least one recipient is required (unless inferred from reply flow) - A message body (plain/html/quote result) is required
For UID operations (read, delete, move, tag, draft send, attachments download), UID must be a positive integer.
For auth login, omitted fields are interactive in TTY mode; in non-interactive mode defaults are used where available and required fields must be passed explicitly.
auth keychain-init is a macOS Keychain probe command and requires keychain backend enabled.