mcpField
R
rss-agent-discovery

rss-agent-discovery

github.com/brooksy4503生産性2176 回インストール39 週間前に更新
リポジトリ

rss-agent-discovery について

rss-agent-discoveryは、WebサイトのRSSおよびAtomフィードを検出・検証するコマンドラインツールです。エージェントのワークフローやスクリプト向けに、診断情報と終了コードを含むJSONを出力します。

主な機能

  1. 01HTMLと一般的なパスからフィードを検出
  2. 02ブログのサブディレクトリをスキャン
  3. 03複数URLを並列処理
  4. 04フィードの重複排除と検証
  5. 05JSON出力と診断情報

活用シーン

  1. 01エージェントのワークフロー向けフィード検出
  2. 02複数サイトのフィード収集
  3. 03シェルスクリプトでのフィード確認の自動化
  4. 04URLや検証エラーの調査

インストール

コマンドをコピーしてターミナルで実行します。

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

インストール後、Claude Code で/rss-agent-discoveryを入力して読み込まれたか確認します。

詳細

RSS エージェント検出

AI エージェント向けに、機械で解析可能な JSON 出力で RSS フィードを検出するツールです。

クイックスタート

npx -y rss-agent-discovery https://vercel.com

出力:

{
  "success": true,
  "results": [{
    "url": "https://vercel.com/",
    "feeds": [{
      "url": "https://vercel.com/atom",
      "title": "atom",
      "type": "atom"
    }],
    "error": null,
    "diagnostics": []
  }]
}

基本的なワークフロー

npx -y rss-agent-discovery <url> [url2] [url3]...

JSON 出力を解析する:

npx -y rss-agent-discovery https://example.com | jq '.results[0].feeds'

出力スキーマ

{
  success: boolean,           // true if no URLs had errors
  partialResults?: boolean,   // true if success=false but some feeds found
  results: [{
    url: string,              // scanned URL
    feeds: [{
      url: string,            // feed URL
      title: string,          // feed title from HTML
      type: 'rss' | 'atom' | 'unknown'
    }],
    error: string | null,     // error message if scan failed (timeout errors normalized to "Timeout")
    diagnostics?: string[]    // optional array of warning messages for non-fatal issues
  }]
}

出力仕様

デフォルトの動作(--verbose なし):

  • stdout には JSON のみを出力します(機械で解析可能)
  • stderr には出力しません(プログラムでの処理に適しています)
  • すべてのエラーと警告を JSON 構造に含めます

詳細モード(--verbose):

  • stdout への JSON 出力は変更されません
  • stderr にデバッグログを出力します(トラブルシューティングに便利です)
  • スキップされた URL や検証エラーなどの追加情報を出力します

推奨される統合パターン:

  1. stdout を JSON として解析します(エラー時も常に有効な JSON です)
  2. 全体のステータスを確認するには、success フィールドを確認します
  3. success === false の場合、フィードが見つかったかどうかを確認するには partialResults を確認します
  4. URL ごとのエラーを確認するには、各結果の error フィールドを確認します
  5. 警告や致命的でない問題を確認するには、diagnostics 配列を確認します
  6. --verbose フラグは、トラブルシューティングやデバッグの際にのみ使用します

終了コード

  • 0 - 1 つ以上のフィードが見つかった場合(または --help / --version を使用した場合)
  • 1 - フィードが見つからなかった場合
  • 2 - エラーが発生した場合

自動化では終了コードを使用します:

npx -y rss-agent-discovery https://example.com
if [ $? -eq 0 ]; then
  echo "Feeds found!"
fi

オプション

--timeout <ms>          # Timeout per URL (default: 10000)
--skip-blogs           # Skip blog subdirectory scanning
--max-blogs <n>        # Limit blog scans (default: 3)
--blog-paths <paths>   # Custom blog paths (comma or pipe separated)
--verbose              # Enable debug logging to stderr (default: JSON-only output)
--help                 # Show help
--version              # Show version

例:

npx -y rss-agent-discovery --timeout 15000 https://example.com
npx -y rss-agent-discovery --skip-blogs https://example.com
npx -y rss-agent-discovery --blog-paths '/blog,/news,/articles' https://example.com
npx -y rss-agent-discovery --blog-paths '/blog|/updates' https://example.com
npx -y rss-agent-discovery --max-blogs 5 https://example.com

機能

  • HTML の <link> タグからフィードを検出します
  • 一般的なパス(/rss.xml、/atom、/feed など)をテストします
  • ブログのサブディレクトリ(/blog、/news、/articles)をスキャンします
  • 複数の URL を並列処理します
  • すべてのソースから検出したフィードの重複を除外します
  • フィードが実際に XML を返すことを検証します
  • stdout には JSON のみを出力します(デフォルトではクリーンで、stderr への出力はありません)
  • エラーと警告を JSON 構造に含めます
  • タイムアウトエラーを、一貫性のある「Timeout」メッセージに正規化します

よくあるパターン

単一 URL の検出
npx -y rss-agent-discovery https://example.com | jq '.results[0].feeds[].url'
複数の URL(並列処理)
npx -y rss-agent-discovery https://site1.com https://site2.com https://site3.com
すべてのフィード URL を抽出する
npx -y rss-agent-discovery https://example.com | jq -r '.results[0].feeds[].url'
解析せずにフィードの有無を確認する
npx -y rss-agent-discovery https://example.com
exit_code=$?
[ $exit_code -eq 0 ] && echo "Feeds found"
応答の遅いサイト向けのカスタムタイムアウト
npx -y rss-agent-discovery --timeout 20000 https://slow-site.com
高速化のためにブログのスキャンをスキップする
npx -y rss-agent-discovery --skip-blogs https://example.com

統合例

シェルスクリプト
#!/bin/bash
# No need to redirect stderr - it's clean by default
result=$(npx -y rss-agent-discovery "$1")
if [ $? -eq 0 ]; then
  echo "Found feeds:"
  echo "$result" | jq '.results[0].feeds'
fi
Python
import subprocess
import json

result = subprocess.run(
  ['npx', '-y', 'rss-agent-discovery', url],
  capture_output=True,
  text=True
)

if result.returncode == 0:
  data = json.loads(result.stdout)
  feeds = data['results'][0]['feeds']
JavaScript/Node.js
const { execSync } = require('child_process');
const result = JSON.parse(
  execSync('npx -y rss-agent-discovery https://example.com').toString()
);
const feeds = result.results[0].feeds;

このツールを使う理由

既存の RSS 検出ツール(rss-url-finder、rss-finder)は人間向けに設計されています。

  • 人間が読みやすいテキストを出力します
  • フィードの存在を検証しません
  • 構造化された機械向けの出力がありません

このツールは AI エージェント向けに設計されています。

  • stdout には JSON のみを出力します(機械で解析可能)
  • デフォルトでクリーンな出力です(--verbose を有効にしない限り stderr への出力はありません)
  • すべてのエラーと警告を JSON 構造に含めます
  • 意味のある終了コードを使用します
  • フィードが XML を返すことを検証します
  • タイムアウトエラーを一貫性のある形式に正規化します
  • AI エージェントが見落とすフィードも検出します

テスト

ツールが動作することをテストします:

npx -y rss-agent-discovery https://vercel.com
npx -y rss-agent-discovery https://news.ycombinator.com

詳細情報

コメント