hackernews-frontpage

Scrapes the Hacker News front page and returns stories as structured JSON.

Updated May 15, 2026
One-click install
npx skills add https://github.com/tgmarinho/canetaco --skill hackernews-frontpage-tgmarinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hackernews-frontpage
Source: https://github.com/tgmarinho/canetaco/tree/main/.claude/skills/gstack/browser-skills/hackernews-frontpage
Command: npx skills add https://github.com/tgmarinho/canetaco --skill hackernews-frontpage-tgmarinho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually checking Hacker News for trending stories is repetitive, and the site offers no structured front-page feed with ranks, points, and comment counts. This Skill automates that retrieval and returns clean, typed JSON you can pipe into other tools. ## Core Features & Use Cases - Front-page scraping: Navigates to news.ycombinator.com through a browser daemon and parses the stable tr.athing HTML structure into typed story records. - Structured JSON output: Emits rank, item id, title, URL, points, and comment count for each story, with null values 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: Run the skill each morning to collect the top 30 HN stories as JSON, then feed them into a digest email or trend-tracking spreadsheet. ## Quick Start Ask the AI 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 programmatically?

Run this skill through the gstack daemon: it navigates to news.ycombinator.com, reads the page HTML, and parses each story row into a typed record with rank, title, URL, points, and comments. The result is emitted as a single JSON document on stdout.

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

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

Does the HN scraper require authentication or an API key?

No Hacker News credentials are needed since the front page is public. However, the script must be spawned via the skill runner, which sets GSTACK_PORT and GSTACK_SKILL_TOKEN, or run where a .gstack/browse.json state file provides the daemon port and token.

Why does the HN parser break when the site HTML changes?

The parser relies on HN's stable tr.athing row structure and titleline spans. If HN rotates its markup, the bundled fixture test fails first, signaling that the regex selectors in parseStoriesFromHtml need updating before users are affected.

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

Yes. The parseStoriesFromHtml function is a pure function over HTML strings, and script.test.ts exercises it against a bundled fixture file using bun:test, with no daemon or network access required.