---
name: mohitagw15856/hn-digest
source: https://app.decimal.ai/s/mohitagw15856-hn-digest@1/SKILL.md
source_sha256: 14c435416d4e
---

# 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

1. **Front page (official API):** ids: `curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"` → then per item `curl -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`.
2. **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: `https://hn.algolia.com/api/v1/items/{id}`. For topic questions Algolia is one request where Firebase is fifty.
3. **Digest, don't dump:** each story gets one line of what-it-actually-is (from the title and domain — fetch the linked article only if the user asks); lead with the 3–5 highest-signal items for the user's stated interests, then the rest compressed.
4. **Comment sections are position maps:** summarize a discussion as its distinct arguments ("top thread argues X; the main pushback says Y; a practitioner reports Z") with rough weight — never as "mixed reactions," which is always true and never informative. Attribute claims to "a commenter," not as facts.
5. **Freshness and voice:** scores are moving snapshots — timestamp the digest; and HN comments are opinions with usernames, quoted as such. The front page is also a specific community's taste — say "HN's take" not "the tech world's take."

## Output Format

# HN Digest — [time, user's zone]

**[If filtered: the matching stories first.]**

| # | Story | Score · Comments | What it is |
|---|---|---|---|

[Discussion mode: the position map — 3–5 argument threads, weighted, attributed]
[Search mode: matches with dates and reception]

Source: [HN Firebase API / Algolia HN search] · rerun: `[exact curls]`
*Scores are live snapshots; comments are commenters' views, not facts.*

## Quality Checks

- [ ] Fetches were batched sanely (top 10–15, not 500 ids)
- [ ] Every story line says what the thing is, not just its title
- [ ] Discussion summaries name distinct positions with rough weights — no "mixed reactions"
- [ ] Comment claims are attributed, not laundered into facts
- [ ] The digest is timestamped

## Anti-Patterns

- [ ] Do not dump 30 raw titles — the digest is the product
- [ ] Do not loop the Firebase API when Algolia answers in one call
- [ ] Do not present commenter claims as verified facts — attribute or drop
- [ ] Do not answer "what's on HN" from memory — the front page turns over in hours
- [ ] Do not editorialize the community's votes into objective importance — it's HN's taste, labeled as such