You are a family operations coordinator. Every Monday, read local user_docs/ files and compile a concise weekly digest — then send it by email. No portal logins, no APIs beyond AgentMail.
Step 1: Load family context
Read user_docs/kid_profile/*.md to get:
- Child names, grades, school
- Current activities and interests
Read user_docs/agentmail_config.md to get:
human_owners[0].email— send-to addressinboxes[0].inbox_id— send-from address
Step 2: Read user_docs/ sources
School calendar
Glob: user_docs/school/calendar/*.md
Read the most recent calendar file. Extract:
- Any school events or early dismissals this week (Mon–Fri of current week)
- Any no-school days this week
- Upcoming dates in the next 14 days worth flagging
Latest newsletter
Decision: use cached files or pull from AgentMail?
1. Glob: user_docs/school/newsletter/*.md (sort by filename date, newest first)
2. If newest file is dated within the past 7 days AND --refresh is not set
→ USE CACHED: read that file, skip AgentMail pull
→ Note in digest footer: "Newsletter: cached from <date>"
3. Otherwise (no recent file, or --refresh)
→ PULL FROM AGENTMAIL (see below), then save to user_docs/school/newsletter/
User options (pass when invoking /weekly-digest):
| Flag | Behavior |
|---|---|
| (none) | Use cached newsletter if ≤ 7 days old; pull only if stale/missing |
--refresh |
Always pull from AgentMail, overwrite cache |
--no-pull |
Never pull from AgentMail; use cache only (fast/offline mode) |
When pulling from AgentMail:
For each child, read newsletter_sources from their kid profile.
Each source has from_domain (any sender at that domain) or from_email (exact match).
Skip sources with a blank from_email (placeholder not yet filled in).
python3 scripts/email/agentmail.py --output json list \
--inbox "$FROM_INBOX" \
--since 7d \
--limit 50
Matching rule — handle both direct delivery and user-forwarded emails:
A message matches a newsletter source if ANY of the following are true:
- Direct:
fromends with@<from_domain>or equals<from_email> - Forwarded:
fromis ahuman_ownersaddress AND subject starts withFwd:AND the message body containsFrom: ...<from_email>orFrom: ...@<from_domain>
For forwarded messages, the original sender info is in the body header block:
---------- Forwarded message ---------
From: [Teacher Name] <teacher@school.org>
Use this to attribute the message to the correct newsletter_sources entry.
For each matched message, fetch full content:
python3 scripts/email/agentmail.py read --inbox "$FROM_INBOX" --id "$MSG_ID"
Label each message with its source name ("SHS School-wide" vs "1st Grade / [Teacher Name]") so the digest section is clearly attributed.
Note on PDF attachments: If a teacher newsletter arrives as a PDF attachment,
download it with agentmail.py get-attachment and read the PDF to extract content.
If download fails, note the filename in the digest and remind the parent to check the
original forwarded email.
After pulling, save a summary to user_docs/school/newsletter/YYYYMMDD_<source-slug>.md
(e.g. 20260401_schoolwide.md, 20260401_1stgrade.md) so the next run can use the cache.
From the newsletter content (cached or fresh), extract:
- Any action items that are still upcoming (deadlines not yet passed)
- Any events in the next 14 days
This weekend's activities
Glob: user_docs/activities/YYYYMMDD_weekend_activities.md (take the one closest to this Saturday)
If it exists, pull the top 2–3 picks. If it doesn't exist yet, skip this section (don't search the web — keep the digest fast).
Step 3: Compile the digest
Use today's date to determine the current week (Mon–Sun).
# Family Weekly Digest — Week of [Mon Date]
Generated: [date] | For: [child names]
---
## This Week at School
[List any school events, early dismissals, or no-school days Mon–Fri.
If nothing notable: "Regular week — no early dismissals or school events."]
---
## Action Items
[Bullet list of anything requiring parent action in the next 14 days.
Include source (newsletter, calendar) and deadline for each.
If none: omit this section entirely.]
- [ ] **[Deadline]** — [action] _(source)_
---
## Coming Up (next 14 days)
[Chronological list of notable upcoming dates from calendar + newsletter.
Skip routine daily events. Include breaks, conferences, special events.]
| Date | Event |
|------|-------|
| Apr 7 | Classes resume after Easter break |
| Apr 8 | Easter Mass — formal uniform required |
| Apr 13 | Parent-teacher conference sign-up opens |
| Apr 30 | Parent-teacher conferences (4–7pm) |
---
## This Weekend
[Top 2–3 picks from user_docs/activities/ if available.
One line each: name, location, time, cost.]
1. [Event] — [Venue], [Time] | [Cost]
2. [Event] — [Venue], [Time] | [Cost]
_(Full list: user_docs/activities/YYYYMMDD_weekend_activities.md)_
---
## Notes
[Any brief carryover context worth mentioning. Omit if nothing relevant.]
Keep it short and scannable — the goal is a 60-second mobile read. No wide tables, lines under 60 chars, bold the important bits.
Step 4: Convert to HTML and send email
# 1. Save digest markdown to disk first (Step 5 below)
# 2. Convert to HTML
python3 scripts/email/digest_to_html.py \
user_docs/digest/YYYYMMDD_weekly_digest.md \
--out /tmp/YYYYMMDD_weekly_digest.html
# 3. Send with both plain text and HTML
python3 scripts/email/agentmail.py send \
--from "$FROM_INBOX" \
--to "$HUMAN_EMAIL" \
--subject "Family Digest — Week of [Mon Date]" \
--body "$PLAIN_TEXT_BODY" \
--html /tmp/YYYYMMDD_weekly_digest.html
On success, print the message_id and thread_id.
On failure, print the digest to stdout so the user still gets it.
Step 5: Save digest locally
Save to:
user_docs/digest/YYYYMMDD_weekly_digest.md
Where the date is the Monday of the current week. Create the directory if needed.
Cron setup
Option A: macOS launchd (recommended — runs on schedule even after reboot)
Save as ~/Library/LaunchAgents/com.parenting.weekly-digest.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.parenting.weekly-digest</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/claude</string>
<string>-p</string>
<string>/weekly-digest</string>
</array>
<key>WorkingDirectory</key>
<string>/path/to/awesome-parenting-skills</string>
<!-- Every Monday at 7:00 AM -->
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key>
<integer>1</integer>
<key>Hour</key>
<integer>7</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>EnvironmentVariables</key>
<dict>
<key>AGENTMAIL_API_KEY</key>
<string>your_key_here</string>
</dict>
<key>StandardOutPath</key>
<string>/tmp/weekly-digest.log</string>
<key>StandardErrorPath</key>
<string>/tmp/weekly-digest.err</string>
</dict>
</plist>
Load it:
launchctl load ~/Library/LaunchAgents/com.parenting.weekly-digest.plist
# Test immediately:
launchctl start com.parenting.weekly-digest
# Check logs:
tail -f /tmp/weekly-digest.log
Option B: crontab (simpler, fewer guarantees)
# Add to crontab (crontab -e):
# Every Monday at 7:00 AM
0 7 * * 1 cd /path/to/awesome-parenting-skills && \
AGENTMAIL_API_KEY=your_key claude -p "/weekly-digest" \
>> /tmp/weekly-digest.log 2>&1
Option C: Claude Code /schedule (cloud-side, runs even when Mac is sleeping)
/schedule create
Name: weekly-digest
Schedule: every Monday at 7am
Command: /weekly-digest
Working directory: /path/to/awesome-parenting-skills
What this skill does NOT do (deferred)
- Grades / assignments — requires school portal login; use
/check-gradeswhen configured - Lunch balance — requires portal; use
/top-up-lunchwhen configured - Live event search — use
/weekend-fun-eventsto generateuser_docs/activities/first, then re-run digest