Skip to main content
skill CX Codex

hackernews-frontpage — Claude Code skill: top HN stories as JSON

Pulls the Hacker News front page and returns the top 30 stories as JSON with rank, title, link, points and comments.

MIT 311 installs ★ 142,291 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add garrytan/gstack --skill hackernews-frontpage -a claude-code
Open on GitHub

What hackernews-frontpage does

The skill reads the Hacker News front page and prints the top 30 stories as one JSON document. Each record holds rank, title, link, points and comment count. Handy when an agent needs current HN headlines without you copying rows by hand.

Four moves: the daemon opens https://news.ycombinator.com, the skill reads the HTML, maps each row from tr.athing into a story record, then writes JSON to stdout. No arguments, no auth. One call: $B skill run hackernews-frontpage.

HN redesigns its markup eventually and the selectors stop matching. A bundled script.test.ts runs against a captured fixture, so the break shows up in tests before anyone gets an empty list. The call goes through the daemon, which has to be running.

What it helps with

  • pull the top 30 HN stories as JSON for a digest
  • collect headlines with points and comment counts
  • check what climbed the front page in the last hour
  • feed fresh HN links into an agent session

Example prompts for the agent

  • Run $B skill run hackernews-frontpage and show me the top 30 as JSON
  • Grab the first 30 stories from news.ycombinator.com with comment counts
  • Pull the front page of Hacker News and sort the stories by points

How to install hackernews-frontpage

1Skills CLI (Vercel)

npx skills add garrytan/gstack --skill hackernews-frontpage -a claude-code

2Manually: put the files in place

~/.claude/skills/hackernews-frontpage/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/hackernews-frontpage/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about hackernews-frontpage

How do I install hackernews-frontpage in Claude Code?

Run npx skills add garrytan/gstack --skill hackernews-frontpage -a claude-code. The skill lands at ~/.claude/skills/hackernews-frontpage/SKILL.md.

What does hackernews-frontpage do?

It scrapes the HN front page and prints JSON with 30 stories: rank, title, link, points and comments.

Why would the skill stop returning stories?

HN changes its markup, so the tr.athing selectors no longer match. The script.test.ts run against a captured fixture fails first.

Source text

SKILL.md · MIT
---
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

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.

© garrytan · MIT · garrytan/gstack

Similar skills

All skills for Browser and scraping →

From the same set26

The whole set →
landing-report landing-report is a Claude Code skill that inspects release version queues across parallel workspaces. Runs read-only checks via the gstack-next-version tool without modifying project files. CX Codex +1 336installs scrape scrape is a Claude Code skill that reads data off a web page through the Aside browser, inside sessions where the sign-in already happened. It fires on asks like "get data from this page". CX Codex +1 335installs gstack-openclaw-office-hours The gstack-openclaw-office-hours skill turns your AI agent into a Y Combinator office hours partner to pressure-test product ideas. It enforces a strict rule against writing code and outputs a design doc. CX Codex +1 327installs document-generate document-generate is a Claude Code skill that creates docs for a feature, module, or whole project. It starts when asked to write or generate documentation. CX Codex +1 319installs gstack-openclaw-ceo-review gstack-openclaw-ceo-review makes the agent review a plan the way a CEO would: question the premise, find weak spots, and decide whether to widen or trim scope. CX Codex +1 318installs gstack-openclaw-retro gstack-openclaw-retro generates weekly engineering retrospectives from git history, analyzing developer sessions, test ratios, churn hotspots, and individual contributions. CX Codex +1 314installs gstack-openclaw-investigate gstack-openclaw-investigate makes the agent find a bug's root cause and confirm it before changing code, then apply a minimal fix with a regression test and write a report. CX Codex +1 302installs diagram diagram is a Claude Code skill that turns an English description or Mermaid source into diagram files. It runs on requests to make, draw, or visualize a diagram. CX Codex +1 266installs

Project sponsors

Companies that keep this analytics open