[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D6HMEH3M82F9B5ZN2CD5G0":3,"skill-same:01M7D6HMEH3M82F9B5ZN2CD5G0":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":13,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M7D6HMEH3M82F9B5ZN2CD5G0","digest",null,"Generate and send a digest on a configurable topic, optionally pulling RSS\u002FAtom feeds as an input source alongside web + X signal","LiamVisionary\u002Faeon-template","LiamVisionary","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F102138294?v=4","01M73379NZZ99TT4ZS17XR3Q9D","01M7D6D62V1SGGMKGT08Q1D2R8",0,"MIT","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fdigest\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: digest\ndescription: Generate and send a digest on a configurable topic, optionally pulling RSS\u002FAtom feeds as an input source alongside web + X signal\nmetadata:\n  title: Digest\n  mode: write\n  category: basics\n  var: \"\"\n  tags:\n    - content\n    - news\n  requires:\n    - XAI_API_KEY?\n---\n\u003C!-- autoresearch: variation B — curatorial discipline (filter → distill → structure → sanity-check) folded with direct-curl xAI + web\u002FRSS inputs and memory-aware dedup; RSS feed-reading + item-selection absorbed from rss-digest as an additional source class -->\n\n> **${var}** — Selects the digest's topic and which source classes feed it. Grammar:\n> - `\"\"` (empty) → **digest's default sources** (WebSearch + xAI\u002FGrok + aggregators), no topic filter — a broad daily digest.\n> - `\"\u003Ctopic>\"` → topic-focused digest on the default web sources, filtered to `\u003Ctopic>` (e.g. `\"solana\"`, `\"AI agents\"`, `\"rust\"`).\n> - `\"rss\"` → **RSS-only**: pull feeds from `memory\u002Ffeeds.yml`, no topic filter.\n> - `\"rss: \u003Ctopic>\"` → RSS-only, filtered to `\u003Ctopic>` (e.g. `\"rss: rust\"`).\n> - `\"\u003Ctopic> +rss\"` → default web sources **and** RSS feeds combined, both filtered to `\u003Ctopic>` (e.g. `\"AI agents +rss\"`).\n\nToday is ${today}. Generate and send a daily **${var}** digest.\n\nThe whole point of a digest is **signal, not volume**. A reader skimming for 60 seconds should walk away with three things they didn't know that morning and one of them should change a decision they'd make this week. Anything that doesn't clear that bar gets cut.\n\n## Preamble — orient and parse the selector\n\n1. Read `memory\u002FMEMORY.md` for high-level context and tracked topics, and scan the last 3 days of `memory\u002Flogs\u002F` so you can dedup against anything already reported.\n2. Parse `${var}` into **`{topic, sources}`**:\n   - Strip a trailing `+rss` → adds RSS to the default web sources. Remainder is the `topic`.\n   - A leading `rss:` (or the bare token `rss`) → **RSS-only** source set; text after the colon is the `topic` (empty = no filter).\n   - Otherwise the whole string is the `topic` and `sources = default web` (empty string = default web, no topic filter).\n   - Resulting `sources` is one of: `web` (default), `rss` (RSS-only), or `web+rss` (both).\n3. The `topic`, when non-empty, is a filter applied to **every** source class — web queries are scoped to it and RSS items must match it (title\u002Fdescription\u002Ftags). Empty topic = keep all relevant items.\n\n## Config (RSS source)\n\nWhen `sources` includes `rss`, this skill reads feed URLs from `memory\u002Ffeeds.yml`. If the file doesn't exist yet, create it (write mode) with the shape below, or — if you have nothing to seed it with — log a one-line note and treat the RSS source as empty for this run.\n\n```yaml\n# memory\u002Ffeeds.yml\nfeeds:\n  - name: Example Feed\n    url: https:\u002F\u002Fexample.com\u002Frss\n  - name: Another Feed\n    url: https:\u002F\u002Fexample.com\u002Fatom.xml\n```\n\n## Phase 1 — Gather (cast a wide net)\n\nPull from the source classes selected by `${var}`. Never rely on a single one — if `sources = web`, use at least two of the web classes below; if `sources = web+rss`, RSS counts as one class and you still want a second.\n\n### Web sources (active when `sources` is `web` or `web+rss`)\n\n1. **WebSearch** (built-in) — run 2 distinct queries:\n   - `\"${topic}\" news ${today}` (broad). If `topic` is empty, run a general query for the day's notable stories in the operator's tracked areas (from `memory\u002FMEMORY.md`).\n   - One narrower query you choose based on `${topic}` (e.g. for \"solana\" → `\"solana\" launches OR funding OR exploit ${today}`; for \"AI agents\" → `\"agent framework\" OR \"agentic\" release ${today}`).\n2. **xAI x_search via Grok** — pulls the X\u002FTwitter signal layer. `XAI_API_KEY` is injected into this skill's environment (declared in `requires:`) and is the **primary** path; see **Fetching the X signal** below for the full contract (attempt the curl before any fallback, set the Bash tool `timeout` ≥180000, record the true failure reason).\n\n   **Path A — X.AI API (primary):** a direct `curl` to the Responses API. First confirm the key with `[ -n \"$XAI_API_KEY\" ] && echo KEY_PRESENT || echo KEY_UNSET`; if `KEY_PRESENT` (it will be), this path is required. When you run the curl, set the Bash tool's `timeout` to at least `180000`.\n   ```bash\n   FROM_DATE=$(date -u -d \"yesterday\" +%Y-%m-%d 2>\u002Fdev\u002Fnull || date -u -v-1d +%Y-%m-%d)\n   TO_DATE=$(date -u +%Y-%m-%d)\n   PROMPT=\"Search X for substantive, recent posts about: ${topic:-the most notable technology, AI, and crypto stories today}. Date range: $FROM_DATE to $TO_DATE. Return up to 10 high-signal posts — prioritize verifiable claims, launches, funding, releases, exploits, or hard data over hot takes. For EACH post return: @handle, the full text, date posted, exact engagement counts (likes, retweets, replies; 0 if unknown), and the direct link https:\u002F\u002Fx.com\u002Fhandle\u002Fstatus\u002FID. Return a numbered list.\"\n   jq -n --arg p \"$PROMPT\" --arg fd \"$FROM_DATE\" --arg td \"$TO_DATE\" \\\n     '{model:\"grok-4.6\", input:[{role:\"user\",content:$p}], tools:[{type:\"x_search\",from_date:$fd,to_date:$td}]}' \\\n     > \u002Ftmp\u002Fxai-digest-payload.json\n   HTTP=$(.\u002Fsecretcurl -s -o \u002Ftmp\u002Fxai-digest.json -w '%{http_code}' --max-time 150 -X POST \"https:\u002F\u002Fapi.x.ai\u002Fv1\u002Fresponses\" \\\n     -H \"Content-Type: application\u002Fjson\" -H \"Authorization: Bearer {XAI_API_KEY}\" -d @\u002Ftmp\u002Fxai-digest-payload.json)\n   echo \"xai http=$HTTP bytes=$(wc -c \u003C\u002Ftmp\u002Fxai-digest.json)\"\n   ```\n   On `HTTP=200` with a non-empty body, parse it with `jq -r '.output[] | select(.type == \"message\") | .content[] | select(.type == \"output_text\") | .text'` and feed each post (handle, text, engagement, permalink) into the web-candidate pool. A slow curl is **not** a missing key — do not treat a timeout as key-unavailable.\n\n   **Path B — WebFetch\u002FWebSearch fallback (last resort, lower quality):** only if the key is `KEY_UNSET`, or Path A returned a non-2xx \u002F empty body \u002F timeout. Attempt a WebFetch to a public X search URL like `https:\u002F\u002Fx.com\u002Fsearch?q=${topic}&f=live`, or a `site:x.com \"\u003Ctopic>\" after:${FROM_DATE}` WebSearch; extract a few top posts and prefer results within the last 48h. Record the **true reason** (`key-unset` | `http-\u003Ccode>` | `empty` | `timeout`) in the log — never \"XAI_API_KEY unavailable\" when the key was set. If this also returns nothing, skip the X source for this run.\n3. **WebFetch on a topic-relevant aggregator** (only if WebSearch returned thin results): e.g. `https:\u002F\u002Fnews.ycombinator.com\u002F`, `https:\u002F\u002Fwww.reddit.com\u002Fr\u002F\u003Ctopic>\u002Ftop\u002F?t=day.json`, or a known feed for the topic.\n\nAim for **~15 raw web candidates** at this stage. More is fine; fewer than 8 is a warning sign — broaden your queries before moving on.\n\n### RSS source (active when `sources` is `rss` or `web+rss`)\n\nRead `memory\u002Ffeeds.yml` for the feed list. For **each feed** in `feeds.yml`:\n\n1. Fetch the RSS\u002FAtom XML: `curl -sL \"FEED_URL\"`. If curl fails, fall back to **WebFetch** on the same URL.\n2. Parse for entries published in the **last 24h** (check `\u003CpubDate>` or `\u003Cupdated>` tags).\n3. Extract **title, link, and description** for each new entry.\n\nDeduplicate against recent logs (see Phase 2). From all new entries, select the **5–7 most interesting** items — prioritize topics tracked in `memory\u002FMEMORY.md`, and apply the `${topic}` filter when set (title\u002Fdescription\u002Ftags must match). For each selected item, if the summary is too thin, use **WebFetch** to pull the full article, then write a 1–2 sentence note on why it matters. These become RSS candidates entering the shared pipeline below.\n\nIf `sources = rss` and there are **no new items across all feeds**, log `RSS_DIGEST_OK` in the run log and end without notifying.\n\n## Phase 2 — Filter (kill the noise)\n\nPool every candidate (web + RSS) and drop any that fails a single check:\n\n- **No source link?** Drop it. Every surviving item must have a clickable URL (article URL, feed entry link, or `https:\u002F\u002Fx.com\u002Fhandle\u002Fstatus\u002FID`).\n- **Older than 36 hours?** Drop it unless it's a still-developing story being re-surfaced for a new reason. (RSS entries are already scoped to the last 24h; this catches stale web results.)\n- **Pure speculation, hot take, or \"X reacts to Y\"?** Drop it. Keep things with a verifiable claim, named entity, number, release, or transaction.\n- **Already covered in the last 3 daily logs?** Check `memory\u002Flogs\u002F` for entries from the last 3 days. If the same story (same headline subject, same primary actor) appears, drop the duplicate unless there's a material new development to report.\n- **Two sources telling the same story?** Keep one — prefer the primary source (announcement post, repo release, official filing) over the recap. A web hit and an RSS entry on the same event count as duplicates; keep the primary.\n\nTarget: ~5–8 survivors after this pass.\n\n## Phase 3 — Distill and structure (force the shape)\n\nPick the **3–5 strongest** items. Lead with the **single most actionable** one — the item where a reader can do something today (subscribe, sell, fork, attend, apply, watch). Then descend by importance.\n\nFormat the digest exactly like this (**unified format** — used for `web`, `rss`, and `web+rss` runs):\n\n```\n*${var} — ${today}*\n\n_TL;DR: \u003Cone sentence covering the day's gravity. Concrete, no adjectives.>_\n\n1. *\u003CHeadline-style title, ≤90 chars>*\n   \u003C1–2 sentence summary. Lead with what happened, not who said it.>\n   Why it matters: \u003Cone short clause — concrete consequence, not vibes>\n   \u003Clink>\n\n2. *\u003CTitle>*\n   ...\n\n3. *\u003CTitle>*\n   ...\n\n(Optional, only if there's genuine secondary signal:)\n*Also worth a glance:* \u003C1-line bullet> · \u003C1-line bullet>\n```\n\n**Format rules:**\n- Markdown only. No emoji. No \"Here's your digest\" preamble.\n- Total length: **≤3000 chars** (the old 4000 was too loose — discipline forces cuts).\n- Every item: title + summary + link. Include a \"Why it matters\" line whenever you can state a concrete consequence (price impact, user-facing change, upstream dependency, deadline, precedent). If you can't write one without hand-waving, **omit the line** — do not replace it with filler like \"this could be significant\" or \"watch this space\".\n- On thin-news days where fewer than 3 items clear the bar: log `DIGEST_FETCH_EMPTY` (or `DIGEST_THIN` if 1–2 items survived) in the run log and **skip the notification** rather than padding.\n\n**Alternate RSS layout (RSS-only runs):** when `sources = rss`, you may instead group items by feed name if that reads better than a single ranked list — this preserves the original RSS-digest presentation:\n\n```\n*RSS Digest — ${today}*\n\n*Feed Name*\n- [Title](url) — summary\n- [Title](url) — summary\n\n*Feed Name*\n- [Title](url) — summary\n```\n\nThe grouped RSS layout stays **≤4000 chars**. Prefer the unified ranked format when the run mixes sources (`web+rss`) so the reader gets one prioritized list.\n\n## Phase 4 — Sanity-check (last pass before sending)\n\nBefore calling `.\u002Fnotify`, walk this checklist mentally:\n\n- [ ] Lead item is the most actionable one I have, not just the most dramatic.\n- [ ] Every link resolves to a real URL (no `[link]` placeholders, no truncated IDs).\n- [ ] No item is paraphrasing a hot take — each has a verifiable underlying fact.\n- [ ] No two items are the same story under different angles (including a web hit + an RSS entry on the same event).\n- [ ] Char count under the limit for the chosen format (3000 unified \u002F 4000 grouped RSS).\n- [ ] No emoji slipped in. No corporate hedging (\"could potentially\", \"it remains to be seen\").\n\nIf the digest fails any check, fix it before sending. If after filtering you have **fewer than 3 strong items**, do not pad — send a shorter \"thin day\" digest with whatever survived and a one-line note acknowledging it was a quiet news day. Do not invent or stretch.\n\n## Phase 5 — Send and log\n\n1. Send via `.\u002Fnotify \"\u003Cdigest body>\"`.\n2. Append to `memory\u002Flogs\u002F${today}.md` under **one** `### digest` heading:\n   ```\n   ### digest (${var})\n   - Source mode: \u003Cweb | rss | web+rss>\n   - Sources used: \u003Clist — e.g. WebSearch, xAI API (api|fallback:reason), feeds.yml (Feed A, Feed B)>\n   - Raw candidates: \u003CN> (web \u003CNw> \u002F rss \u003CNr>), after filter: \u003CM>, sent: \u003CK>\n   - Lead item: \u003Ctitle>\n   - Notes: \u003Canything unusual — xAI fetch fallback + true reason (http-\u003Ccode>\u002Fempty\u002Ftimeout\u002Fkey-unset), thin day (DIGEST_THIN\u002FDIGEST_FETCH_EMPTY), RSS_DIGEST_OK, dedup against prior log>\n   ```\n3. Update `memory\u002FMEMORY.md` \"Recent Digests\" table with one row: date, topic (or `${var}`), key topics (3 short keywords).\n\n## Fetching the X signal\n\n`XAI_API_KEY` is **injected into this skill's environment** (declared in `requires:`) and is **present and valid**. The primary way to pull the X\u002FTwitter signal layer is a **direct `curl` to `https:\u002F\u002Fapi.x.ai\u002Fv1\u002Fresponses`** with `Authorization: Bearer {XAI_API_KEY}` (see Phase 1 → Path A). There is **no network sandbox** blocking this — just make the call.\n\nRules:\n\n1. **Check, don't assume.** Run `[ -n \"$XAI_API_KEY\" ] && echo KEY_PRESENT || echo KEY_UNSET`. If `KEY_PRESENT` (it will be), Path A is required before any fallback.\n2. **Allow enough time.** Grok's `x_search` typically takes 30–120s (it searches X live). Set the Bash tool's `timeout` to at least **180000 (180s)** for the curl, and keep **`--max-time 150`** on the curl itself so it fails cleanly rather than hanging. A slow curl is **not** a missing key — never treat a timeout as key-unavailable.\n3. **Capture the HTTP status** and parse the body with the standard `jq` extractor (`jq -r '.output[] | select(.type == \"message\") | .content[] | select(.type == \"output_text\") | .text'`). `HTTP=200` + non-empty body → use it.\n4. **Fall back only on a real failure**, recording the **true reason**: `key-unset` (only if step 1 said `KEY_UNSET`), `http-\u003Ccode>` (non-2xx), `empty` (200 but nothing parsed), or `timeout` (curl exceeded `--max-time`). Never log \"XAI_API_KEY unavailable\" when the key was set.\n\nWebFetch \u002F WebSearch are **last-resort fallbacks only** for the X signal (lower quality — WebSearch favours older high-engagement posts). Never reach for them while the key works.\n\n**RSS feeds & public aggregators (no auth):** fetch with `curl -sL`; if that fails intermittently, the built-in **WebFetch** tool is a reliable fallback for any feed URL, aggregator (HN, Reddit JSON, news sites), or article. This is a convenience fallback for unauthenticated URLs, not a sandbox workaround. A digest built from WebSearch + reachable RSS alone is still valid — note it in the log so health checks can spot the pattern.\n\n## Environment Variables Required\n\n- `XAI_API_KEY` — X.AI API key for Grok's `x_search`. Declared in `requires:`, so it is **injected into this skill's environment** and is the primary path for the X signal layer (direct `curl`; see **Fetching the X signal**). Optional overall — digest still works on web + RSS sources alone if it is ever unset.\n- Notification channels configured via repo secrets (see CLAUDE.md).\n\n## Constraints\n\n- Never send a digest with placeholder links or \"TBD\" sections.\n- Never invent items to hit a target count. Fewer good items beats more weak ones.\n- Never repeat a story already in the last 3 days of `memory\u002Flogs\u002F` unless there's a material update — and say so explicitly when you do.\n","\u003C!-- autoresearch: variation B — curatorial discipline (filter → distill → structure → sanity-check) folded with direct-curl xAI + web\u002FRSS inputs and memory-aware dedup; RSS feed-reading + item-selection absorbed from rss-digest as an additional source class -->\n\n> **${var}** — Selects the digest's topic and which source classes feed it. Grammar:\n> - `\"\"` (empty) → **digest's default sources** (WebSearch + xAI\u002FGrok + aggregators), no topic filter — a broad daily digest.\n> - `\"\u003Ctopic>\"` → topic-focused digest on the default web sources, filtered to `\u003Ctopic>` (e.g. `\"solana\"`, `\"AI agents\"`, `\"rust\"`).\n> - `\"rss\"` → **RSS-only**: pull feeds from `memory\u002Ffeeds.yml`, no topic filter.\n> - `\"rss: \u003Ctopic>\"` → RSS-only, filtered to `\u003Ctopic>` (e.g. `\"rss: rust\"`).\n> - `\"\u003Ctopic> +rss\"` → default web sources **and** RSS feeds combined, both filtered to `\u003Ctopic>` (e.g. `\"AI agents +rss\"`).\n\nToday is ${today}. Generate and send a daily **${var}** digest.\n\nThe whole point of a digest is **signal, not volume**. A reader skimming for 60 seconds should walk away with three things they didn't know that morning and one of them should change a decision they'd make this week. Anything that doesn't clear that bar gets cut.\n\n## Preamble — orient and parse the selector\n\n1. Read `memory\u002FMEMORY.md` for high-level context and tracked topics, and scan the last 3 days of `memory\u002Flogs\u002F` so you can dedup against anything already reported.\n2. Parse `${var}` into **`{topic, sources}`**:\n   - Strip a trailing `+rss` → adds RSS to the default web sources. Remainder is the `topic`.\n   - A leading `rss:` (or the bare token `rss`) → **RSS-only** source set; text after the colon is the `topic` (empty = no filter).\n   - Otherwise the whole string is the `topic` and `sources = default web` (empty string = default web, no topic filter).\n   - Resulting `sources` is one of: `web` (default), `rss` (RSS-only), or `web+rss` (both).\n3. The `topic`, when non-empty, is a filter applied to **every** source class — web queries are scoped to it and RSS items must match it (title\u002Fdescription\u002Ftags). Empty topic = keep all relevant items.\n\n## Config (RSS source)\n\nWhen `sources` includes `rss`, this skill reads feed URLs from `memory\u002Ffeeds.yml`. If the file doesn't exist yet, create it (write mode) with the shape below, or — if you have nothing to seed it with — log a one-line note and treat the RSS source as empty for this run.\n\n```yaml\n# memory\u002Ffeeds.yml\nfeeds:\n  - name: Example Feed\n    url: https:\u002F\u002Fexample.com\u002Frss\n  - name: Another Feed\n    url: https:\u002F\u002Fexample.com\u002Fatom.xml\n```\n\n## Phase 1 — Gather (cast a wide net)\n\nPull from the source classes selected by `${var}`. Never rely on a single one — if `sources = web`, use at least two of the web classes below; if `sources = web+rss`, RSS counts as one class and you still want a second.\n\n### Web sources (active when `sources` is `web` or `web+rss`)\n\n1. **WebSearch** (built-in) — run 2 distinct queries:\n   - `\"${topic}\" news ${today}` (broad). If `topic` is empty, run a general query for the day's notable stories in the operator's tracked areas (from `memory\u002FMEMORY.md`).\n   - One narrower query you choose based on `${topic}` (e.g. for \"solana\" → `\"solana\" launches OR funding OR exploit ${today}`; for \"AI agents\" → `\"agent framework\" OR \"agentic\" release ${today}`).\n2. **xAI x_search via Grok** — pulls the X\u002FTwitter signal layer. `XAI_API_KEY` is injected into this skill's environment (declared in `requires:`) and is the **primary** path; see **Fetching the X signal** below for the full contract (attempt the curl before any fallback, set the Bash tool `timeout` ≥180000, record the true failure reason).\n\n   **Path A — X.AI API (primary):** a direct `curl` to the Responses API. First confirm the key with `[ -n \"$XAI_API_KEY\" ] && echo KEY_PRESENT || echo KEY_UNSET`; if `KEY_PRESENT` (it will be), this path is required. When you run the curl, set the Bash tool's `timeout` to at least `180000`.\n   ```bash\n   FROM_DATE=$(date -u -d \"yesterday\" +%Y-%m-%d 2>\u002Fdev\u002Fnull || date -u -v-1d +%Y-%m-%d)\n   TO_DATE=$(date -u +%Y-%m-%d)\n   PROMPT=\"Search X for substantive, recent posts about: ${topic:-the most notable technology, AI, and crypto stories today}. Date range: $FROM_DATE to $TO_DATE. Return up to 10 high-signal posts — prioritize verifiable claims, launches, funding, releases, exploits, or hard data over hot takes. For EACH post return: @handle, the full text, date posted, exact engagement counts (likes, retweets, replies; 0 if unknown), and the direct link https:\u002F\u002Fx.com\u002Fhandle\u002Fstatus\u002FID. Return a numbered list.\"\n   jq -n --arg p \"$PROMPT\" --arg fd \"$FROM_DATE\" --arg td \"$TO_DATE\" \\\n     '{model:\"grok-4.6\", input:[{role:\"user\",content:$p}], tools:[{type:\"x_search\",from_date:$fd,to_date:$td}]}' \\\n     > \u002Ftmp\u002Fxai-digest-payload.json\n   HTTP=$(.\u002Fsecretcurl -s -o \u002Ftmp\u002Fxai-digest.json -w '%{http_code}' --max-time 150 -X POST \"https:\u002F\u002Fapi.x.ai\u002Fv1\u002Fresponses\" \\\n     -H \"Content-Type: application\u002Fjson\" -H \"Authorization: Bearer {XAI_API_KEY}\" -d @\u002Ftmp\u002Fxai-digest-payload.json)\n   echo \"xai http=$HTTP bytes=$(wc -c \u003C\u002Ftmp\u002Fxai-digest.json)\"\n   ```\n   On `HTTP=200` with a non-empty body, parse it with `jq -r '.output[] | select(.type == \"message\") | .content[] | select(.type == \"output_text\") | .text'` and feed each post (handle, text, engagement, permalink) into the web-candidate pool. A slow curl is **not** a missing key — do not treat a timeout as key-unavailable.\n\n   **Path B — WebFetch\u002FWebSearch fallback (last resort, lower quality):** only if the key is `KEY_UNSET`, or Path A returned a non-2xx \u002F empty body \u002F timeout. Attempt a WebFetch to a public X search URL like `https:\u002F\u002Fx.com\u002Fsearch?q=${topic}&f=live`, or a `site:x.com \"\u003Ctopic>\" after:${FROM_DATE}` WebSearch; extract a few top posts and prefer results within the last 48h. Record the **true reason** (`key-unset` | `http-\u003Ccode>` | `empty` | `timeout`) in the log — never \"XAI_API_KEY unavailable\" when the key was set. If this also returns nothing, skip the X source for this run.\n3. **WebFetch on a topic-relevant aggregator** (only if WebSearch returned thin results): e.g. `https:\u002F\u002Fnews.ycombinator.com\u002F`, `https:\u002F\u002Fwww.reddit.com\u002Fr\u002F\u003Ctopic>\u002Ftop\u002F?t=day.json`, or a known feed for the topic.\n\nAim for **~15 raw web candidates** at this stage. More is fine; fewer than 8 is a warning sign — broaden your queries before moving on.\n\n### RSS source (active when `sources` is `rss` or `web+rss`)\n\nRead `memory\u002Ffeeds.yml` for the feed list. For **each feed** in `feeds.yml`:\n\n1. Fetch the RSS\u002FAtom XML: `curl -sL \"FEED_URL\"`. If curl fails, fall back to **WebFetch** on the same URL.\n2. Parse for entries published in the **last 24h** (check `\u003CpubDate>` or `\u003Cupdated>` tags).\n3. Extract **title, link, and description** for each new entry.\n\nDeduplicate against recent logs (see Phase 2). From all new entries, select the **5–7 most interesting** items — prioritize topics tracked in `memory\u002FMEMORY.md`, and apply the `${topic}` filter when set (title\u002Fdescription\u002Ftags must match). For each selected item, if the summary is too thin, use **WebFetch** to pull the full article, then write a 1–2 sentence note on why it matters. These become RSS candidates entering the shared pipeline below.\n\nIf `sources = rss` and there are **no new items across all feeds**, log `RSS_DIGEST_OK` in the run log and end without notifying.\n\n## Phase 2 — Filter (kill the noise)\n\nPool every candidate (web + RSS) and drop any that fails a single check:\n\n- **No source link?** Drop it. Every surviving item must have a clickable URL (article URL, feed entry link, or `https:\u002F\u002Fx.com\u002Fhandle\u002Fstatus\u002FID`).\n- **Older than 36 hours?** Drop it unless it's a still-developing story being re-surfaced for a new reason. (RSS entries are already scoped to the last 24h; this catches stale web results.)\n- **Pure speculation, hot take, or \"X reacts to Y\"?** Drop it. Keep things with a verifiable claim, named entity, number, release, or transaction.\n- **Already covered in the last 3 daily logs?** Check `memory\u002Flogs\u002F` for entries from the last 3 days. If the same story (same headline subject, same primary actor) appears, drop the duplicate unless there's a material new development to report.\n- **Two sources telling the same story?** Keep one — prefer the primary source (announcement post, repo release, official filing) over the recap. A web hit and an RSS entry on the same event count as duplicates; keep the primary.\n\nTarget: ~5–8 survivors after this pass.\n\n## Phase 3 — Distill and structure (force the shape)\n\nPick the **3–5 strongest** items. Lead with the **single most actionable** one — the item where a reader can do something today (subscribe, sell, fork, attend, apply, watch). Then descend by importance.\n\nFormat the digest exactly like this (**unified format** — used for `web`, `rss`, and `web+rss` runs):\n\n```\n*${var} — ${today}*\n\n_TL;DR: \u003Cone sentence covering the day's gravity. Concrete, no adjectives.>_\n\n1. *\u003CHeadline-style title, ≤90 chars>*\n   \u003C1–2 sentence summary. Lead with what happened, not who said it.>\n   Why it matters: \u003Cone short clause — concrete consequence, not vibes>\n   \u003Clink>\n\n2. *\u003CTitle>*\n   ...\n\n3. *\u003CTitle>*\n   ...\n\n(Optional, only if there's genuine secondary signal:)\n*Also worth a glance:* \u003C1-line bullet> · \u003C1-line bullet>\n```\n\n**Format rules:**\n- Markdown only. No emoji. No \"Here's your digest\" preamble.\n- Total length: **≤3000 chars** (the old 4000 was too loose — discipline forces cuts).\n- Every item: title + summary + link. Include a \"Why it matters\" line whenever you can state a concrete consequence (price impact, user-facing change, upstream dependency, deadline, precedent). If you can't write one without hand-waving, **omit the line** — do not replace it with filler like \"this could be significant\" or \"watch this space\".\n- On thin-news days where fewer than 3 items clear the bar: log `DIGEST_FETCH_EMPTY` (or `DIGEST_THIN` if 1–2 items survived) in the run log and **skip the notification** rather than padding.\n\n**Alternate RSS layout (RSS-only runs):** when `sources = rss`, you may instead group items by feed name if that reads better than a single ranked list — this preserves the original RSS-digest presentation:\n\n```\n*RSS Digest — ${today}*\n\n*Feed Name*\n- [Title](url) — summary\n- [Title](url) — summary\n\n*Feed Name*\n- [Title](url) — summary\n```\n\nThe grouped RSS layout stays **≤4000 chars**. Prefer the unified ranked format when the run mixes sources (`web+rss`) so the reader gets one prioritized list.\n\n## Phase 4 — Sanity-check (last pass before sending)\n\nBefore calling `.\u002Fnotify`, walk this checklist mentally:\n\n- [ ] Lead item is the most actionable one I have, not just the most dramatic.\n- [ ] Every link resolves to a real URL (no `[link]` placeholders, no truncated IDs).\n- [ ] No item is paraphrasing a hot take — each has a verifiable underlying fact.\n- [ ] No two items are the same story under different angles (including a web hit + an RSS entry on the same event).\n- [ ] Char count under the limit for the chosen format (3000 unified \u002F 4000 grouped RSS).\n- [ ] No emoji slipped in. No corporate hedging (\"could potentially\", \"it remains to be seen\").\n\nIf the digest fails any check, fix it before sending. If after filtering you have **fewer than 3 strong items**, do not pad — send a shorter \"thin day\" digest with whatever survived and a one-line note acknowledging it was a quiet news day. Do not invent or stretch.\n\n## Phase 5 — Send and log\n\n1. Send via `.\u002Fnotify \"\u003Cdigest body>\"`.\n2. Append to `memory\u002Flogs\u002F${today}.md` under **one** `### digest` heading:\n   ```\n   ### digest (${var})\n   - Source mode: \u003Cweb | rss | web+rss>\n   - Sources used: \u003Clist — e.g. WebSearch, xAI API (api|fallback:reason), feeds.yml (Feed A, Feed B)>\n   - Raw candidates: \u003CN> (web \u003CNw> \u002F rss \u003CNr>), after filter: \u003CM>, sent: \u003CK>\n   - Lead item: \u003Ctitle>\n   - Notes: \u003Canything unusual — xAI fetch fallback + true reason (http-\u003Ccode>\u002Fempty\u002Ftimeout\u002Fkey-unset), thin day (DIGEST_THIN\u002FDIGEST_FETCH_EMPTY), RSS_DIGEST_OK, dedup against prior log>\n   ```\n3. Update `memory\u002FMEMORY.md` \"Recent Digests\" table with one row: date, topic (or `${var}`), key topics (3 short keywords).\n\n## Fetching the X signal\n\n`XAI_API_KEY` is **injected into this skill's environment** (declared in `requires:`) and is **present and valid**. The primary way to pull the X\u002FTwitter signal layer is a **direct `curl` to `https:\u002F\u002Fapi.x.ai\u002Fv1\u002Fresponses`** with `Authorization: Bearer {XAI_API_KEY}` (see Phase 1 → Path A). There is **no network sandbox** blocking this — just make the call.\n\nRules:\n\n1. **Check, don't assume.** Run `[ -n \"$XAI_API_KEY\" ] && echo KEY_PRESENT || echo KEY_UNSET`. If `KEY_PRESENT` (it will be), Path A is required before any fallback.\n2. **Allow enough time.** Grok's `x_search` typically takes 30–120s (it searches X live). Set the Bash tool's `timeout` to at least **180000 (180s)** for the curl, and keep **`--max-time 150`** on the curl itself so it fails cleanly rather than hanging. A slow curl is **not** a missing key — never treat a timeout as key-unavailable.\n3. **Capture the HTTP status** and parse the body with the standard `jq` extractor (`jq -r '.output[] | select(.type == \"message\") | .content[] | select(.type == \"output_text\") | .text'`). `HTTP=200` + non-empty body → use it.\n4. **Fall back only on a real failure**, recording the **true reason**: `key-unset` (only if step 1 said `KEY_UNSET`), `http-\u003Ccode>` (non-2xx), `empty` (200 but nothing parsed), or `timeout` (curl exceeded `--max-time`). Never log \"XAI_API_KEY unavailable\" when the key was set.\n\nWebFetch \u002F WebSearch are **last-resort fallbacks only** for the X signal (lower quality — WebSearch favours older high-engagement posts). Never reach for them while the key works.\n\n**RSS feeds & public aggregators (no auth):** fetch with `curl -sL`; if that fails intermittently, the built-in **WebFetch** tool is a reliable fallback for any feed URL, aggregator (HN, Reddit JSON, news sites), or article. This is a convenience fallback for unauthenticated URLs, not a sandbox workaround. A digest built from WebSearch + reachable RSS alone is still valid — note it in the log so health checks can spot the pattern.\n\n## Environment Variables Required\n\n- `XAI_API_KEY` — X.AI API key for Grok's `x_search`. Declared in `requires:`, so it is **injected into this skill's environment** and is the primary path for the X signal layer (direct `curl`; see **Fetching the X signal**). Optional overall — digest still works on web + RSS sources alone if it is ever unset.\n- Notification channels configured via repo secrets (see CLAUDE.md).\n\n## Constraints\n\n- Never send a digest with placeholder links or \"TBD\" sections.\n- Never invent items to hit a target count. Fewer good items beats more weak ones.\n- Never repeat a story already in the last 3 days of `memory\u002Flogs\u002F` unless there's a material update — and say so explicitly when you do.\n",{"name":5,"metadata":23,"description":7},{"var":24,"mode":25,"tags":26,"title":29,"category":30,"requires":31},"","write",[27,28],"content","news","Digest","basics",[32],"XAI_API_KEY?","main","fa8f75cd49adcad9214508fdb5d1ead8fab420be","skills\u002Fdigest","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template","https:\u002F\u002Fgithub.com\u002FLiamVisionary","2026-11-15 04:34:04",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add LiamVisionary\u002Faeon-template --skill digest",{"tool":45,"command":46},"bunx","bunx skills add LiamVisionary\u002Faeon-template --skill digest",{"tool":48,"command":49},"pnpm","pnpm dlx skills add LiamVisionary\u002Faeon-template --skill digest","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fdigest\u002FSKILL.md",true,[],[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7D6W8WRJH3JVJ2JQ674AD77","you-web-search","Web search using You.com Search API with high-quality, cited results and optional real-time web crawling","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fyou-web-search\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7D6W2XPBZZPPXPX76WMPSDA","write-tweet","Multi-format tweet studio - standalone drafts (10 across 5 size tiers), a 5-10 tweet thread, or 10 remixes of past tweets, selected via ${var}","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-tweet\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7D6VZVWK4RATPHM90N71QZD","weekly-aeoncard","Build a weekly token-consumption recap image from memory\u002Ftoken-usage.csv - this week + all-time totals, top skills, rendered as a shareable SVG card.","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fweekly-aeoncard\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7D6VQ7H3DHAAP0BEWTC3HK4","vuln-tracker","One lifecycle poll over everything vuln-scanner produces - PR and advisory status, PVR triage transitions, and pending-disclosure aging, with a stars-secured impact headline and one action queue.","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fvuln-tracker\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7D6VDRA94RJKDPKJ65S47KT","vuln-scanner","Audit trending repos for real security vulnerabilities and disclose responsibly - scan and route findings (PVR \u002F dependency PR), re-submit queued advisories, and send armed email disclosures","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fvuln-scanner\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7D6V8BNPHCTPJBJD89H8DZF","video-script","Turn a repo, product page, or update into a recording-ready video script in a receipts-first format - verifies every claim against live sources, then writes timestamped VO + on-screen direction with a plain-language glossary, assets checklist, anti-tells, and a verify-before-recording list","https:\u002F\u002Fgithub.com\u002FLiamVisionary\u002Faeon-template\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-script\u002FSKILL.md",[],[]]