All skills
garrytan avatar

/hackernews-frontpage

@e8893a1 official
by Garry Tangarrytan/gstack135k stars
20,051

Scrape the Hacker News front page (titles, points, comment counts).

Use this Skill: https://skilld.dev/gh/garrytan/gstack/hackernews-frontpage

This session only. Nothing lands on disk.

SKILL.md

≈22 tokens always: the name and description. ≈275 when used: this file.

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

  1. Navigates to https://news.ycombinator.com via the daemon.
  2. Reads the page HTML.
  3. Parses each story row (HN's stable tr.athing structure) into a typed Story record.
  4. 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.

Source: SKILL.md on GitHub

1 warning14d3 checks · Risk SAFE
  • Gen Agent Trust Hub14d

    This is a reference browser-scraping skill that extracts top stories from Hacker News. It includes a library for communicating with a local automation daemon and uses standard parsing techniques to output structured data. No malicious behavior or security risks were identified.

  • Socket14d

    No alerts

  • Snyk14d

    Risk: MEDIUM · 1 issue

Signed by skilld at e8893a1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated 5 months ago
host
news.ycombinator.com
trusted
true
source
human
Other metadata
version
1.0.0
args
[]
triggers
[
  "scrape hacker news frontpage",
  "scrape hn frontpage",
  "get hn top stories",
  "latest hacker news stories"
]
  • scraping
  • hackernews
  • web-scraping
  • json
  • parsing
  • html

README badge

README badge for garrytan/gstack/hackernews-frontpage

Scrapes the Hacker News front page and returns the top 30 stories as JSON, with rank, title, URL, points, and comment count for each story. Used to fetch the latest HN top stories programmatically without authentication.

Generated from the current SKILL.md.

What data does this skill extract from Hacker News?
It returns the top 30 stories from the front page, each with rank, title, URL, point count, and comment count as JSON.
Does this skill require authentication?
No. It scrapes the public Hacker News front page with no login or API key needed.
What happens if Hacker News changes its HTML structure?
The skill includes a bundled test fixture that will catch selector breakage before the skill fails in production.
Can I filter results by score or comment count?
The skill returns all 30 front-page stories without filtering; you would need to post-process the JSON output yourself.

Generated from the current SKILL.md. These answers refresh after source changes.