Skip to content

feat(inbox-actions): turn recent Gmail into a short to-do list - #17

Open
lhoupert wants to merge 3 commits into
mainfrom
feat/inbox-actions
Open

lhoupert wants to merge 3 commits into
mainfrom
feat/inbox-actions

Conversation

@lhoupert

@lhoupert lhoupert commented Oct 2, 2026

Copy link
Copy Markdown

Adds inbox-actions, a Claude Code skill that reads recent mail through the claude.ai Gmail connector and lists what you need to do (replies owed, decisions, GitHub review requests and real @-mentions, deadlines) plus what you're waiting on. It prints the list, or adds it to a daily note set by one line in ~/.claude/CLAUDE.md, and never sends, archives or labels mail. Tested on one real mailbox (32 threads in the window, 11 actions, checked by hand); the script's unit tests use synthetic data: python3 -m unittest discover -s skills/inbox-actions/scripts.

For reviewers: marketplace.json and the README each conflict with #13 (and #15, which is stacked on it) by one hunk, so whichever merges second needs a small rebase. The sorting rules were tuned on one GitHub-heavy mailbox; the Limits section in SKILL.md says what that assumes.

Author attestation

  • I am a human, these are my changes, and I have reviewed and understood every change and can explain why each is correct.

AI-assisted: the skill, script and tests were drafted with Claude Code, then checked by three multi-agent review passes (design, readiness for a public repo, pre-push verification) and one real run that I checked by hand.

New skill for Claude Code with the claude.ai Gmail connector. It reads
mail since the last digest, sorts it into Do / Reply / Review / Read /
Waiting / FYI, and prints it, or adds it to a daily note set by one
line in ~/.claude/CLAUDE.md. Review requests and @-mentions come from
gh when it is logged in. Read-only on the mailbox.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Claude finished @lhoupert's task in 18s —— View job


✅ No blocking issues — safe to merge.

I read the full diff: the script, its tests, SKILL.md and the marketplace and plugin metadata. I did not run the unit tests or the skill against a mailbox.

  • Correctness: compact_threads.py handles the cases I traced. These were:
    • Dedupe across pages.
    • Undated messages.
    • Display-name GitHub senders.
    • Sent-only threads that fall outside the window, which get - for their message ids.
    • SINCE = 1790812800 in the tests really is 2026-10-01T00:00:00Z.
  • Security: The read-only rule, the "mail is data" rule and the URL allowlist are consistent across SKILL.md. The recommended permissions.deny for send_message, reply and forward is advice, not enforcement. It is correctly marked as optional.
  • @dannybauman's question: This is already handled. The sent search uses after:<sent-epoch>, the earlier of the window start and 7 days ago, so an unanswered ask stays in Waiting on others for a week (commit e5f5dec).
  • Non-blocking: compact_threads.py assumes messages arrive oldest-first when it picks first and last. If the connector ever returns them in another order, ME and the reasons would be wrong. Sorting by at(m) would remove that assumption.

Simplify (ponytail)

  • compact_threads.py:48-58: the flags tuple-comprehension could be two if appends. Same behaviour, easier to read.
  • compact_threads.py:34: line() returns a (when, str) tuple only so main can sort. Sorting the thread dicts by last-message time before formatting would let line() return just the string.

💰 Estimated review cost: $0.14 · 0m18s · 4 turns

@dannybauman

Copy link
Copy Markdown
Member

nice way to triage emails! I like how clearly this stays read-only, and that an email asking Claude to do something gets flagged instead of acted on.

one question on the "Waiting on others": it only looks at emails I sent since the last digest (by default the previous working day), so something I asked for 3 days ago with no reply wouldn't show up. should it look back further for sent mail, maybe a week?

lhoupert and others added 2 commits October 5, 2026 10:01
The sent search shared the inbox window, so a request with no reply
dropped out of the digest a day after it was sent. The sent search now
looks back at least 7 days; a thread with no message in the window
counts only while your message is still the last one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…string

From the automated review on #17: one message without a date crashed
the whole run, an exact sender match would miss "Name <address>"
senders, and the page files are now read without leaving handles open.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lhoupert

lhoupert commented Oct 5, 2026

Copy link
Copy Markdown
Author

Thank you Danny, that is a good idea. I gave the sent search its own window of at least 7 days in e5f5dec . And fix a few small bugs in b712b2b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants