hackernews-frontpage

Scrape the Hacker News front page and emit story data as JSON.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/abdulazeezoj/monovella-poc --skill hackernews-frontpage-abdulazeezoj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hackernews-frontpage
Source: https://github.com/abdulazeezoj/monovella-poc/tree/main/.agents/skills/gstack/browser-skills/hackernews-frontpage
Command: npx skills add https://github.com/abdulazeezoj/monovella-poc --skill hackernews-frontpage-abdulazeezoj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Manually checking the Hacker News front page for top stories is repetitive, and building a custom scraper means handling HN's HTML structure, entity decoding, and edge cases like job postings. This Skill automates that extraction and returns clean, structured 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: Each story includes rank, HN item id, title, outbound URL, point count, and comment count, with nulls for job postings that lack scores. - Fixture-tested parser: The HTML parser is a pure function tested against a bundled fixture, so selector breakage is caught before it affects users. - Use Case: Ask for the current top Hacker News stories and receive a JSON array you can pipe into a digest, dashboard, or trend-tracking script. ## Quick Start Ask the assistant to run the hackernews-frontpage skill and return the current top Hacker News 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 the skill runner, which navigates to news.ycombinator.com through the browser daemon, reads the page HTML, and parses each story row into a typed record. The result is printed to stdout as a single JSON document with a stories array and count.

What data does the Hacker News scraper return for each story?

Each story includes its 1-based rank, HN item id, title, outbound URL, point count, and comment count. Job postings that have no score or comments link return null for those two fields, and a 'discuss' link is treated 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. However, the script must reach the local gstack browser daemon, either via GSTACK_PORT and GSTACK_SKILL_TOKEN environment variables set by the runner or a .gstack/browse.json state file.

Why does the HN scraper return empty or wrong results?

Failures usually mean the daemon is not running on the expected port or HN changed its HTML structure. The parser is tested against a bundled HTML fixture, so a fixture test failure signals that the selectors no longer match the live page.

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

Yes. The parseStoriesFromHtml function is exported as a pure function over HTML strings, and the bundled test suite runs it against a captured fixture file. No daemon, network access, or live browser is required for those tests.