Claude-skill-registry hackernews
Comprehensive toolkit for fetching, searching, analyzing, and monitoring Hacker News content. Use when Claude needs to interact with Hacker News for (1) Fetching top/new/best/ask/show/job stories, (2) Searching for specific topics or keywords, (3) Monitoring specific users or tracking their activity, (4) Analyzing trending topics and patterns, (5) Getting story details, comments, or user profiles, or (6) Any other task involving Hacker News data retrieval or analysis.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/hackernews" ~/.claude/skills/majiayu000-claude-skill-registry-hackernews && rm -rf "$T"
skills/data/hackernews/SKILL.mdHacker News Skill
Overview
This skill provides comprehensive access to Hacker News through both the official Firebase API and Algolia Search API. Use the provided scripts to fetch stories, search content, monitor users, and analyze trending topics.
Core Capabilities
1. Fetch Stories
Use
scripts/fetch_stories.py to retrieve stories from different categories.
Available story types:
- Top ranked stories (front page)top
- Newest storiesnew
- Best stories (highest quality)best
- Ask HN postsask
- Show HN postsshow
- Job postingsjob
Usage:
cd /home/claude/hackernews/scripts python3 fetch_stories.py --type top --limit 10 python3 fetch_stories.py --type ask --limit 20 --detailed
Common patterns:
- For current front page: Use
--type top - For latest posts: Use
--type new - For highest quality: Use
--type best - For detailed info: Add
flag--detailed
2. Search Content
Use
scripts/search_hn.py to search across all HN content using Algolia's search API.
Search types:
- Search everythingall
- Stories onlystory
- Comments onlycomment
- Ask HN posts onlyask
- Show HN posts onlyshow
Sort options:
- Most relevant results (default)relevance
- Most recent resultsdate
Usage:
cd /home/claude/hackernews/scripts python3 search_hn.py "AI security" --type story --limit 20 python3 search_hn.py "Rust" --sort date --limit 15 python3 search_hn.py "" --author pg --limit 10
Common patterns:
- For topic search:
search_hn.py "topic keywords" --type story - For recent discussions: Add
--sort date - For user activity: Use
--author username
3. Monitor Users
Use
scripts/user_monitor.py to track specific users and view their activity.
Usage:
cd /home/claude/hackernews/scripts python3 user_monitor.py pjmlp --limit 10 python3 user_monitor.py pg sama dang --limit 5 python3 user_monitor.py username --type story --activity-only
Features:
- View user profile (karma, account age, about)
- See recent submissions (stories, comments, etc.)
- Filter by item type
- Monitor multiple users at once
Options:
- Number of recent items per user--limit
- Filter by story/comment/poll/job--type
- Skip profile, show only activity--activity-only
- Show only profile, skip activity--profile-only
4. Analyze Trends
Use
scripts/analyze_trends.py to identify trending topics and patterns.
Usage:
cd /home/claude/hackernews/scripts python3 analyze_trends.py --limit 100 --type top python3 analyze_trends.py --compare
Provides:
- Top trending keywords from story titles
- Most submitted domains
- Most active authors
- Overall statistics (avg score, comments)
- Top stories by score and engagement
- Comparison across story types (when using
)--compare
Typical workflow:
- Run with
for good sample size--limit 50-200 - Use
for current trends--type top - Use
for emerging topics--type new - Use
for comprehensive analysis--compare
5. Programmatic Access
For custom workflows, import the API modules directly:
import sys sys.path.append('/home/claude/hackernews/scripts') from hn_api import HNClient, format_item from search_hn import HNSearchClient # Use Firebase API client = HNClient() top_ids = client.get_top_stories(limit=5) for sid in top_ids: item = client.get_item(sid) print(format_item(item)) # Use Search API search = HNSearchClient() results = search.search_stories("machine learning", num_results=10) for hit in results['hits']: print(hit['title'])
Quick Decision Guide
User asks for current/top stories? → Use
fetch_stories.py --type top
User asks to search for a topic? → Use
search_hn.py "topic" --type story
User asks about a specific user? → Use
user_monitor.py username
User asks about trending topics? → Use
analyze_trends.py --limit 100
User asks for Ask/Show HN? → Use
fetch_stories.py --type ask or --type show
User wants detailed analysis? → Use
analyze_trends.py --compare
Important Notes
- Always use full paths - Scripts are in
/home/claude/hackernews/scripts - Check for requests dependency - Install with
if neededpip install requests - Handle missing data - HN items can be deleted; check for None/null
- Respect rate limits - Algolia allows 10,000 requests/hour per IP
- Cache when possible - HN data updates slowly; cache responses
Additional Resources
- API Reference: See
for complete API documentationreferences/api_reference.md - Usage Examples: See
for detailed workflow examplesreferences/examples.md
Scripts Reference
All scripts located in
/home/claude/hackernews/scripts/:
- hn_api.py - Core Firebase API client (can be imported)
- fetch_stories.py - Fetch stories by type (top/new/best/ask/show/job)
- search_hn.py - Search HN using Algolia API
- user_monitor.py - Monitor user profiles and activity
- analyze_trends.py - Analyze trending topics and patterns