# News Briefing

> Fetch and summarize current news/headlines for any country, language, or topic using Google News RSS via curl. Use when the user asks for latest news, today's headlines, a news digest, or topic-specific news summaries.

- Skill: `zyrexnn/news-briefing` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zyrexnn/news-briefing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zyrexnn/news-briefing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- Author: zyrexnn (https://skillmd.com/u/zyrexnn)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zyrexnn/news-briefing

---


# News Briefing via Google News RSS

Class-level workflow for building current-events summaries from live RSS feeds.

## Why this approach
- Individual outlet RSS URLs are unreliable — guessed paths like `detik.com/rss` or `kompas.com/getrss/nasional` return 404. Go to the aggregator first.
- The `mcp__fetch__fetch` tool enforces robots.txt, and `news.google.com` disallows it. Use `curl` in the terminal instead; it succeeds where fetch refuses.
- After ~3 consecutive fetch-tool failures the MCP server enters an auto-retry cooldown (~60s). Don't hammer it — switch to curl immediately.

## Workflow
1. Build the locale feed URL:
   - Headlines: `https://news.google.com/rss?hl=<lang>&gl=<country>&ceid=<country>:<lang>`
     - Indonesia: `?hl=id&gl=ID&ceid=ID:id`
     - US English: `?hl=en-US&gl=US&ceid=US:en`
   - Topic/search: `https://news.google.com/rss/search?q=<urlencoded query>&hl=..&gl=..&ceid=..`
2. Fetch with curl and a browser UA, save to /tmp:
   `curl -sL --max-time 25 -A "Mozilla/5.0" "<URL>" -o /tmp/feed.xml`
3. Parse with Python stdlib regex — use `scripts/gnews_parse.py` from this skill (handles unescaping, `<source>` extraction, trailing-outlet dedup):
   `python3 scripts/gnews_parse.py /tmp/feed.xml 25`
4. Summarize grouped by section (e.g. Nasional / Ekonomi / Internasional / Hiburan), keeping headlines close to original wording.
5. Reply in the user's language.

## Output rules (user-checked)
- **Attribute the source media for every headline** — this user asks "source nya darimana?" when provenance isn't obvious. Tag each item with its outlet and list the feed URL at the end of the reply.
- Note the retrieval date/time so staleness is clear.
- Strip the trailing " - Outlet" duplicate from titles when the `<source>` tag already names the outlet.
- Filter junk: SEO/spam entries (gambling etc.) do slip into aggregated feeds — drop them silently.

## Pitfalls
- Titles in Google News RSS are HTML-escaped — run them through `html.unescape`.
- `<source>` carries attributes (`<source url="...">Outlet</source>`) — capture inner text, not the raw tag.
- If curl also fails, fall back to fetching 2–3 major national outlets' homepages directly rather than retrying dead RSS URL guesses.

