lotfb86/memory-kb · Archived

memory-email-ingest

Ingest emails from calendar contacts using Gmail MCP tools — calendar-gated to prevent spam/noise

First seen Jun 18, 2026

Installation

$ npx skills add lotfb86/memory-kb --skill memory-email-ingest

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from lotfb86/memory-kb.

npx skills add lotfb86/memory-kb

Browse all from lotfb86/memory-kb

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,797 B
  • docs SUMMARY.md 126 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Calendar-Gated Email Ingest for Memory Knowledge Base

Ingest emails ONLY from people Jesse has meetings with. Uses Gmail MCP tools (not Chrome).

Prerequisites

The calendar contacts file must exist at /Users/jesseanglen/Documents/RandomStuff/memory-kb/state/calendar-contacts.json. If it doesn't exist or has zero contacts, report "No calendar contacts found. Run /memory-calendar-ingest first." and exit.

Process

1. Load State & Contacts

Read calendar contacts from /Users/jesseanglen/Documents/RandomStuff/memory-kb/state/calendar-contacts.json. Read email state from /Users/jesseanglen/Documents/RandomStuff/memory-kb/state/email-state.json (create if missing).

Extract the list of known contact email addresses.

2. Search Gmail via MCP

Use gmailsearchmessages to find emails from known contacts.

Build the query: after:YYYY/MM/DD from:({email1 OR email2 OR email3 ...})

The after: date should be the lastcheckedtimestamp from email state, or 3 days ago if first run.

If there are many contacts (50+), split into multiple gmailsearchmessages calls with batches of ~25 emails each.

Set maxResults to 50.

3. Read Each Matching Email

For each message returned by the search, use gmailreadmessage with the messageId to get full content.

Extract:

  • Subject
  • Sender (name and email)
  • Date/time
  • Body content — focus on decisions, action items, requests, important context

Skip trivial emails:

  • One-liners like "OK", "Thanks", "Got it", "Sounds good"
  • Calendar confirmations/invitations (auto-generated)
  • Auto-replies and out-of-office messages
  • Marketing/newsletter content

4. Look Up Related Calendar Event

For each sender email, check calendar-contacts.json for their lastseen date. Use this to populate the relatedevent field — connects the email to the meeting context.

5. Append to Daily Log

For each substantive email, append to /Users/jesseanglen/Documents/RandomStuff/memory-kb/daily/YYYY-MM-DD.md:

## Email from [email protected] @ HH:MM PT
**source:** email
**subject:** [Subject line]
**from:** Name <email>
**related_event:** [Most recent event with this contact, from calendar-contacts.json]

### Key Content
- [Summary of important information, decisions, or requests]
- [Action items mentioned]
- [Important context or commitments]

### Action Items
- [ ] [Any follow-up tasks identified]

If the daily log doesn't exist, create it with header # Daily Log: YYYY-MM-DD.

6. Deduplication

Track processed email message IDs in email-state.json (keep last 500). Before appending, check for duplicate entries in the daily log (same subject + sender + date).

7. Update State

Write to /Users/jesseanglen/Documents/RandomStuff/memory-kb/state/email-state.json:

{
  "last_checked_timestamp": "ISO timestamp",
  "total_runs": N,
  "last_run": {
    "timestamp": "ISO",
    "emails_found": N,
    "emails_ingested": N,
    "contacts_matched": N,
    "status": "success"
  },
  "processed_message_ids": ["id1", "id2"]
}

8. Report

"Email ingest complete. Found X emails from calendar contacts, ingested Y substantive entries."

Important Notes

  • Uses gmailsearchmessages and gmailreadmessage MCP tools — NO Chrome browser needed
  • ONLY ingest emails from addresses in calendar-contacts.json — this is the core spam filter
  • Skip trivial emails (one-liners, calendar confirmations, auto-replies)
  • Focus extraction on decisions, commitments, action items, important context
  • If zero emails match, that's fine — log it and exit normally