hackernews

hackernews is a skill for Claude Code, Codex from AgentComputerAI/torch. It costs 77 tokens per session (1,883 once invoked), scanned A, original, MIT.

A scraping guide for Hacker News, a discussion website where developers share and comment on technology stories. Its listing pages use simple server-rendered HTML, and the guide also mentions the official data API.

In plain words
What is it for?
Use it to collect story titles, rankings, domains, scores, authors, ages, comment counts, and links from Hacker News listing pages. It covers pages such as the front page, newest stories, Ask HN, Show HN, and jobs.
Why use it?
It avoids unnecessary browser automation because the story data is available in the initial HTML. It explains how to follow pagination and when to use the official API for larger collections.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to collect story titles, rankings, domains, scores, authors, ages, comment counts, and links from Hacker News listing pages. It covers pages such as the front page, newest stories, Ask HN, Show HN, and jobs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentcomputerai/torch/hackernews
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AgentComputerAI/torch --skill hackernews
Clone the repo
git clone --depth 1 https://github.com/AgentComputerAI/torch

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hackernews

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentcomputerai/torch/hackernews/github.svg)](https://agentmods.dev/skills/agentcomputerai/torch/hackernews)
Your own site
<a href="https://agentmods.dev/skills/agentcomputerai/torch/hackernews"><img src="https://agentmods.dev/badge/skills/agentcomputerai/torch/hackernews/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hackernews

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentcomputerai/torch/hackernews"><img src="https://agentmods.dev/badge/skills/agentcomputerai/torch/hackernews.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,883 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.01883
Opus 5.5 $0.00031 $0.00753
Sonnet 5.5 $0.00015 $0.00377
Haiku 4.5 $0.00008 $0.00188

Measured 3mo ago against content hash 47231904ba65, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hackernews scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Phase 0 (curl)**: HTTP 200, all data in raw HTML. **Gate A passed — skipped browser entirely.**
skills/sites/hackernews/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hacker News (news.ycombinator.com)

HN is the easiest scrape target on the internet. The entire front page is a single server-rendered HTML table with stable, decade-old class names. No cookies, no JS, no rate limits at normal pace. If you need more than a few pages, use the official Firebase API instead of scraping.

Detection

Signal Value
Server nginx (Arc / Common Lisp app behind it)
CDN None
Framework Server-rendered HTML tables, no SPA
Anti-bot None
Auth Not required for reading
robots.txt Allows /, disallows /x?, /r?, /vote?, etc. Crawl-delay: 30

Architecture

Every listing page (/news, /newest, /front, /ask, /show, /jobs, ?p=N) is a single <table id="hnmain"> with 30 stories. Each story is two <tr> rows:

  1. tr.athing.submission — id, rank, title link, site domain
  2. the next <tr> — subtext row with points, user, age, comments

The "More" link at the bottom (a.morelink[rel=next]) gives the next page URL, e.g. ?p=2.

Strategy used

  • Phase 0 (curl): HTTP 200, all data in raw HTML. Gate A passed — skipped browser entirely.
  • Phase 1/2 not needed.

Stealth config that works

None needed. Plain fetch works. A generic UA is polite:

headers: { 'user-agent': 'Mozilla/5.0 (compatible; torch-scraper/1.0)' }

Respect Crawl-delay: 30 from robots.txt if you hit many pages.

Extraction

import * as cheerio from 'cheerio';

const html = await (await fetch('https://news.ycombinator.com')).text();
const $ = cheerio.load(html);
const items = [];

$('tr.athing.submission').each((_, el) => {
  const $row = $(el);
  const id = $row.attr('id');
  const rank = parseInt($row.find('.rank').text(), 10);
  const $a = $row.find('.titleline > a').first();
  const title = $a.text().trim();
  const url = $a.attr('href');
  const site = $row.find('.sitestr').text().trim() || null;

  const $sub = $row.next().find('.subtext .subline');
  const points = parseInt($sub.find('.score').text(), 10) || 0;
  const user = $sub.find('.hnuser').text().trim() || null;
  const time = ($sub.find('.age').attr('title') || '').split(' ')[0] || null;
  const age = $sub.find('.age a').text().trim();
  const cmatch = $sub.find('a').last().text().match(/(\d+)\s*comment/);
  const comments = cmatch ? parseInt(cmatch[1], 10) : 0;

  items.push({ rank, id, title, url, site, points, user, comments, age, time,
               hn_url: `https://news.ycombinator.com/item?id=${id}` });
});

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 149 lines · 77 tokens per session scan A 47231904ba65

Subscribe to this mod's changes

hackernews is a skill published in the GitHub repository AgentComputerAI/torch (5 stars, last pushed 7mo ago), licensed MIT. It adds 77 tokens to every session and 1,883 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

hackernews compared with skills from other repositories

hackernews next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hackernewsAgentComputerAI/torchSkill57mo agoMITA77Claude Code, Codex
data-scraperericrisco/rsc-harnessSkill701yesterdayMITA77Claude Code, Codex
chrome-extensionericrisco/rsc-harnessSkill701yesterdayMITA76Claude Code, Codex
nodejsericrisco/rsc-harnessSkill701yesterdayMITA77Claude Code, Codex
browser-qadamianvtran/local-operatorSkill234todayMITA45Claude Code, Codex
checking-a-pageawss1i/assaySkill109todayMITA49Claude Code
vibesurferfrane/vibesurferSkill18todayApache-2.0A84Claude Code, Codex