home / skills / openclaw / skills / hackernews

hackernews skill

/skills/gchapim/hackernews

This skill helps you browse, search, and fetch Hacker News stories, items, users, and comments with quick CLI commands.

npx playbooks add skill openclaw/skills --skill hackernews

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

Files (4)
SKILL.md
2.2 KB
---
name: hackernews
description: Browse and search Hacker News. Fetch top, new, best, Ask HN, Show HN stories and job postings. View item details, comments, and user profiles. Search stories and comments via Algolia. Find "Who is hiring?" threads. Use for any HN-related queries like "what's trending on HN?", "search HN for AI", "show comments on story X", "who is hiring?", "latest Ask HN posts".
---

# Hacker News

CLI tool for the Hacker News API. No authentication required.

## CLI Usage

Run `scripts/hn.sh <command>`. All commands support `--json` for raw JSON output.

### Browse Stories

```bash
# Top/trending stories (default 10)
scripts/hn.sh top
scripts/hn.sh top --limit 20

# Other lists
scripts/hn.sh new --limit 5     # newest
scripts/hn.sh best --limit 10   # highest rated
scripts/hn.sh ask                # Ask HN
scripts/hn.sh show               # Show HN
scripts/hn.sh jobs               # job postings
```

### View Item Details & Comments

```bash
# Full item details (story, comment, job, poll)
scripts/hn.sh item 12345678

# Top comments on a story
scripts/hn.sh comments 12345678
scripts/hn.sh comments 12345678 --limit 10 --depth 2
```

### User Profiles

```bash
scripts/hn.sh user dang
```

### Search

```bash
# Basic search
scripts/hn.sh search "rust programming"

# With filters
scripts/hn.sh search "LLM" --type story --sort date --period week --limit 5
scripts/hn.sh search "hiring remote" --type comment --period month
```

### Who is Hiring

```bash
# Latest "Who is hiring?" job postings
scripts/hn.sh whoishiring
scripts/hn.sh whoishiring --limit 20
```

## Common Workflows

| User asks | Command |
|---|---|
| "What's trending on HN?" | `scripts/hn.sh top` |
| "Latest Ask HN posts" | `scripts/hn.sh ask` |
| "Search HN for X" | `scripts/hn.sh search "X"` |
| "Show me comments on story Y" | `scripts/hn.sh comments Y` |
| "Who is hiring?" | `scripts/hn.sh whoishiring` |
| "Tell me about HN user Z" | `scripts/hn.sh user Z` |

## Notes

- Story lists use parallel fetching for speed
- HTML in comments/bios is auto-converted to plain text
- Timestamps shown as relative time ("2h ago", "3d ago")
- For API details, see [references/api.md](references/api.md)

Overview

This skill provides a command-line interface to browse and search Hacker News. It fetches top, new, best, Ask HN, Show HN stories and job postings, and lets you view item details, comments, and user profiles. Search is powered by Algolia for both stories and comments. No authentication is required, making quick HN lookups fast and easy.

How this skill works

The skill queries the Hacker News API and Algolia search to retrieve lists and individual items. Story lists (top, new, best, ask, show, jobs) are fetched in parallel for speed. It can render item details, comment threads with configurable depth and limits, user profiles, and special "Who is hiring?" threads. HTML in comments and bios is converted to plain text and timestamps are shown as relative times.

When to use it

  • Check what’s trending on Hacker News right now.
  • Browse latest Ask HN, Show HN, or job postings.
  • Inspect a story’s details and read top comments with depth control.
  • Search Hacker News stories or comments for specific keywords or time ranges.
  • Look up a user profile or recent activity quickly.
  • Retrieve the latest "Who is hiring?" threads and hiring posts.

Best practices

  • Use list limits to control output size (e.g., --limit 10) for faster responses.
  • When exploring comments, set depth and limit to focus on top-level discussion.
  • Use search filters (--type, --sort, --period) to narrow results to relevant stories or comments.
  • Prefer parallel list fetching for broad overviews; use item detail commands for focused inspection.
  • Convert HTML output to plain text if you need clean excerpts for sharing.

Example use cases

  • Show top 20 trending Hacker News stories to spot emerging topics.
  • Search HN for "AI startup funding" within the past week to find relevant discussions.
  • Fetch comments for a specific story and display the top 10 comments with depth 2.
  • List the latest Ask HN posts to discover community questions and feedback.
  • Get the current "Who is hiring?" job thread to find remote or on-site opportunities.

FAQ

Do I need an API key or authentication?

No. The skill uses public Hacker News API endpoints and Algolia search without requiring authentication.

Can I control how many comments or how deep the thread goes?

Yes. Commands accept limit and depth parameters so you can fetch only the amount of conversation you want.

How fresh is the data returned?

Lists and items are fetched live from Hacker News and Algolia, so results reflect current public data available from those services.