Hackernews Frontpage hackernews-frontpage
Scrape the Hacker News front page (titles, points, comment counts).
- Our test
- 7/10✓ Verified
- tested Dec 6, 2026
- GitHub stars
- 143k
- garrytan/gstack
- Added by
- 0
- members
- Updated
- Dec 6
- commit d08eb76
- Content
- 5 files
- 3 scripts · 26 KB
- License
- MIT
- free to use
What our test found
Le skill est ciblé, testé sur une fixture et limité à la lecture d’une page publique, mais quelques écarts entre la description et le comportement réduisent sa fiabilité.
Limits spotted
- The description promises the first 30 stories, whereas the script returns all detected rows and the fixture tests only 5.
- The points and comments fields may be null, unlike the initial description, which presents them as numbers.
- The parsing relies on regular expressions that are sensitive to changes in HTML structure.
- The rank is incremented even when a detected row is subsequently discarded for lack of a title.
name: hackernews-frontpage description: Scrape the Hacker News front page (titles, points, comment counts). host: news.ycombinator.com trusted: true source: human version: 1.0.0 args: [] triggers: - scrape hacker news frontpage - scrape hn frontpage - get hn top stories - latest hacker news stories
Hacker News front-page scraper
Scrapes the Hacker News (news.ycombinator.com) front page and returns the top 30 stories as JSON. Each story has its rank, title, link URL, point count, and comment count.
Usage
$ $B skill run hackernews-frontpage
{
"stories": [
{ "rank": 1, "title": "...", "url": "...", "points": 412, "comments": 87 },
...
],
"count": 30
}How it works
- Navigates to
https://news.ycombinator.comvia the daemon. - Reads the page HTML.
- Parses each story row (HN's stable
tr.athingstructure) into a typedStoryrecord. - Emits a single JSON document on stdout.
Why this is the reference skill
hackernews-frontpage is the smallest interesting browser-skill: no auth, stable HTML, deterministic output, file-fixture-friendly. Every Phase 1 component (SDK, scoped tokens, three-tier lookup, spawn lifecycle) is exercised by $B skill run hackernews-frontpage and the bundled script.test.ts.
When the HN HTML rotates and our selectors break, the test fails against the captured fixture before users notice. That's the point.