Top HN stories filtered by keywords relevant to your interests
If ${var} is set, only include stories matching that topic.
Read memory/MEMORY.md for tracked topics and interests. Read the last 2 days of memory/logs/ to avoid repeating stories.
Steps:
# Get top 30 story IDs
STORY_IDS=$(curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq '.[0:30][]')
# Fetch each story's metadata
for ID in $STORY_IDS; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${ID}.json"
done
https://news.ycombinator.com/item?id=ID./notify (under 4000 chars):
*HN Digest — ${today}*
1. [Title](url) (250 pts, 89 comments)
Summary of why it matters.
[Discussion](https://news.ycombinator.com/item?id=ID)
2. ...
The sandbox may block outbound curl. Use WebFetch as a fallback for any URL fetch. For auth-required APIs, use the pre-fetch/post-process pattern (see CLAUDE.md).