mcpField
R
rss-skill

rss-skill

github.com/atopos31生产力1150 次安装32 周前更新
代码仓库

关于 rss-skill

面向使用 Agent 的用户,介绍通过 agent-rss 命令行工具获取和筛选 RSS/Atom 订阅的操作指南。工具输出结构化 JSON,支持按时间及标题或内容关键词过滤。

主要功能

  1. 01管理订阅源
  2. 02获取单个或全部订阅内容
  3. 03按时间范围筛选
  4. 04按标题或内容关键词筛选
  5. 05输出 JSON 或 NDJSON

适用场景

  1. 01查看最近更新的新闻
  2. 02筛选特定主题的订阅内容
  3. 03获取每日新闻并供后续总结

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/atopos31/agent-rss --skill rss-skill

安装后在 Claude Code 中输入/rss-skill确认已加载。

详细介绍

使用 agent-rss 管理 RSS Feed

概述

agent-rss 是一款用于获取和筛选 RSS/Atom Feed 的命令行工具。它会输出结构化 JSON,便于处理。

检查是否已安装

首先,检查是否已安装 agent-rss:

which agent-rss || echo "not installed"

如果尚未安装:

npm install -g @atopos31/agent-rss

核心命令

管理订阅
# Add a feed
agent-rss add <name> <url>

# List all feeds
agent-rss list

# Get a specific feed
agent-rss get <name>

# Update a feed
agent-rss update <name> --src <new-url>

# Remove a feed
agent-rss remove <name>
获取 RSS
# Fetch specific feed
agent-rss fetch --name <name>

# Fetch all feeds
agent-rss fetch --all

# Output as JSON array (default is NDJSON)
agent-rss fetch --all --format json
按时间筛选
# Relative time (recommended for agents)
agent-rss fetch --all --since 1h      # past 1 hour
agent-rss fetch --all --since 2d      # past 2 days
agent-rss fetch --all --since 30m     # past 30 minutes

# Absolute time
agent-rss fetch --all --since 2026-03-12
agent-rss fetch --all --since 2026-03-12T08:00:00+08:00
按关键词筛选
# Filter by title
agent-rss fetch --all --title "AI" --title "ML"

# Filter by content
agent-rss fetch --all --content "machine learning"

# Combine filters
agent-rss fetch --all --since 1d --title "AI"

最佳实践:输出到文件

重要:命令行输出可能会因大小限制而被截断。请始终将输出写入文件,然后再读取:

# Step 1: Write to file
agent-rss fetch --all --since 1d > /tmp/rss-output.json

# Step 2: Use Read tool to access full content
# Read /tmp/rss-output.json

这样可确保数据不会因输出截断而丢失。

输出格式

每个条目包含:

{
  "name": "feed-name",
  "src": "https://example.com/rss",
  "time": "2026-03-12T15:30:00+08:00",
  "title": "Article Title",
  "content": "Article content or summary",
  "link": "https://example.com/article",
  "id": "unique-id"
}

常见工作流

查看近期新闻
agent-rss fetch --all --since 1h > /tmp/recent.json
# Then read /tmp/recent.json
搜索特定主题
agent-rss fetch --all --since 1d --title "AI" --title "LLM" > /tmp/ai-news.json
# Then read /tmp/ai-news.json
每日新闻摘要
agent-rss fetch --all --since 24h --format json > /tmp/daily.json
# Then read /tmp/daily.json and summarize

查找 RSS Feed

精选 RSS Feed 参见:https://github.com/JackyST0/awesome-rsshub-routes

故障排除

  • 如果 Feed 超时,请尝试使用 --name 单独获取该 Feed
  • 使用 --format json 输出 JSON 数组
  • 时间以本地时区显示

评论

支持 Markdown