hackernews
Hacker News API via curl. Use this skill to fetch top stories, new posts, comments, and user profiles from Hacker News.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Hacker News API via curl. Use this skill to fetch top stories, new posts, comments, and user profiles from Hacker News.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Writes comprehensive READMEs serving both human readers and AI agent readers. Use when user says "用 GitHub Skill", "productize README", or asks to create a product-grade README for a repo.
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Use when implementing any feature or bugfix, before writing implementation code
| name | hackernews |
| description | Hacker News API via curl. Use this skill to fetch top stories, new posts, comments, and user profiles from Hacker News. |
| platform | both |
| scope | agent:monica |
Use the official Hacker News API via direct curl calls to fetch stories, comments, and user data.
Official docs:
https://github.com/HackerNews/API
Use this skill when you need to:
No API key required! The Hacker News API is completely free and open.
Base URL: https://hacker-news.firebaseio.com/v0
Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'
Fetch IDs of the current top 500 stories:
bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"' | jq '.[:10]'
Fetch the best stories (highest voted over time):
bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/beststories.json"' | jq '.[:10]'
Fetch the newest stories:
bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/newstories.json"' | jq '.[:10]'
Fetch "Ask HN" posts:
bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/askstories.json"' | jq '.[:10]'
Fetch "Show HN" posts:
bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/showstories.json"' | jq '.[:10]'
Fetch job postings:
bash -c '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:
bash -c '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"
bash -c '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
bash -c '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
bash -c '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)