# Cron Job: yt-sitrep-linus-tech-tips

**Job ID:** d65b12892111
**Run Time:** 2026-06-09 07:10:29
**Schedule:** 0 7 * * *

## Prompt

[IMPORTANT: The user has invoked the "youtube-channel-sitreps" skill, indicating they want you to follow its instructions. The full skill content is loaded below.]

---
name: youtube-channel-sitreps
description: "Create recurring YouTube channel sitreps and deliver them to Telegram."
platforms: [linux, macos, windows]
---

# YouTube Channel Sitreps

Use this skill when the user wants a recurring or one-off briefing based on one or more YouTube channels: latest upload, short summary, and a concluding assessment of why it matters in the channel's broader domain.

This is a **briefing workflow**, not a transcript workflow. Use the YouTube content skill for transcript extraction when you need video-level detail; use this skill when the goal is channel monitoring, editorial curation, or scheduled sitreps.

## Typical outputs

- Daily/weekly channel sitreps (compact format)
- **Nieuws24 format** (thematic groups with bold titles + short explanation per item, max 5 videos, concluding takeaway)
- Telegram-delivered briefings
- Multi-channel comparative briefings

## Core workflow

1. **Resolve the channel**
   - Prefer the canonical channel URL or handle.
   - **Verify the channel ID.** The user may provide a wrong UC ID. Use web_search to find the actual `@handle` and extract the correct `UC...` channel ID from the channel's about page or search snippets. Multiple channels can share similar names — verify subscriber count and content theme.
   - Use the channel's `/videos` page to identify the latest public upload.

2. **Extract the minimum useful facts**
   - Latest video title
   - Publish time / freshness (prefer exact ISO dates over relative "X days ago")
   - 1-sentence summary of the video
   - 2-3 recent channel highlights if relevant

   **Workflow priority (try in order):**

   A. **YouTube RSS feed** — `https://www.youtube.com/feeds/videos.xml?channel_id=<VALID_UC_ID>`. When the channel ID is correct, the RSS feed returns reliable data including exact ISO 8601 publish dates, view counts, star ratings, and full descriptions (including chapters). Parse with `grep -E "(<title>|<yt:videoId>|<published>|<media:statistics)"` for a quick overview. The RSS feed is faster than any other method, avoids bot detection entirely, and gives exact dates (not relative timestamps). **RSS works for most channels with a valid UC ID.** If it returns 404, first re-verify the channel ID before concluding RSS is broken.

   B. **curl + CONSENT cookie bypass** — if RSS is confirmed unavailable for this channel. See `references/youtube-sitrep-workflow.md` for the full curl command, JSON path map, and oEmbed recipe.

   C. **FALLBACK (browser)** — only when both RSS and curl fail. YouTube browser sessions loop back to the consent screen because the consent cookie doesn't persist across isolated Hermes browser sessions. Use `browser_console` with JS expression `document.querySelector('a[href*="/watch"]')?.href` to extract the first video URL without relying on the accessibility snapshot.

3. **Add the editorial conclusion**
   - End with a short conclusion about what the latest video means in the channel's wider niche or industry.
   - Keep the conclusion specific, not generic.

4. **Keep it compact**
   - The briefing should be readable in a phone notification.
   - Prefer bullets and short sentences.

## Telegram delivery pattern

When the user asks for scheduled delivery to Telegram:

- Use a cron job with a stable, class-level name.
- Default naming pattern: `yt-sitrep-<channel-slug>`.
- Deliver in the user's language unless they explicitly ask otherwise.
- If the user wants Belgium time, use `Europe/Brussels` and `0 9 * * *`.

## Pitfalls

