hackernews-frontpage

Scrapes the Hacker News front page and emits story data as JSON.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/sanjanb/my-agent-harness --skill hackernews-frontpage-sanjanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hackernews-frontpage
Source: https://github.com/sanjanb/my-agent-harness/tree/main/skills/browser-skills/hackernews-frontpage
Command: npx skills add https://github.com/sanjanb/my-agent-harness --skill hackernews-frontpage-sanjanb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually checking Hacker News for top stories is repetitive, and building a custom scraper means dealing with HN's HTML structure, entity decoding, and edge cases like job postings. This Skill automates the entire scrape and returns clean, typed JSON. ## Core Features & Use Cases - Front-page scraping: Navigates to news.ycombinator.com through a browser daemon and parses the stable tr.athing row structure into typed story records. - Structured JSON output: Returns rank, item id, title, URL, points, and comment count for each story, with nulls for job postings that lack scores. - Fixture-tested parser: The pure parseStoriesFromHtml function is tested against a bundled HTML fixture, so selector breakage is caught before users notice. - Use Case: Ask your agent for the current top Hacker News stories and receive a JSON document you can pipe into a digest, dashboard, or trend-tracking script. ## Quick Start Ask the agent to scrape the Hacker News front page and return the top stories as JSON.

Frequently Asked Questions about hackernews-frontpage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scrape the Hacker News front page?

Run the skill via `$B skill run hackernews-frontpage`. It navigates to news.ycombinator.com through the browser daemon, parses each story row, and prints a single JSON document with stories and a count field to stdout.

What data does the Hacker News scraper return?

Each story includes a 1-based rank, HN item id, title, outbound URL, points, and comment count. Job postings that lack scores return null for points and comments, and 'discuss' links count as zero comments.

Does the HN scraper need authentication or an API key?

No Hacker News credentials are needed since the front page is public. The script does require the gstack browser daemon, authenticated via GSTACK_PORT and GSTACK_SKILL_TOKEN env vars set by the harness, or a .gstack/browse.json state file when run directly.

Why does Hacker News scraping break after a site update?

Scrapers break when HN rotates its HTML structure and selectors no longer match. This skill mitigates that with a bundled HTML fixture test: the parser is a pure function tested against captured markup, so breakage fails the test before users notice.

Can I test the HN parser without a browser or network?

Yes. The parseStoriesFromHtml function is exported separately from the daemon entry point, so script.test.ts exercises it directly against the bundled fixture using bun:test with no network or daemon required.