home / skills / openclaw / skills / hn

hn skill

/skills/dbhurley/hn

This skill lets you browse Hacker News top, new, best, ask, show, jobs and story details from the command line.

npx playbooks add skill openclaw/skills --skill hn

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.2 KB
---
name: hn
description: Browse Hacker News - top stories, new, best, ask, show, jobs, and story details with comments.
homepage: https://news.ycombinator.com
metadata: {"clawdis":{"emoji":"📰","requires":{"bins":["curl"]}}}
---

# Hacker News

Read Hacker News from the command line.

## Commands

### Top Stories
```bash
uv run {baseDir}/scripts/hn.py top          # Top 10 stories
uv run {baseDir}/scripts/hn.py top -n 20    # Top 20 stories
```

### Other Feeds
```bash
uv run {baseDir}/scripts/hn.py new          # Newest stories
uv run {baseDir}/scripts/hn.py best         # Best stories
uv run {baseDir}/scripts/hn.py ask          # Ask HN
uv run {baseDir}/scripts/hn.py show         # Show HN
uv run {baseDir}/scripts/hn.py jobs         # Jobs
```

### Story Details
```bash
uv run {baseDir}/scripts/hn.py story <id>              # Story with top comments
uv run {baseDir}/scripts/hn.py story <id> --comments 20 # More comments
```

### Search
```bash
uv run {baseDir}/scripts/hn.py search "AI agents"      # Search stories
uv run {baseDir}/scripts/hn.py search "Claude" -n 5    # Limit results
```

## API

Uses the official [Hacker News API](https://github.com/HackerNews/API) (no auth required).

Overview

This skill provides command-line access to Hacker News feeds and story details. It lets you list top, new, best, ask, show, and jobs stories, view story threads with comments, and perform simple searches. The interface is lightweight and designed for quick reading and reference from a terminal.

How this skill works

The skill queries the official Hacker News API (no authentication required) to fetch story lists and individual items. Commands map to different feeds and support pagination or limits for the number of results. Story detail commands retrieve the post plus top comments and allow specifying how many comments to display.

When to use it

  • Quickly scan Hacker News top stories from a terminal or script.
  • Fetch newest, best, Ask HN, Show HN, or Jobs feeds without opening a browser.
  • Retrieve a story thread and top comments for offline review or archiving.
  • Automate periodic checks of HN for monitoring trends or mentions.
  • Search for specific topics or authors across recent HN stories.

Best practices

  • Specify a reasonable result limit (e.g., -n 10 or 20) to avoid long outputs.
  • Use story <id> with --comments to control comment depth for readability.
  • Combine commands with shell tools (grep, jq, awk) for custom filtering.
  • Cache results if you call the API frequently to avoid unnecessary requests.
  • Run searches with concise queries to get focused results quickly.

Example use cases

  • Show the current top 20 Hacker News stories for a morning roundup.
  • List the latest Ask HN threads to find community questions to answer.
  • Fetch a story and its top 20 comments for research or quoting.
  • Search HN for coverage of a product name or technology to gather signals.
  • Monitor job listings on HN by periodically pulling the jobs feed.

FAQ

Does this require API keys or authentication?

No. It uses the public Hacker News API, which does not require authentication.

Can I limit the number of stories or comments returned?

Yes. Feed commands accept a limit flag and the story command accepts a comments count option.