GitHub 通知自动分拣
/install github-triage
GitHub Triage
Automatically classify and route GitHub notification emails.
Prerequisites
mail-cliinstalled (npm i -g @clawemail/mail-cli) with API key configured- Email channel plugin (
@clawmail/email) enabled in OpenClaw - A dedicated sub-mailbox for GitHub notifications (created via setup script)
Setup
Run the setup script to create the sub-mailbox:
bash scripts/setup.sh [prefix]
prefix— sub-mailbox prefix (default:ghbot)
Main email (for receiving urgent forwards and daily summaries) is automatically resolved at runtime via:
mail-cli clawemail master-user
After setup:
- Add the new sub-mailbox as an email channel account in
openclaw.json→channels.email.accounts - Go to GitHub → Settings → Notifications → Custom routing → set email to
\x3Cworkspace>[email protected] - Restart OpenClaw gateway
Triage Workflow
When an email arrives on the ghbot account:
- Identify priority — read subject and body, match against rules in
references/triage-rules.md - Act on priority:
- P0 (urgent): Resolve main email via
mail-cli clawemail master-user, then forward immediately viamail-cli --profile ghbot compose send; prepend[紧急]to subject - P1 (buffer): Append to today's buffer file at
memory/gh-triage-buffer-YYYY-MM-DD.json; do NOT reply or forward - P2 (archive): Mark as read via
mail-cli --profile ghbot mail mark --ids \x3Cid> --fid 1 --read; no reply
- P0 (urgent): Resolve main email via
Forwarding (P0)
First, resolve the main email:
MAIN_EMAIL=$(mail-cli clawemail master-user)
Then forward:
mail-cli --profile ghbot compose send \
--to "$MAIN_EMAIL" \
--subject "[紧急] \x3Coriginal-subject>" \
--body "\x3Coriginal-body>" \
--html
Buffering (P1)
Append entry to workspace file memory/gh-triage-buffer-YYYY-MM-DD.json:
[
{
"repo": "owner/repo",
"type": "review_request",
"title": "PR title",
"number": 123,
"url": "https://github.com/...",
"author": "username",
"receivedAt": "ISO-8601"
}
]
Read existing file first (create [] if missing), append new entry, write back.
Archiving (P2)
mail-cli --profile ghbot mail mark --ids "\x3Cmessage-id>" --fid 1 --read
No reply, no forward.
Daily Summary
A cron job fires daily at the configured time (default 0 18 * * *). The job:
- Resolve main email:
MAIN_EMAIL=$(mail-cli clawemail master-user) - Read
memory/gh-triage-buffer-YYYY-MM-DD.jsonfor today - If empty or missing → do nothing
- Group entries by repo and type
- Compose summary email following format in
references/triage-rules.md→ "Daily Summary Format" - Send via
mail-cli --profile ghbot compose send --to "$MAIN_EMAIL" --subject "[GitHub 日报] ..." --body "..." --html - After successful send, rename buffer file to
memory/gh-triage-buffer-YYYY-MM-DD.sent.json
Cron Setup
Create the daily summary cron job in OpenClaw:
schedule: { kind: "cron", expr: "0 18 * * *", tz: "Asia/Shanghai" }
sessionTarget: "isolated"
payload: { kind: "agentTurn", message: "Run GitHub triage daily summary. Read today's buffer file, compose and send the summary email." }
Configuration
- main_email — automatically resolved at runtime via
mail-cli clawemail master-user; no manual configuration needed - summary_time — cron expression for daily summary (default:
0 18 * * *)
Detailed Rules
See references/triage-rules.md for complete matching patterns and output formats.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install github-triage - 安装完成后,直接呼叫该 Skill 的名称或使用
/github-triage触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
GitHub 通知自动分拣 是什么?
GitHub notification auto-triage via email channel. Classifies incoming GitHub notification emails into three tiers: (1) CI failures and security alerts → imm... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 123 次。
如何安装 GitHub 通知自动分拣?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install github-triage」即可一键安装,无需额外配置。
GitHub 通知自动分拣 是免费的吗?
是的,GitHub 通知自动分拣 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
GitHub 通知自动分拣 支持哪些平台?
GitHub 通知自动分拣 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 GitHub 通知自动分拣?
由 DevincodeL(@devincodel)开发并维护,当前版本 v1.0.1。