Dpla monthly emails

From dpla/ingestion3 · View interactive version

Dpla monthly emails is an AI agent skill from the GitHub repository dpla/ingestion3. Generate/preview/draft/send the monthly pre-scheduling summary email to hub contacts scheduled for a month (from i3.conf schedule.months). Use when user asks to send the scheduling email, monthly scheduling email, notify hubs for a month, or pre-scheduling email.

How to use this skill

Skill file

DPLA Monthly Hub Scheduling Emails Skill

Purpose

Generate and send the monthly pre-scheduling email to DPLA hub contacts: one summary email listing all hubs scheduled for that month, the last calendar week date range, and asking for data readiness or skip requests.

When to Use

Activate this skill when the user says:

Overview

At the beginning of each month, DPLA sends one summary email to all contacts of hubs scheduled for that month (from i3.conf). The email:

  1. States that ingests will run during the last calendar week of the month (with concrete date range)
  2. Lists all hubs included that month
  3. Asks contacts to have data ready or to tell DPLA if they need to be skipped or have issues
  4. CC: ingest@dp.la, dominic@dp.la on every send

Source of truth: i3.conf. Hub inclusion is determined by <hub>.schedule.months (e.g. digitalnc.schedule.months = [2, 5, 8, 11]). Empty schedule.months = [] means the hub is never scheduled (on-hold). Contacts come from <hub>.email.

Environment: Run source .env from repo root when using config/paths. See AGENTS.md ยง Environment and build.

Key Files

| Resource | Path |

|----------|------|

| Scheduling email script | scheduler/orchestrator/scheduling_emails.py |

| Draft output dir | scheduler/emails/ |

| i3.conf | $I3_CONF (e.g. ~/dpla/code/ingestion3-conf/i3.conf) |

Workflow: Always Preview Before Send

  1. Show preview first: Run with --dry-run so the user sees:
  1. After the user has seen and accepted the preview, offer:

Agent must always show the preview (date range + hubs list) before sending.

Commands

# Preview for current month (date range, hubs, body)
./venv/bin/python -m scheduler.orchestrator.scheduling_emails --dry-run

# Preview for a specific month (e.g. February = 2)
./venv/bin/python -m scheduler.orchestrator.scheduling_emails --month=2 --dry-run

# Write draft file (after user approves preview)
./venv/bin/python -m scheduler.orchestrator.scheduling_emails --month=2 --draft

# Send via SES (after user approves preview)
./venv/bin/python -m scheduler.orchestrator.scheduling_emails --month=2 --send

Quick Reference

| Task | Command |

|------|---------|

| Preview (current month) | ./venv/bin/python -m scheduler.orchestrator.scheduling_emails --dry-run |

| Preview (February) | ./venv/bin/python -m scheduler.orchestrator.scheduling_emails --month=2 --dry-run |

| Write draft | ./venv/bin/python -m scheduler.orchestrator.scheduling_emails --month=2 --draft |

| Send via SES | ./venv/bin/python -m scheduler.orchestrator.scheduling_emails --month=2 --send |

Documented in scripts/SCRIPTS.md under "Scheduling emails (monthly pre-scheduling notification)".

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.