AgentSkillsCN

hn-algolia-reader

通过 HN Algolia 搜索界面抓取并提取 Hacker News 的热门帖子。触发条件:用户询问 HN 新闻、Hacker News 帖子、科技资讯、Show HN、Launch HN,或热门话题。借助 Claude 在 Chrome 中导航 HN Algolia,结合日期范围、帖子类型和排序方式等筛选条件,返回包含标题、得分、评论和链接的结构化数据。

SKILL.md
--- frontmatter
description: Scrape and extract top posts from Hacker News using HN Algolia search
  interface. TRIGGERS - User asks for HN news, Hacker News posts, tech news, Show
  HN, Launch HN, or top stories. Uses Claude in Chrome to navigate HN Algolia with
  filters for date range, post type, and sort order. Returns structured data with
  titles, points, comments, and URLs.
name: hn-algolia-reader

HN Algolia Reader

Extract top posts from Hacker News using the Algolia-powered search interface.

URL Pattern

code
https://hn.algolia.com/?dateRange={range}&page=0&prefix=false&query=&sort=byPopularity&type={type}

Parameters

ParameterValuesDescription
dateRangelast24h, pastWeek, pastMonth, pastYearTime filter
typestory, show_hn, launch_hn, ask_hnPost type filter
sortbyPopularity, byDateSort order

Workflow

  1. Get browser context

    code
    tabs_context_mcp(createIfEmpty=true)
    tabs_create_mcp() if needed
    
  2. Navigate to HN Algolia with desired filters

    code
    navigate(url="https://hn.algolia.com/?dateRange=last24h&page=0&prefix=false&query=&sort=byPopularity&type=show_hn")
    wait(duration=2)
    
  3. Capture results via screenshot - the screenshot shows:

    • Post titles with external URLs in parentheses
    • Points count, author, time ago, comments count
    • Post descriptions/text for Show HN posts
  4. Extract data from screenshot:

    • Title and URL
    • Points (popularity metric)
    • Number of comments (engagement metric)
    • HN discussion URL format: https://news.ycombinator.com/item?id={id}

Important Notes

Launch HN is Rare

Launch HN posts are infrequent. If last24h returns 0 results:

code
navigate(url="...&dateRange=pastWeek&...&type=launch_hn")

Stories Include All Types

When filtering by type=story, results include Show HN posts. Filter duplicates when combining with Show HN results.

Data Extraction Tips

  • Points indicate popularity (higher = more interest)
  • Comments indicate engagement/controversy
  • Time ago helps assess freshness
  • External URLs are in parentheses after title
  • HN post ID can be derived from the discussion link

Example Queries

GoalURL Parameters
Top Show HN todaydateRange=last24h&type=show_hn&sort=byPopularity
Top stories this weekdateRange=pastWeek&type=story&sort=byPopularity
Recent Ask HNdateRange=last24h&type=ask_hn&sort=byDate
Launch HN (expand range)dateRange=pastWeek&type=launch_hn&sort=byPopularity

Exploration

For the main topics that deserve a deep dive, you should navigate to the website (clicking on the post) understand what it is about and compile the information. Feel free to add a tmp/MEMORY.md file to compose what will go or not to the final email