albert-ying/agentic-cortex/email-sync

Claude Code and agent skill by albert-ying/agentic-cortex

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Sync Gmail messages into vault manifest. Runs at session start.

Install

npx vskill@latest install albert-ying/agentic-cortex/email-sync

SKILL.md

Email Sync Adapter

Pulls recent emails from Gmail, diffs against snapshot, produces a manifest of vault note updates.

When to Use

Called by the /sync router. Not invoked directly.

Process

1. Pull Emails

Two queries:

  1. gmail_search_messages(query="in:inbox -category:promotions -category:social", maxResults=25) — active inbox
  2. gmail_search_messages(query="in:sent newer_than:7d", maxResults=25) — recent sent

For high-signal threads (starred, from known collaborators, with action items), call gmail_read_message to get full thread content.

2. Load Snapshot

Read .cache/sync-state/email-snapshot.json. If missing, treat all emails as new.

Snapshot format:

json
{
"synced_at": "2026-03-12T10:00:00Z",
"threads": {
"<thread_id>": {
"subject": "...",
"last_message_id": "...",
"participants": ["..."],
"summary": "...",
"starred": false
}
}
}
3. Diff
  • New threads: thread ID not in snapshot
  • Updated threads: thread ID exists but last_message_id differs (new replies)
  • Newly starred: starred status changed
4. Match Against Vault Index

Load .cache/sync-state/vault-index.json.

For each new/updated thread:

  1. Extract keywords from: subject line, sender name, recipient names, email body
  2. Match against vault index using keyword overlap
  3. For person names (From/To/CC), check type: "person" matches
  4. Read full content of top candidate notes
  5. Determine which notes need updating
5. Generate Manifest

Person notes (user.*.md):

  • Action: rewrite_section, section: ## Current Status
  • Content: Latest interaction context from email thread
  • Evidence: subject, date, direction (sent/received)
  • Confidence: 0.9+ for known contacts, 0.75 for ambiguous name matches

Project notes (proj.*.md, personal.grant.*.md, etc.):

  • Action: rewrite_section on status/progress sections
  • Content: Status updates derived from email content
  • Confidence: 0.85+ if subject/body clearly references the project

Working memory (_working-memory.md):

  • Action: rewrite_section, section: ## Email Inbox — Active Items (synced YYYY-MM-DD)
  • Content: Triaged inbox — "### Needs Action", "### Scheduled", "### Tracking"
  • Each item: checkbox, subject summary, sender, priority, vault link if person exists
  • Confidence: 1.0

Context model follow-ups:

  • For emails with detected action items or deadlines, emit changes targeting

the relevant notes rather than context model directly (the vault-updater handles cross-note synthesis)

6. Save Manifest and Update Snapshot

Write manifest to .cache/sync-state/email-manifest-<timestamp>.json. Update snapshot with current thread state.

Triage Logic

Priority assignment for inbox items:

  • HIGH: Starred emails, deadlines within 7 days, emails from important contacts awaiting response
  • MEDIUM: Project-related emails, invitations, requests from known contacts
  • LOW: FYI, newsletters that made it to inbox, tracking items

If the vault index includes a tier field on person notes, use it to boost priority for high-tier contacts. This is optional — the adapter works without tier data.

Output

The manifest JSON file path, printed to stdout.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
25
Repository forks
4
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/albert-ying/agentic-cortex/email-sync/badge)](https://verified-skill.com/skills/albert-ying/agentic-cortex/email-sync)

Something wrong with this skill or its page? Tell us.