exe-dev-email-check
Check and process emails on exe.dev VM using Maildir filesystem. Use this when user asks to check emails or when newsletters arrive.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check and process emails on exe.dev VM using Maildir filesystem. Use this when user asks to check emails or when newsletters arrive.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Active crawl workflow — reads hot-topics.yaml, selects high-priority un-crawled topics, deep-dives via web search, creates wiki concept pages, and updates tracking
Analyze Chinese AI media, newsletter, and crawl items for durable trends, source differences, and wiki actions
Triage crawled Chinese AI articles from inbox/ into structured Japanese wiki pages following SCHEMA.md conventions
Upgrade bio-only blogger entity pages to comprehensive thought analysis format
Enrich skeleton X/Twitter account entity pages to full quality (8-15KB), matching antirez-com.md / simon-willison.md depth.
Systematic depth analysis framework for opinion leaders tracking research completion across 4 layers - L1 Profile, L2 Timeline, L3 Thought Analysis, L4 Ongoing Monitoring
| name | exe-dev-email-check |
| description | Check and process emails on exe.dev VM using Maildir filesystem. Use this when user asks to check emails or when newsletters arrive. |
| category | productivity |
| version | 2.0.0 |
| author | hermes |
| license | MIT |
| metadata | {"hermes":{"tags":["Email","Maildir","exe.dev","Newsletter","Automation"]}} |
This VM uses exe.dev's Maildir-based email system. There is NO IMAP/SMTP server. Do NOT use himalaya, mutt, or any mail client.
anything@hermes-topic-manager.exe.xyz (wildcard)~/Maildir/new/~/Maildir/cur/ after initial read~/Maildir/processed/email-watcher service auto-processes newsletters on arrival~/.hermes/processed_emails.json~/.hermes/scripts/check_mail.sh, ~/.hermes/scripts/process_email.pyGmail → Maildir/new/ → email-watcher runs → scrape links → save to wiki/raw/articles/ → move to Maildir/processed/
~/.hermes/scripts/check_mail.sh list
Shows: New count, Unprocessed (cur/) count, Processed count
ls -lt ~/Maildir/new/ ~/Maildir/cur/ ~/Maildir/processed/ 2>&1
new/ has files: fresh emails, not yet seencur/ has files but new/ is empty: emails were seen but may not be processedprocessed/ has files: emails were handled by email-watcher (may need verification)~/.hermes/scripts/check_mail.sh read <filename>
Works for files in all directories
~/.hermes/scripts/check_mail.sh process
This runs process_email.py which checks new/, cur/, AND processed/ directories.
ls -lt ~/wiki/raw/articles/ 2>&1 | head -10
cat ~/.hermes/processed_emails.json | python3 -m json.tool | head -20
The email-watcher service auto-runs process_email.py on new mail arrival:
~/wiki/raw/articles/~/Maildir/processed/~/.hermes/processed_emails.jsonHowever, scraping can fail silently (403 errors, network disconnects). When this happens:
processed/ but IDs are NOT saved to DBwiki/raw/articles/When many emails have accumulated (e.g., 20+):
import json, email, os
from pathlib import Path
processed_dir = Path.home() / "Maildir" / "processed"
db_path = Path.home() / ".hermes" / "processed_emails.json"
# Load DB
with open(db_path) as f:
data = json.load(f)
processed_ids = set(data.get("message_ids", []))
# Find emails in processed/ but NOT in DB
for f in sorted(processed_dir.glob("*.eml")):
if f.stem not in processed_ids:
print(f"Unprocessed: {f.name}")
# Extract URLs from unprocessed emails, then:
web_extract(urls=[url1, url2, url3, url4, url5]) # max 5 per call
Read saved articles from ~/wiki/raw/articles/ and create structured wiki pages in ~/wiki/entities/ or ~/wiki/concepts/.
Email-watcher already saves Substack articles to ~/wiki/raw/articles/ as markdown transcripts:
substack.com--app-link-post--*.md or substack.com--redirect-*.mdread_file — no need to re-scrapeCheck logs: tail -50 ~/logs/email_processor.log
Look for 403 errors, connection timeouts, or network resets.
Run script directly:
cd ~/.hermes/scripts && source venv/bin/activate && python3 process_email.py
cd ~/.hermes/scripts && python3 -m venv venv && source venv/bin/activate && pip install httpx beautifulsoup4 readability-lxml
rm ~/.hermes/processed_emails.json
This will cause all emails to be reprocessed.
web_extract tool for individual URLsweb_extract callsraw/articles/ — read those directlyIf user forwards from Gmail, they must first confirm forwarding via the link in the Gmail Forwarding Confirmation email. Until confirmed, emails won't arrive.
After creating wiki pages, rebuild wiki/index.md with this Python pattern:
from pathlib import Path
import re
wiki_dir = Path.home() / "wiki"
entities = sorted((wiki_dir / "entities").glob("*.md"))
concepts = sorted((wiki_dir / "concepts").glob("*.md"))
comparisons = sorted((wiki_dir / "comparisons").glob("*.md"))
raw_articles = sorted((wiki_dir / "raw" / "articles").glob("*.md"),
key=lambda f: f.stat().st_mtime, reverse=True)
def get_metadata(filepath):
with open(filepath) as f:
content = f.read(500)
title_match = re.search(r'title:\s*"([^"]+)"', content)
return title_match.group(1) if title_match else filepath.stem
# Build index content programmatically, then write to wiki/index.md
Append dated entries to wiki/log.md with format:
## YYYY-MM-DD
- **Summary:** what was processed
- **Pages created:** count and names
- **Updated:** files modified
- **Sources:** raw articles used
Always commit and push after wiki changes:
cd ~/ai-topics-cn && git add wiki/ && git commit -m "wiki: <summary>" && git push
os.path.expanduser() for ~new/ may be empty even if mail was receivedwiki/raw/articles/processed/ directory — emails may be there but never scrapedraw/articles/