hackernews-scraper
Scrape top Hacker News stories, filter by topic or keyword, and return structured JSON data including titles, URLs, scores, and comment counts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scrape top Hacker News stories, filter by topic or keyword, and return structured JSON data including titles, URLs, scores, and comment counts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run AI coding agents on disposable repo clones. The agent works on a clone — it can't touch your real repo. An optional container (Podman or Docker) provides build/test isolation. You review the diff and decide what (if anything) to apply.
Create Deezer playlists programmatically from any query — similar artists, genre mixes, festival lineups, mood-based collections. Four-tier data pipeline: Deezer public REST API + Last.fm scrobble data for discovery, GQL Pipe API for smart mixes and playlist creation, web search for subjective curation. Uses ARL cookie auth — no OAuth app required.
Generate compact AI-readable context maps from codebases — tools like codesight, repomix, agentic-context that pre-compute project structure to save tokens in AI coding sessions.
Research-focused query handling with multi-source synthesis, citations, and Obsidian persistence. Like a self-hosted Perplexity/Vane but CLI-native. Best for quick-to-medium lookups using Kagi. Use when the user asks factual questions, needs citations, or wants a direct answer — not a full research report (use deep-research) or social sentiment (use last30days). Triggers on: research, look into, what's the latest on, compare, explain, investigate.
Write articles, guides, blog posts, tutorials, newsletter issues, research reports, and deep research outputs in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, deep research on a topic, or a research report — especially when voice consistency, structure, and credibility matter. Triggers on: 'write an article', 'research report', 'deep research', 'long-form', 'blog post', 'guide', 'newsletter', 'white paper', 'research paper'.
Systematic research methodology for major consumer durables (appliances, HVAC, power tools, outdoor equipment) and smart garden/outdoor devices (bird feeder cameras, bird baths, smart outdoor gadgets). Emphasis on real reliability data, failure mode analysis, and head-to-head comparison. Use when the user asks to research, review, compare, or evaluate major purchases where longevity and repair risk matter, or when researching smart bird feeders, bird bath cameras, and similar connected outdoor devices. Triggers on: washer/dryer, refrigerator, dishwasher, HVAC, furnace, AC, generator, power tool, appliance reviews, appliance reliability, which [appliance] to buy, compare models, bird feeder camera, bird bath camera, smart garden devices.
| name | hackernews-scraper |
| description | Scrape top Hacker News stories, filter by topic or keyword, and return structured JSON data including titles, URLs, scores, and comment counts. |
Scrape top Hacker News stories with filtering and search capabilities.
# Get top stories
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | head -20
# Get story details
curl -s "https://hacker-news.firebaseio.com/v0/item/12345.json"
# Scrape stories with AI/ML keywords
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | xargs -I {} curl -s "https://hacker-news.firebaseio.com/v0/item/{}.json" | jq 'select(.title | contains("AI") or contains("machine learning"))'
| Type | Endpoint |
|---|---|
| Top | /v0/topstories.json |
| New | /v0/newstories.json |
| Best | /v0/beststories.json |
| Ask | /v0/askstories.json |
| Show | /v0/showstories.json |
| Job | /v0/jobstories.json |
{
"id": 12345,
"title": "Show HN: My Project",
"url": "https://example.com",
"score": 150,
"by": "username",
"time": 1234567890,
"descendants": 45,
"type": "story"
}
| Task | Example |
|---|---|
| Get top 30 | curl -s ".../topstories.json" |
| Filter by score | jq 'select(.score > 100)' |
| Get comments | /v0/item/{id}.json -> .kids |
For programmatic processing (recommended over shell commands):
import requests
def fetch_hn_stories(story_type='top', limit=10, min_score=0):
"""
Fetch Hacker News stories with filtering.
story_type: 'top', 'new', 'best', 'ask', 'show', 'job'
Returns list of story dicts with: id, title, url, score, by, time, descendants
"""
type_map = {
'top': 'topstories',
'new': 'newstories',
'best': 'beststories',
'ask': 'askstories',
'show': 'showstories',
'job': 'jobstories'
}
# Get story IDs
response = requests.get(
f"https://hacker-news.firebaseio.com/v0/{type_map.get(story_type, 'topstories')}.json"
)
story_ids = response.json()[:limit]
# Fetch details for each story
stories = []
for story_id in story_ids:
story_response = requests.get(
f"https://hacker-news.firebaseio.com/v0/item/{story_id}.json"
)
story = story_response.json()
if story and story.get('score', 0) >= min_score:
stories.append({
'id': story.get('id'),
'title': story.get('title'),
'url': story.get('url', f"https://news.ycombinator.com/item?id={story_id}"),
'score': story.get('score', 0),
'author': story.get('by', 'unknown'),
'comments': story.get('descendants', 0),
'time': story.get('time'),
'type': story.get('type')
})
return stories
# Example usage
stories = fetch_hn_stories(story_type='top', limit=10, min_score=50)
for s in stories:
print(f"{s['title']} ({s['score']} points by @{s['author']})")
For cron jobs, use the self-contained script pattern — the script fetches stories, enriches with LLM summaries, and sends email directly. This avoids security scanner blocks on .dev TLDs in story URLs (heredoc execution is blocked in cron mode).
Production script: ~/.hermes/scripts/hn_enriched.py — fetches top 10 stories, enriches via Gemini 2.5 Flash (NanoGPT), sends formatted HTML+text email via AgentMail SDK.
Key pitfalls:
content field is always empty, output goes to reasoning field. Use google/gemini-2.5-flash instead..dev TLD security scanner block).import sys
sys.path.insert(0, os.path.expanduser('~/.hermes/skills/agentmail/agentmail/scripts'))
from agentmail_helper import get_client
stories = fetch_hn_stories(limit=10)
html_body = format_stories_as_html(stories) # Your formatting function
text_body = format_stories_as_text(stories)
client = get_client()
client.inboxes.messages.send(
inbox_id='herman-the-hermes-agent@agentmail.to',
to='your-email@example.com',
subject='Weekly HackerNews Top 10',
text=text_body,
html=html_body
)
See github-trending skill for a complete weekly email digest pattern.
requests handles JSON automaticallyNone responses when fetching individual stories| Name | Type | Description | Required |
|---|---|---|---|
| topic | text | Topic or keyword to filter stories by (e.g. "AI", "Rust", "startups") | No |
| story_type | text | Type of stories to fetch: top | new |
| min_score | number | Minimum score threshold. Stories below this are excluded. Defaults to 0. | No |
| limit | number | Maximum number of stories to return. Defaults to 20, max 100. | No |
| Name | Type | Description | Required |
|---|---|---|---|
| stories | json | JSON array of story objects with fields: id, title, url, score, by, time, descendants (comment count), type. | Yes |