--- name: today-news description: > Generate a fresh morning news digest from the web based on user interests. Use when the user asks for daily news, morning news, latest updates, a news briefing, or wants to track a topic, company, market, or technology. Trigger phrases: "give me morning news", "what's happening in AI today", "set up daily news", "today's news about fintech". Environment: this is the Claude / Cowork variant — it renders `show_widget` and `AskUserQuestion`. In ChatGPT Work, where every form is an inline `ask_user_input` / `genui` surface and `show_widget` does not exist, use `today-news-with-gpt` instead. Environment triggers: "Today News in Claude", "the Claude version", "Claude Today News". allowed-tools: WebSearch, WebFetch, show_widget, mcp__xtiles__xtiles_create_tiles_from_markdown_in_my_planner, mcp__xtiles__xtiles_get_planner_content, mcp__xtiles__xtiles_get_page_layout, mcp__xtiles__xtiles_set_page_layout, mcp__xtiles__xtiles_get_workflow, mcp__xtiles__xtiles_get_user_timezone, AskUserQuestion, anthropic-skills:schedule, mcp__scheduled-tasks__create-scheduled-tasks --- # Today News Generate a fresh morning digest from live web sources based on the user's interests. ## Core behavior - **Primary source: WebSearch + WebFetch.** Never use memory for current events. - Match the language of the user's request throughout. On a **scheduled run** there is no user request: use the language of the scheduled-task config prompt (`topics:`), defaulting to English when unclear. Every template, label, and example in this file is an English placeholder — translate them into the detected language, and never emit a label in a language the user has not used. - Default scope: global, last 24 hours. - **News** — verified against reputable primary sources (Reuters, AP, Bloomberg, FT, TechCrunch). Never aggregators or PR. - **Rumors & Leaks** (optional) — unverified tips from X/Twitter, Reddit, insider blogs. Always labeled as unverified. - Never invent events, dates, quotes, metrics, names, or URLs. - **Every write to the planner is immediately followed by a layout pass — automatically, no exceptions.** The instant tiles are added in step 5, re-lay-out only those new tiles into a justified grid (step 5's layout pass, via the shared `tile-layout` workflow) *before* anything else — before the CTA button, before the schedule widget, before any message to the user. This never waits for the user to ask, is never skipped as "not needed this time," and is never left for a later run. --- ## Algorithm **Run mode — detect before step 1:** - **Scheduled run**: incoming message contains `topics:` and `schedule:`. Skip setup. Extract topics and flags (`verify`, `rumors`), search the web, write the digest to today's xTiles Daily. Also skip step 4 (preview) and step 6 (schedule widget) — the task is already scheduled. - **Fast-track**: user names a specific topic ("news about AI"). Skip setup — infer topic and jump to step 3. - **Setup**: general request ("set up daily news", "I want morning news"). Run the full flow. --- ### 1. Analyze interests Infer 4–6 likely topics from conversation context — the user's role, companies or products they mentioned, tools they use. If no context is available, default to: AI & product, tech industry, startups, business. ### 2. Suggest topics Build the **Topic widget HTML** (see below) with inferred topic labels. Call `show_widget`. The widget lets the user: - Select topic chips and/or type a custom topic - Toggle **Verify sources** — enables cross-checking of stories from unreliable or outdated outlets - Toggle **Rumors & Leaks** — adds a separate section with unverified tips from X, Reddit, and insider blogs `submit()` sends all selections and toggle states via `sendPrompt()`. ### 3. Search **Verified news (always):** For each topic run `WebSearch`: - Tech/AI → `site:techcrunch.com OR site:theverge.com OR site:wired.com` - Finance → `site:bloomberg.com OR site:ft.com OR site:reuters.com` - General → `site:reuters.com OR site:apnews.com OR site:bbc.com` Query: `[topic] news [today OR "last 24 hours"] [domain filters]` Fetch top 2–3 results per topic with `WebFetch`. Extract: headline + publication + date, 2–3 sentence summary, URL. Deduplicate by URL. Drop: opinion without a news hook, PR content, anything older than 48 h. **If "Verify sources" is on:** For each story, assess source reputation and publication date. If the outlet is questionable or the date is ambiguous, run a corroborating `WebSearch` to confirm the event. Mark each story: ✅ verified or ⚠️ could not corroborate. **Rumors & Leaks (if opted in):** Run a parallel search per topic: - Sources: `site:x.com OR site:reddit.com OR site:9to5mac.com OR site:macrumors.com OR site:androidauthority.com` - Query: `[topic] leak OR rumor OR exclusive OR insider [today OR this week]` - Fetch top 1–2 results. Extract claim, source, corroboration clues. Always label as **unverified**. **Cross-day deduplication:** before finalising, call `mcp__xtiles__xtiles_get_planner_content` with `period: "day"` and yesterday's date (ISO 8601). Scan the returned tile content for any hyperlink URLs. Drop any story from today's results whose URL already appeared yesterday — the same news must not repeat on consecutive days. ### 4. Preview Show the assembled digest using the **Preview widget HTML** (see below). Claude builds the full widget HTML dynamically — inject the actual news content into `#digest` following the injection pattern in the template comment. The widget has three actions: - **Save to xTiles** — triggers step 5 - **Change something** — reveals a text field; user submits correction text which re-enters the flow - **Cancel** — ends the flow **Never show the digest as plain text — always use the Preview widget.** ### 5. Write to xTiles Tool: `mcp__xtiles__xtiles_create_tiles_from_markdown_in_my_planner` - `period`: `"day"` - `date`: today in ISO 8601 - `markdown`: approved digest (one News tile + optional Rumors tile) **After a successful write — run these steps in order, no exceptions. Step 1 (the layout pass) is not optional and is never deferred, asked about, or judgment-called away — it runs automatically, immediately after every single write, before the CTA button is even composed:** 1. **Layout pass — mandatory, silent, automatic, every single run (scheduled runs included, fast-track included, any tile count included).** Using the `view_id` and `tile_ids` returned by the write call above (`tile_ids` is ordered to match the News/Rumors sections you just wrote — 1 or 2 entries), apply the shared justified-grid layout rules: call `mcp__xtiles__xtiles_get_workflow` with id `tile-layout` and follow it exactly — treat the tiles in `tile_ids` as its "added tiles" and the markdown you just composed as their content. **Layout hints for this workflow:** 1–2 tiles (News + optional Rumors) · if both, place side by side in one row when they fit, else News gets the wider share · News is the heavier tile. Do not message the user about this pass, do not ask for confirmation, and never skip it — not even for a single tile or a scheduled run. (You may fetch `tile-layout` once per session and reuse it on later runs.) 2. Call `mcp__xtiles__xtiles_get_planner_content`, get `view_id`, show the **CTA widget HTML** with `{VIEW_URL}` = `https://xtiles.app/{view_id}`. ### 6. Schedule (optional) For non-scheduled runs only: after every successful write — show the **Schedule widget HTML**. If the user schedules: invoke `anthropic-skills:schedule`, then `mcp__scheduled-tasks__create-scheduled-tasks`: - `prompt`: `Run today-news — topics: {topics} · flags: verify={true/false} rumors={true/false} · schedule: daily-{time}` - `schedule`: parse `cron: HH:MM` from the widget message and build `M H * * *` (the widget always schedules every day) - `timezone`: from `mcp__xtiles__xtiles_get_user_timezone` If the user declines — acknowledge briefly. Either way, continue to **step 7 (Related workflows)** — do not stop here. ### 7. Related workflows **After every manual run, once step 6 is resolved** (scheduled or declined) — offer related workflows. Skip this on scheduled runs, which end silently after step 5. Ask via `AskUserQuestion` (single select): "Want to set up anything else on xTiles?" - 🌅 Daily Brief — a live morning brief from your connected tools - 🌙 Evening Reflection — an end-of-day synthesis seeded for tomorrow - 📊 Weekly Review — a weekly summary of what moved forward this week - Nothing else, thanks **Never list these as plain text requiring the user to retype a choice — always use the interactive question.** On selection, send the exact matching phrase to hand off to that skill (do not attempt to run it yourself): - Daily Brief → `Set workflow of Daily Brief (daily-brief) on xTiles MCP` - Evening Reflection → `Set workflow of Evening Reflection (evening-reflection) on xTiles MCP` - Weekly Review → `Set workflow of Weekly Review (weekly-review) on xTiles MCP` - "Nothing else" — acknowledge briefly and stop. --- ## Digest format All content goes into **one News tile** (max two tiles total — News + optional Rumors). Do not create a separate tile per topic. **News tile** — all topics in one tile: ```markdown ### 📰 Today's News @colorSize: LIGHTER @color: CUMULUS **AI & Product** **[Headline — Source](URL)** ✅ [2–3 sentence summary] **[Headline — Source](URL)** ⚠️ [2–3 sentence summary] **Tech Industry** **[Headline — Source](URL)** [2–3 sentence summary] ``` Omit ✅/⚠️ status markers if "Verify sources" was off. If no news found for a topic, write: ``` **[Topic]** No news found in the last 24 hours. ``` **Rumors & Leaks tile** — all topics in one tile (only if opted in): ```markdown ### 🕵️ Rumors & Leaks @colorSize: LIGHTER @color: MILK_PUNCH ⚠️ *Unverified — based on X posts, Reddit, or insider blogs* **AI & Product** **[Claim — Source](URL)** [1–2 sentence summary] **Tech Industry** **[Claim — Source](URL)** [1–2 sentence summary] ``` - Write all tiles in a **single** xTiles call - `@colorSize` is always `LIGHTER` - News tile always uses `CUMULUS`; Rumors tile always uses `MILK_PUNCH` --- ## Topic widget HTML Build dynamically: replace `[Topic N]` with inferred labels (4–6 chips). Include only as many `.chip` divs as there are inferred topics. ```html
I'll fetch fresh news and write Today's News to xTiles automatically.