Install
openclaw skills install @antreasantoniou/mailbutler-agent-skillNarrative-aware, approval-gated inbox triage
openclaw skills install @antreasantoniou/mailbutler-agent-skillFilter every email through a living, evidence-backed model of what currently matters to the owner. Protect attention without silently dropping uncertain mail.
This is an agent skill, not an email client or hosted service. Compose it with an owner-approved mailbox adapter. The examples use gog for Gmail.
see with the limitation.Read references/security-contract.md before changing adapters, persistence, drafting, or sending behavior.
List authorized accounts and choose a recent window. If the user did not specify one, state a conservative default such as unread inbox mail from the last two days.
gog auth list
gog gmail messages search "in:inbox newer_than:2d" --max 40 --json --account <account>
Search each selected account independently. Sort newest first and judge only the newest message in each thread.
Read ~/.mailbutler/narrative.md when present. Create ~/.mailbutler/ with mode 0700 and the file with mode 0600 before first persistence. Treat both as sensitive local state.
Use these sections:
Active arcs: ongoing work or life threads.Open loops: concrete items awaiting action.Watching: people in an active two-way exchange.Facts: durable, decision-relevant context.Corrections: explicit owner feedback about surfacing or suppression.Every entry must carry prov email:<message-id>, confidence, and last-seen date.
Use a configured model already approved for mailbox content. A lower-cost reasoning tier is suitable for structured batch judgments; keep owner-facing synthesis in the main session.
Escalate only when needed:
Return one strict judgment per message:
{
"surface": true,
"score": 88,
"reasons": ["direct question on an active project", "response requested today"],
"recommendedAction": "seeAndReply",
"needMoreContext": false
}
Allowed actions are reply, seeAndReply, see, and nothing. Validate judgments and compute the lede with:
python3 scripts/judgment_tools.py judgments.json
85–100: surface; direct request, active loop, near deadline, or time-sensitive personal matter.60–84: surface; relevant context worth seeing now.35–59: borderline; suppress unless volume is light or the narrative makes it timely.0–34: suppress; promotions, automated digests, receipts without action, and social notifications.Protecting attention is the objective, but uncertainty always surfaces as see.
Lead with the computed lede. Show surfaced messages newest first with sender display name, subject, grounded reasons, action, and account when more than one account is in scope. Then give the suppressed count and at most three examples. Offer the complete audit trail on request.
2 emails worth your time, 1 suggested reply — 18 handled quietly.
SURFACED
1. Project coordinator — Review requested today [Urgent]
why: direct question on an active project; response requested today
→ see & reply
Handled quietly: 18 — e.g. Store receipt — Your receipt, Community digest — Weekly update
Want the complete suppressed list with reasons?
Do not include raw message bodies unless the owner asks.
When the owner approves a draft for one message, derive the reply address and thread from the original message, then stage the draft. Show the exact draft body and resolved recipient before asking whether to send.
gog gmail drafts create --account <account> \
--to "<address-derived-from-original-from-header>" \
--reply-to-message-id <message-id> \
--subject "Re: <original-subject>" \
--body-file -
Only after a second explicit authorization for that draft:
gog gmail drafts send <draft-id> --account <account>
Never use a broad instruction such as “handle my inbox” as permission to draft or send.
After presenting the triage, propose narrative changes. Persist an item only when all checks pass:
arc, open_loop, watching, or fact;0.7;Record explicit corrections as standing rules for later passes. Never commit or publish the narrative.
State which accounts and window were covered. Report authentication failures, quota errors, truncated reads, and skipped attachments. A partial pass is not complete inbox coverage.
This independent open-source agent skill is not affiliated with, endorsed by, or connected to Mailbutler GmbH or its email-extension product.