$npx -y skills add yang3kc/daily_arxiv_digest --skill arxiv-fetchFetch the latest arXiv papers and generate an on-demand digest. Use when the user asks to fetch/check today's (or the latest) arXiv papers, find new papers on a topic, or generate an ad-hoc arXiv digest. The agent judges relevance itself — no API keys needed.
| 1 | # arXiv Fetch & Digest |
| 2 | |
| 3 | Fetch the latest papers from arXiv RSS feeds, judge their relevance to the |
| 4 | user's topics **yourself** (you are the LLM — no external API calls), and |
| 5 | present a digest. Fully standalone: the fetch script is Python-stdlib-only, |
| 6 | needs no API keys, and no other files beyond this skill directory. |
| 7 | |
| 8 | ## Step 1 — Resolve subjects and topics |
| 9 | |
| 10 | Two inputs, resolved independently, same precedence: |
| 11 | |
| 12 | 1. **From the request.** Explicit subjects ("check cs.SI") or topics ("papers |
| 13 | about LLM persuasion") in the user's message always win. Free-form topic |
| 14 | phrasing is fine — you are the judge; no schema. If the user names a topic |
| 15 | but no subject, infer likely subjects from |
| 16 | [references/arxiv-categories.md](references/arxiv-categories.md). |
| 17 | 2. **From config.** A JSON file with `arxiv_subjects` (feed codes) and |
| 18 | `topics` (natural-language interests). Searched in order — project |
| 19 | (`.arxiv-fetch/config.json` in the working directory), install |
| 20 | (`config.json` in this skill directory), then user-global |
| 21 | (`~/.config/arxiv-fetch/config.json`). Full details: |
| 22 | [references/config/schema.md](references/config/schema.md). The fetch |
| 23 | script walks the same chain automatically for subjects; read the same |
| 24 | file for topics. |
| 25 | 3. **Neither available?** Run the first-time setup flow: |
| 26 | [references/config/first-time-setup.md](references/config/first-time-setup.md). |
| 27 | It is blocking when the request doesn't say what to fetch; otherwise |
| 28 | proceed and offer to save afterwards. |
| 29 | |
| 30 | ## Step 2 — Fetch |
| 31 | |
| 32 | ```sh |
| 33 | python3 scripts/fetch_arxiv.py --subjects cs.SI,cs.CY --output <scratchpad>/arxiv.json |
| 34 | ``` |
| 35 | |
| 36 | (Any Python 3; run from this skill directory, or call the script by its |
| 37 | absolute path.) Flags: |
| 38 | |
| 39 | - `--subjects a,b,c` — override config subjects |
| 40 | - `--config <path>` — explicit config file, skipping the search chain |
| 41 | - `--new-only` — drop cross-lists (`cross`) and revisions (`replace`); use |
| 42 | this by default unless the user wants everything |
| 43 | - `--output <path>` — write to a file instead of stdout (prefer this; write |
| 44 | to the scratchpad, then read/process in slices) |
| 45 | |
| 46 | Output: `{fetched_at, subjects, stats, papers[]}`; each paper has `id`, |
| 47 | `title`, `authors[]`, `url`, `abstract`, `announce_type`, `subjects[]` |
| 48 | (papers appearing in several feeds are deduplicated, all feeds listed). |
| 49 | Author names may contain raw TeX accents (`Ra\'ul`) — render them properly |
| 50 | in any digest you write. |
| 51 | |
| 52 | `--subjects` overrides only the subject list; `arxiv_rss_base_url` (if |
| 53 | configured) is still honored. `--config` replaces the search chain |
| 54 | entirely. |
| 55 | |
| 56 | **Check `stats.failed_subjects` before interpreting results.** Feeds are |
| 57 | retried once; ones that still fail land there (exit code is nonzero if |
| 58 | every feed failed, and nothing is written). An empty `papers[]` with no |
| 59 | failed subjects is a normal weekend/holiday — tell the user there were no |
| 60 | new announcements. If some feeds failed, say the results are partial and |
| 61 | name the failed feeds — never report "no announcements" on a failure. |
| 62 | |
| 63 | ## Step 3 — Judge relevance |
| 64 | |
| 65 | Read the fetched papers (title + abstract) and judge each against the topics. |
| 66 | Be selective: the digest's value is filtering, so "somewhat related" is not |
| 67 | enough — select papers a researcher on that topic would actually open. |
| 68 | |
| 69 | For large batches (a busy day on cs.CL can exceed 200 papers), process the |
| 70 | JSON in slices so nothing is skipped, or fan out subagents per slice/topic |
| 71 | and merge their selections. |
| 72 | |
| 73 | ## Step 4 — Digest |
| 74 | |
| 75 | Present in chat, grouped by topic: title (linked to `url`), authors, and a |
| 76 | one-to-two-sentence TL;DR in your own words focused on what's relevant to |
| 77 | the topic. Note total fetched vs. selected so the user knows the coverage. |
| 78 | |
| 79 | Only if the user asks to save the digest, write it where they specify |
| 80 | (default suggestion: `arxiv-digest-YYYY-MM-DD-<slug>.md` in the current |
| 81 | working directory). For machine consumers, mirror the fetch JSON shape: |
| 82 | keep each selected paper's fields and add `tldr` plus |
| 83 | `matched_topics[] {topic, reason}`, with papers grouped or tagged by topic. |
| 84 | |
| 85 | ## Changing your config |
| 86 | |
| 87 | Handle these directly when asked — the user should never need to hand-edit: |
| 88 | |
| 89 | - **"Show my arxiv config"** — print the active config file's path and |
| 90 | contents (walk the chain in [references/config/schema.md](references/config/schema.md); |
| 91 | say which file won and which others exist). |
| 92 | - **"Change my subjects/topics"** — edit the active config file in place; |
| 93 | confirm the new values. Map informal names to codes via |
| 94 | [references/arxiv-categories.md](references/arxiv-categories.md). |
| 95 | - **"Use different topics for this project"** — create |
| 96 | `.arxiv-fetch/config.json` in the project (it outranks user-global); |
| 97 | suggest gitignoring it if personal. |
| 98 | - **"Move my conf |