SKILL.md
HN Digest Skill
"What's on HN?" deserves better than thirty raw titles — the value is in the digest: what's leading, what the comment sections are actually arguing, and which of it the user cares about. Hacker News serves everything keylessly twice over: the official Firebase API (live items by id) and Algolia's HN search (query, date ranges, popularity). This skill knows when to use which, batches sanely, and summarizes discussions as positions, not vibes.
What This Skill Produces
- The digest — top stories with score, comments count, domain, and a one-line what-it-is
- Discussion reads — for a story: the top comment threads compressed into the actual arguments being made
- Topic searches — has-HN-covered-X, with dates and reception
- The commands — exact curls, rerunnable
Required Inputs
Ask for these if not provided:
- The mode — front page now, a specific story's discussion, or a topic search
- Appetite — top 5 headline-digest vs. deep read of one thread
- Their filter — "anything about AI/security/startups" turns a digest into a targeted one; worth asking when the user has an obvious beat
Framework: The Two APIs and the Digest Rules
- Front page (official API): ids:
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"→ then per itemcurl -s "https://hacker-news.firebaseio.com/v0/item/{id}.json"→title,score,descendants(comment count),url,by,time. Fetch the top 10–15 ids only — not all 500. Also:beststories,newstories,askstories,showstories. - Search and story lookup (Algolia):
curl -s "https://hn.algolia.com/api/v1/search?query=postgres&tags=story&numericFilters=points>50"— or by date:search_by_date. A story's full comment tree in one call: . For topic questions Algolia is one request where Firebase is fifty.
