This hooks you into the official Hacker News API to pull stories, comments, and user profiles without dealing with scraping or authentication. You get all the standard feeds (top, new, best, Ask HN, Show HN, jobs) plus granular item lookups and user karma data. The API is straightforward Firebase endpoints returning JSON, no rate limits published but you'll want to be reasonable since every story detail needs its own request. The skill includes practical filters for high-scoring posts and topic-specific searches using jq. Honestly most useful when you need to analyze HN trends, monitor specific topics, or build dashboards without hitting the website. Just remember to cache aggressively since stories don't update that often.
npx -y skills add vm0-ai/vm0-skills --skill hackernews --agent claude-codeInstalls into .claude/skills of the current project.
Fetch IDs of the current top 500 stories:
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq '.[:10]'
Fetch the best stories (highest voted over time):
curl -s "https://hacker-news.firebaseio.com/v0/beststories.json" | jq '.[:10]'
Fetch the newest stories:
curl -s "https://hacker-news.firebaseio.com/v0/newstories.json" | jq '.[:10]'
Fetch "Ask HN" posts:
curl -s "https://hacker-news.firebaseio.com/v0/askstories.json" | jq '.[:10]'
Fetch "Show HN" posts:
curl -s "https://hacker-news.firebaseio.com/v0/showstories.json" | jq '.[:10]'
Fetch job postings:
curl -s "https://hacker-news.firebaseio.com/v0/jobstories.json" | jq '.[:10]'
Fetch full details for any item by ID. Replace <item-id> with the actual item ID:
curl -s "https://hacker-news.firebaseio.com/v0/item/<item-id>.json"
Response fields:
| Field | Description |
|---|---|
id | Unique item ID |
type | story, comment, job, poll, pollopt |
by | Username of author |
time | Unix timestamp |
title | Story title (stories only) |
url | Story URL (if external link) |
text | Content text (Ask HN, comments) |
score | Upvote count |
descendants | Total comment count |
kids | Array of child comment IDs |
Fetch top 5 stories with full details. Replace <item-id> with the actual item ID:
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq '.[:5][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq '{id, title, score, url, by}'
done
Fetch a story and its top-level comments. Replace <story-id> with the actual story ID:
curl -s "https://hacker-news.firebaseio.com/v0/item/<story-id>.json" | jq '{title, score, descendants, kids}'
Then for each comment ID in the kids array, replace <comment-id> with the actual comment ID:
curl -s "https://hacker-news.firebaseio.com/v0/item/<comment-id>.json" | jq '{by, text, score}'
Fetch user details. Replace <username> with the actual username:
curl -s "https://hacker-news.firebaseio.com/v0/user/<username>.json"
Response fields:
| Field | Description |
|---|---|
id | Username |
created | Account creation timestamp |
karma | User's karma score |
about | User bio (HTML) |
submitted | Array of item IDs submitted |
Fetch a user's recent submissions. Replace <username> with the actual username:
curl -s "https://hacker-news.firebaseio.com/v0/user/<username>.json" | jq '.submitted[:5]'
Get the current largest item ID (useful for polling new items):
curl -s "https://hacker-news.firebaseio.com/v0/maxitem.json"
Get recently changed items and profiles (for real-time updates):
curl -s "https://hacker-news.firebaseio.com/v0/updates.json"
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq '.[:10][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq -r '"\(.score) points | \(.title) | \(.url // "Ask HN")"'
done
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq '.[:30][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq -r 'select(.score >= 100) | "\(.score) | \(.title)"'
done
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq '.[:50][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq -r 'select(.title | test("AI|GPT|LLM|Machine Learning|Neural"; "i")) | "\(.score) | \(.title)"'
done
| Endpoint | Description |
|---|---|
/v0/topstories.json | Top 500 stories |
/v0/beststories.json | Best stories |
/v0/newstories.json | Newest 500 stories |
/v0/askstories.json | Ask HN stories |
/v0/showstories.json | Show HN stories |
/v0/jobstories.json | Job postings |
/v0/item/{id}.json | Item details |
/v0/user/{id}.json | User profile |
/v0/maxitem.json | Current max item ID |
/v0/updates.json | Changed items/profiles |
url for Ask HN)juliusbrussee/caveman
mattpocock/skills
shadcn/improve
obra/superpowers
forrestchang/andrej-karpathy-skills
vercel-labs/skills