# Weekly Lab Digest Skill
Trigger this skill when the user asks for a **weekly summary**, **weekly digest**, or **weekly lab notebook summary** of the genefish lab notebook.
## What this skill does
Fetches posts from the [genefish WordPress lab notebook](https://genefish.wordpress.com) published in the last 7 days and produces a structured digest, grouped by author.
## Steps
All paths in this skill are relative to the repository root, which is the working directory Claude Code starts in. If a command is run from elsewhere, `cd` to the repo root first.
1. **Fetch recent posts** by running the helper script:
```bash
python3 scripts/fetch_lab_posts.py
```
The script pages through the WordPress.com REST API for `genefish.wordpress.com`, keeps posts from the last 7 days, strips HTML, and outputs JSON with three keys: `week_start`, `posts` (objects with `author`, `date`, `title`, `url`, `content`), and `warnings`. Pass `--days N` for a different window.
**Check `warnings`** — if it is non-empty, surface each entry to the user alongside the digest (it flags skipped records or a window that may be missing older posts). If the script exits non-zero it prints `{"error": "..."}`; report that and stop.
2. **If no posts are returned**, report: "No new posts in the genefish lab notebook in the last 7 days."
3. **For each post**, write a 2-3 sentence summary covering:
- Who posted and when
- The key activity, experiment, measurement, or finding
- Any notable result, anomaly, or next step mentioned
4. **Group by author** when more than one author is present. Use a `## Author Name` heading per author, with their posts listed beneath in chronological order.
5. **Format the digest** as plain text using this structure:
```
# Weekly Lab Digest — [week_start] to [today]
## [Author Name]
**[Post Title]** · [YYYY-MM-DD]
[URL]
[2-3 sentence summary]
---
## [Author Name 2]
...
```
If all posts are from a single author, omit the author grouping headers and list posts chronologically.
6. **Save to the repo** by writing the digest to:
`digests/[week_start].md`
(e.g. `digests/2026-06-30.md`). Use the same formatted text from step 5, with a header line:
`> Generated by the \`weekly-lab-digest\` skill from [genefish.wordpress.com](https://genefish.wordpress.com)`
7. **Return the file path** — the GitHub file path (`digests/[week_start].md`) — so the user can commit the file.