gws-weekly-digestlisted
Install: claude install-skill laojin1900/365Skill
# gws Weekly Digest
Produce a recurring weekly briefing from a user's mailbox and calendar:
last week's mail statistics plus the next seven days of events, rendered as
a structured markdown digest with attention recommendations.
Default posture: **strictly read-only**. Never send, delete, or modify mail
or events while producing a digest.
## Prerequisites
- `gws` CLI installed and authenticated (`gws auth status` → `oauth2`).
If not, stop and point the user to the gws setup; do not attempt OAuth
yourself. The stderr line `Using keyring backend: keyring` is normal.
- A scheduler if the digest should recur (cron, an agent automation
platform, or CI). This skill produces the digest; scheduling is the
host environment's job.
## Data Collection
1. **Week boundaries first.** Compute from the run date in the user's
timezone: last week = previous Monday 00:00 → this Monday 00:00;
events window = today 00:00 → +7 days. State both windows in the output.
2. **Mail stats** (Gmail `q` operators):
```bash
gws gmail users messages list --params '{"userId":"me","q":"after:YYYY/MM/DD before:YYYY/MM/DD","maxResults":100}'
gws gmail users messages list --params '{"userId":"me","q":"after:YYYY/MM/DD before:YYYY/MM/DD is:unread","maxResults":100}'
```
Sample up to ~30 messages (prioritize unread, skip noreply/newsletter
senders) with `format: "metadata"` and
`metadataHeaders: ["Subject","From","Date"]` for the reply-candidate list.
3. **Calendar**:
`