rss-agent-discovery について
rss-agent-discoveryは、WebサイトのRSSおよびAtomフィードを検出・検証するコマンドラインツールです。エージェントのワークフローやスクリプト向けに、診断情報と終了コードを含むJSONを出力します。
主な機能
- 01HTMLと一般的なパスからフィードを検出
- 02ブログのサブディレクトリをスキャン
- 03複数URLを並列処理
- 04フィードの重複排除と検証
- 05JSON出力と診断情報
活用シーン
- 01エージェントのワークフロー向けフィード検出
- 02複数サイトのフィード収集
- 03シェルスクリプトでのフィード確認の自動化
- 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 や検証エラーなどの追加情報を出力します
推奨される統合パターン:
- stdout を JSON として解析します(エラー時も常に有効な JSON です)
- 全体のステータスを確認するには、
successフィールドを確認します success === falseの場合、フィードが見つかったかどうかを確認するにはpartialResultsを確認します- URL ごとのエラーを確認するには、各結果の
errorフィールドを確認します - 警告や致命的でない問題を確認するには、
diagnostics配列を確認します --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
詳細情報
コメント
Markdown 対応