mcpField
R
rss-fetch

rss-fetch

github.com/okou-aiProductivity8179 installsUpdated 1w ago
Repository

About rss-fetch

rss-fetch is a command-line guide to retrieving and parsing RSS and Atom feeds. It is for users who need to extract titles, links, or dates, or inspect several feeds in scripts.

Key features

  1. 01Fetch feeds with curl
  2. 02Parse XML with xmllint and XPath
  3. 03Extract item titles, links, and dates
  4. 04Use Hacker News RSS parameters
  5. 05Process multiple feeds in a loop

Use cases

  1. 01Check popular Hacker News items
  2. 02Filter HN feeds by keyword or points
  3. 03Extract feed item details in scripts
  4. 04Save a feed file and parse its contents

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/okou-ai/okou-skills --skill rss-fetch

After installing, type/rss-fetchin Claude Code to confirm it loaded.

Details

From the project README

How to Use

1. Fetch Raw RSS Feed
curl -s "https://hnrss.org/frontpage" | head -100
2. Parse RSS with xmllint

Extract titles from RSS feed:

curl -s "https://hnrss.org/frontpage" | xmllint --xpath '//item/title/text()' - 2>/dev/null

Extract titles and links:

curl -s "https://hnrss.org/frontpage" | xmllint --format - | grep -E '<title>|<link>' | head -20
3. Get Items with Details
curl -s "https://hnrss.org/frontpage" | xmllint --xpath '//item' - 2>/dev/null | xmllint --format - | head -50
4. Parse Atom Feeds

Atom feeds use <entry> instead of <item>:

curl -s "https://github.com/blog.atom" | xmllint --xpath '//entry/title/text()' - 2>/dev/null

Popular RSS Feeds

SourceURL
Hacker Newshttps://hnrss.org/frontpage
HN Besthttps://hnrss.org/best
TechCrunchhttps://techcrunch.com/feed/
Ars Technicahttps://feeds.arstechnica.com/arstechnica/index
The Vergehttps://www.theverge.com/rss/index.xml
Reddit (any sub)https://www.reddit.com/r/programming/.rss
GitHub Bloghttps://github.blog/feed/

Examples

Fetch Hacker News Top Stories
curl -s "https://hnrss.org/frontpage?count=10" | xmllint --xpath '//item/title/text()' - 2>/dev/null | tr '\n' '\n'
Get Story Links
curl -s "https://hnrss.org/frontpage?count=5" | grep -oP '<link>\K[^<]+' | grep -v hnrss
Fetch Multiple Feeds
FEEDS=(
  "https://hnrss.org/frontpage?count=5"
  "https://techcrunch.com/feed/"
)

for feed in "${FEEDS[@]}"; do
  echo "=== $feed ==="
  curl -s "$feed" | xmllint --xpath '//item/title/text()' - 2>/dev/null | head -5
  echo ""
done
Extract Title, Link, and Date
curl -s "https://hnrss.org/frontpage?count=3" | xmllint --format - | awk '
  /<item>/ { in_item=1 }
  /<\/item>/ { in_item=0; print "---" }
  in_item && /<title>/ { gsub(/<[^>]*>/, ""); print "Title: " $0 }
  in_item && /<link>/ { gsub(/<[^>]*>/, ""); print "Link: " $0 }
  in_item && /<pubDate>/ { gsub(/<[^>]*>/, ""); print "Date: " $0 }
  '
Save Feed to File
curl -s "https://hnrss.org/frontpage" -o /tmp/hn-feed.xml
xmllint --xpath '//item/title/text()' /tmp/hn-feed.xml

HN RSS Options

Hacker News RSS (hnrss.org) supports parameters:

ParameterDescription
count=NNumber of items (default 20)
points=NMinimum points
comments=NMinimum comments
q=keywordSearch keyword
# Top stories with 100+ points
curl -s "https://hnrss.org/frontpage?points=100&count=10"

# Search for "AI" topics
curl -s "https://hnrss.org/frontpage?q=AI&count=10"

RSS vs Atom Format

ElementRSSAtom
Container<item><entry>
Title<title><title>
Link<link><link href="...">
Summary<description><summary>
Date<pubDate><published>

Guidelines

  1. Check feed format: Use head first to see if it's RSS or Atom
  2. Use xmllint: Best tool for XPath queries on XML
  3. Handle errors: Some feeds may be slow or rate-limited
  4. Respect robots.txt: Don't hammer feeds with requests
  5. Cache results: Feeds don't update every second

Comments

Markdown supported