跳到正文
Skillpedia
网页抓取139k · #687

hackernews-frontpage

它能做什么

这项技能读取 Hacker News 首页,并以结构化数据的形式返回排名前 30 的新闻。适合想快速获取其中热门内容清单的人。

适用场景

  • ✓你想获取 Hacker News 当前排名靠前的新闻的时候。
  • ✓你想获取新闻标题、链接和分数列表的时候。
  • ✓你想追踪哪些新闻在 Hacker News 上排名最高的时候。

技能链接

https://github.com/garrytan/gstack/blob/main/browser-skills/hackernews-frontpage/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/garrytan/gstack/blob/main/browser-skills/hackernews-frontpage/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请告诉我 Hacker News 现在排名前 30 的新闻,以及它们的分数和评论数。”

每周 5 个新技能,1 分钟读完。

工作原理

它打开 Hacker News 首页,读取新闻条目,并把每条新闻的排名、标题、链接、分数和评论整理为一份列表返回。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

常见问题

它返回多少条新闻?

描述说明它返回排名前 30 的新闻。

每条新闻包含哪些信息?

排名、标题、链接、分数和评论数。

它需要登录吗?

不需要。技能说明它无需身份验证即可工作。

详情

作者的原始描述

Scrape the Hacker News front page (titles, points, comment counts).

repo: garrytan/gstack

热度

GitHub 星标
139k
排名
#687
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能