Agent skill

Hacker News Front Page Scraper

by garrytan in garrytan/gstack

Scrapes the Hacker News front page and returns the top 30 stories as JSON with rank, title, link, points and comment count.

MITAuto-check passedData & Analytics

Install Hacker News Front Page Scraper

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

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install garrytan/gstack hackernews-frontpage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/garrytan/gstack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/browser-skills/hackernews-frontpage .claude/skills/hackernews-frontpage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hackernews-frontpage
GitHub stars
136k
Token cost
~355 tokens
SKILL.md length
133 words
Files
5
Skills in repo
56
Repo updated
First seen
Licence
MIT

At a glance

Scrapes the Hacker News front page and returns the top 30 stories as JSON with rank, title, link, points and comment count.

  • Works in 4 steps: Navigates to… → Reads the page HTML. → Parses each story row (HN's stable… → …
  • Pulling today's top Hacker News stories into structured data
  • SKILL.md covers Usage, How it works and Why this is the reference skill
  • Runs TypeScript scripts from its folder; reaches news.ycombinator.com

What it does

A small browser skill that reads news.ycombinator.com and prints one JSON document to standard output. Each of the 30 stories carries its rank, title, link URL, point count and number of comments. You run it with the skill runner command $B skill run hackernews-frontpage.

It navigates through the browser daemon, reads the page HTML and parses each story row into a typed Story record. The bundle includes a captured HTML fixture and a script.test.ts, so a change in Hacker News markup shows up as a failing test. The authors present it as the smallest useful reference example of a browser skill: no login, stable HTML and deterministic output.

When your agent uses it

  • Pulling today's top Hacker News stories into structured data
  • Tracking points and comment counts for front-page stories
  • Studying a minimal example of a browser skill with tests

Example prompts

  • “Get me the current Hacker News top stories as JSON.”
  • “Run the hackernews-frontpage skill and list the five highest-scoring stories.”
  • “Which front-page stories have the most comments right now?”

Requirements

  • The gstack browse daemon and its $B skill runner

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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
  4. Emits a single JSON document on stdout.

What it can do on your machine

Read from SKILL.md and the folder at commit 20eb620. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • news.ycombinator.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hacker News Front Page Scraper loads about 355 tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 133 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~355

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from garrytan/gstack at commit 20eb620, republished under its MIT licence (© garrytan). 133 words, ~355 tokens.

Download SKILL.mdSave it as .claude/skills/hackernews-frontpage/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
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
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. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in browser-skills/hackernews-frontpage of garrytan/gstack.

  • SKILL.md
  • _lib/browse-client.ts
  • fixtures/hn-2026-04-26.html
  • script.test.ts
  • script.ts

Open the folder on GitHubat commit 20eb620

Compare with similar skills

Hacker News Front Page Scraper next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hacker News Front Page Scraper compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hacker News Front Page Scraper this skillgarrytan/gstack136k—~355Automated safety check: PassMIT
Firecrawl Interact Integrationfirecrawl/firecrawl190k1 repos~731Automated safety check: PassISC
Chrome Devtoolseinverne/dotfiles1211 repos~1.6kAutomated safety check: NotesApache-2.0
Web Page Resource Collectoradobe/skills197—~1kAutomated safety check: PassApache-2.0
Scraper Builderjwynia/agent-skills169—~4kAutomated safety check: PassMIT
Skyvern Browser AutomationSkyvern-AI/skyvern23k1 repos~2.9kAutomated safety check: PassAGPL-3.0

Similar skills

  • Guides adding Firecrawl's /interact endpoint to product code for pages that need clicks, forms, pagination or logged-in flows beyond plain scraping.

    190k GitHub starsUsed in 1 repo~731 tokens
    Data & AnalyticsAuto-check passed
  • Chrome Devtools

    einverne/dotfiles

    Browser automation, debugging, and performance analysis using Puppeteer CLI scripts.

    121 GitHub starsUsed in 1 repo~1.6k tokens
    Data & AnalyticsAuto-check: notes
  • Extracts icons, metadata, text, forms, videos and social links from any web page with playwright-cli, with SVG icon classification and cleanup.

    197 GitHub stars~1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Scraper Builder

    jwynia/agent-skills

    Guide AI agents to generate complete PageObject pattern web scraper projects using Playwright and TypeScript with Docker deployment.

    169 GitHub stars~4k tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Picks the right Skyvern CLI command for a web task, from quick yes/no checks to reusable multi-page workflows, instead of falling back to plain page fetching.

    23k GitHub starsUsed in 1 repo~2.9k tokens
    Productivity & AutomationAuto-check passed
  • Browser Harness

    browser-use/browser-harness

    Controls a real Chrome browser over CDP for clicking, typing, navigation, logged-in sessions and JavaScript-heavy or bot-protected pages.

    18k GitHub stars~3.6k tokensUpdated today
    Productivity & AutomationAuto-check passed

More from garrytan/gstack

All 56 skills in this repo
  • Gstack Skill Router

    garrytan/gstack

    Router for the gstack skill suite. (gstack)

    136k GitHub stars~4k tokensUpdated today
    Auto-check: notes
  • Root Cause Debugging

    garrytan/gstack

    Investigates bugs, errors and stack traces in phases and requires a root-cause hypothesis to be confirmed before any fix is written.

    136k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Builds a weekly engineering retrospective from git history: commit counts, per-person contributions, work patterns and code quality numbers over a chosen window.

    136k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Aside Browser Driver

    garrytan/gstack

    Drives a real browser through Aside so the agent can open a page, read it, click through a flow, take screenshots and check console errors.

    136k GitHub stars~8.5k tokensUpdated today
    Auto-check: notes
  • Live-Device iOS QA

    garrytan/gstack

    Tests a SwiftUI app on a real iPhone connected by USB, reading the Swift source and then looping through screenshot, analysis and action to find bugs.

    136k GitHub stars~11k tokensUpdated today
    Auto-check: notes
  • Cross-Model Benchmark

    garrytan/gstack

    Sends one prompt to Claude, GPT through the Codex CLI and Gemini, then tabulates response time, token use and cost, with an optional judged quality score.

    136k GitHub stars~4k tokensUpdated today
    Auto-check: notes

Questions about Hacker News Front Page Scraper

What does Hacker News Front Page Scraper do?

Scrapes the Hacker News front page and returns the top 30 stories as JSON with rank, title, link, points and comment count. com and prints one JSON document to standard output. Each of the 30 stories carries its rank, title, link URL, point count and number of comments.

When should I use Hacker News Front Page Scraper?

Hacker News Front Page Scraper fits situations like: pulling today's top Hacker News stories into structured data; tracking points and comment counts for front-page stories; studying a minimal example of a browser skill with tests.

How do I install Hacker News Front Page Scraper in Claude Code?

Run `npx skills add garrytan/gstack --skill hackernews-frontpage -a claude-code`. Or copy the skill folder (browser-skills/hackernews-frontpage in garrytan/gstack) into .claude/skills/hackernews-frontpage in your project. Claude Code loads it when a task matches its description.

How do I install Hacker News Front Page Scraper in Codex?

Run `npx skills add garrytan/gstack --skill hackernews-frontpage -a codex`. Or copy the skill folder (browser-skills/hackernews-frontpage in garrytan/gstack) into .agents/skills/hackernews-frontpage in your project. Codex loads it when a task matches its description.

Can I use Hacker News Front Page Scraper in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add garrytan/gstack --skill hackernews-frontpage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hackernews-frontpage, .gemini/skills/hackernews-frontpage, .github/skills/hackernews-frontpage and .opencode/skills/hackernews-frontpage in your project.

What does Hacker News Front Page Scraper need to run?

Going by SKILL.md and its folder, Hacker News Front Page Scraper needs TypeScript for the scripts in its folder. Our summary lists: The gstack browse daemon and its $B skill runner.

Does Hacker News Front Page Scraper access the network?

SKILL.md names 1 domain. In commands or code: news.ycombinator.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Hacker News Front Page Scraper safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hacker News Front Page Scraper use?

Hacker News Front Page Scraper is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hacker News Front Page Scraper use?

About 355 tokens (SKILL.md is roughly 1.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hacker News Front Page Scraper?

Skills that share tags, products or a category with Hacker News Front Page Scraper: Firecrawl Interact Integration (firecrawl/firecrawl, 190k stars), Chrome Devtools (einverne/dotfiles, 121 stars), Web Page Resource Collector (adobe/skills, 197 stars) and Scraper Builder (jwynia/agent-skills, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hacker News Front Page Scraper?

garrytan (a GitHub user) maintains it in garrytan/gstack, which has 135,670 GitHub stars. The repository holds 56 skills in this directory. The repository was last updated on October 9, 2026.

Source: garrytan/gstack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.