- Do **not** turn this into a transcript dump.
- Do **not** over-explain the channel; the goal is a sitrep, not a long essay.
- Do **not** invent context that is not supported by the latest upload or recent channel activity.
- If a channel has no meaningful new upload, say so briefly and stop.
- **Channel ID must be correct.** A 404 on the RSS feed often means the channel ID is wrong, not that RSS is unavailable. Verify the channel ID before assuming RSS is broken. The `@handle` from YouTube (with underscores, dashes) is more reliable than a user-stated UC ID.
- **RSS feed is preferred over curl when it works.** RSS gives exact ISO dates, view counts, and full descriptions — no consent cookie needed, no bot detection. Only fall back to curl+CONSENT when the channel ID is verified and RSS still fails.
- **Browser consent loop.** YouTube's consent page (`consent.youtube.com`) loops infinitely in headless browser sessions because the consent cookie doesn't persist across isolated sessions. Prefer RSS or curl+CONSENT-cookie over `browser_navigate` for channel scraping.
- **Accessibility tree truncation.** YouTube's `/videos` page snapshot may not include the `href` of video links in the accessibility tree. Use `browser_console` with JS expressions (not `browser_snapshot`) to extract video URLs when browser fallback is necessary.
- **Localized titles.** The ytInitialData title field may be in a localized language based on the CONSENT cookie locale (e.g., `NL` → Dutch). Verify with the oEmbed API for the original uploader title.
- **[SILENT] delivery for cron jobs.** When running as a cron job and no new videos exist since the last run, respond with exactly `[SILENT]` (nothing else) to suppress delivery. Never combine [SILENT] with content — either report findings normally or deliver [SILENT] alone.

## Related skills

- `youtube-content` for transcript extraction and video-to-text transformation.

## Reference material

See `references/youtube-sitrep-workflow.md` for the reusable briefing template, naming convention, and Telegram cron pattern.

The user has provided the following instruction alongside the skill invocation: [IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more.]

Check the Linus Tech Tips YouTube channel at https://www.youtube.com/@LinusTechTips for new videos since the last run. Output in nieuws24 format: thematic groups with short title+explanation per item, up to 5 videos max, concluding takeaway. After creating the digest, write the full output to /opt/data/cron/output/yt-linustechtips/YYYY-MM-DD.md (create dirs if needed). Then EMAIL the same content to tomstynen@gmail.com with subject "YT Sitrep - Linus Tech Tips - YYYY-MM-DD" using the GAPI script at /opt/data/skills/productivity/google-workspace/scripts/google_api.py. Only skip email if the Gmail API fails — still write the local file. If there are NO new videos since last run, write "No new videos" to the file and skip the email.

## Response

No memory in cron context — understood. Here's my final report.

---

## YT Sitrep — Linus Tech Tips — 2026-06-09

**5 most recent uploads:**

### 🍎 Apple & AI
**Apple was LATE on AI… It was Worth the Wait - WWDC '26** — WWDC '26: Apple kondigt brede Siri-AI-integratie aan — concerttickets, vakanties, visuele intelligentie. Grootste aankondiging van het event. (12k views, vandaag)

### 🌐 Internet Infrastructuur
**I Visited the Cradle of the Internet** — Linus bezoekt Equinix-datacenters in Ashburn, VA — een kijkje in het fysieke internet. (379k views)

### 🏭 Enterprise Hardware
**The Biggest Test Bench I've Ever Seen** — ASUS' datacenter-R&D-lab met 100kW+ servers; NVIDIA Vera Rubin NVL72 hardware. (405k views)

### 🎙️ Nieuws & Discussie
**Google's Best Feature In Years - WAN Show June 5, 2026** — Wekelijkse tech-talk met Luke en Linus. (117k views)

### 💻 PC Experiments
**Submerging a PC In Liquid** — Kan je een PC in olie dompelen? LTT test het. Meest bekeken met 1.77M views.

**📌 Conclusie:** LTT dekt deze week een brede waaier: van WWDC-analyse tot datacenter-tours en labexperimenten. De WWDC '26 video is de meest impactvolle — Apple's AI-inhaalslag kan de sector dit jaar hertekenen. De olie-immersie-test trok het meeste publiek: hands-on experimenten blijven LTT's sterkste kaart.

**✅ Lokale file:** `/opt/data/cron/output/yt-linustechtips/2026-06-09.md` — geschreven
**✅ Email:** verzonden naar tomstynen@gmail.com met onderwerp "YT Sitrep - Linus Tech Tips - 2026-06-09"
