refs-ingestlisted
Install: claude install-skill fantasybz/trip-pwa-skills
# refs-ingest
Add a 行前預習 reference into a trip PWA. These are the videos and articles a
parent watches the night before — the "今晚先看" card under each day.
Each ref lands in `refs.json` under `schedule_refs[<day>]`; `render.js` reads
`refs.schedule_refs[activeDayId]` to fill the collapsible. So a ref is bound to a
day (its `context`), not a clock time.
## Steps
1. **Get the URL.** The user gives a YouTube / Vimeo / blog / Reel link. For
YouTube, refs-ingest fetches the title automatically via oEmbed (no API key).
For a blog or when oEmbed is unavailable, pass `--title` (use /browse to read
the page title first).
2. **Run the engine** with the URL + the day it preps:
```bash
bun skills/refs-ingest/refs-ingest.ts --out <trip-dir> \
--url <link> --day day_2 [--title "..."] [--lang zh-tw] \
[--kid-friendly true] [--duration-min 6] [--summary "<1-line>"]
```
`--day` (or batch `context`) is always required: the current renderer shows
only `schedule_refs[activeDayId]`, so a synthetic `general` bucket would be
invisible. For a trip-wide article, choose one primary preparation day and
explain its scope in `summary`; other days need distinct, day-specific sources
because duplicate URLs are forbidden across schedule refs.
3. **Report** which day the ref was added to (or that it was skipped as a dup).
## Entry shape (matches Tokyo refs.json)
```jsonc
{
"type": "youtube|vimeo|reel|article", // inferred from the URL host
"title": "..."