Communitygithub.com

RSS / Atom フィードリーダー

標準ライブラリのみで RSS 2.0 または Atom フィードを解析し、正規化されたアイテム辞書 (title, link, id, published, summary) を返します。feedparser は不要です。ユーザーが RSS/Atom フィードの読み取り、ブログやニュースフィードのポーリング、フィードエントリの抽出、フィードを公開するサイトの監視を依頼した場合に使用します。

Atom フィードリーダー とは?

このスキルは、サードパーティの依存関係なしに、RSS 2.0 および Atom フィードを単一の正規化された形式で解析するための軽量なユーティリティを提供します。`xml.etree.ElementTree` を使用して一度解析し、両方のフィード形式から `title`、`link`、`id`、`published`、`summary` を抽出します。これにより、重複排除(`id` による)、ダイジェスト作成、アラート送信といった後続処理がフィード形式に依存しなくなります。主に Claude Code、Cursor、Codex などの AI エージェント向けに設計されており、ユーザーが「この RSS フィードを読んで」「ブログフィードをポーリングして」「Atom フィードから最新エントリを取得して」と指示したときに自動的に呼び出されます。このスキルは、ネットワーク処理をパーサーから分離し、バイト列またはテキストを渡すことで純粋でテスト可能な状態を保ちます。重複排除のための安定した ID として、`guid`/Atom `id` をリンクにフォールバックするため、どのエントリも一意に識別可能です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/baronguyen001/ai-automation-skills/tree/HEAD/skills/rss-feed-reader

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Atom フィードリーダー は何をしますか?

このスキルは、スクリプトがフィードを読み取る必要がある場合に、サードパーティの依存関係なしに、RSS 2.0 と Atom の両方で同一の正規化された形状を提供します。ElementTree を 1 回パスし、どちらの形式からも title、link、id、published、summary を取得するため、後続のコード(重複排除、ダイジェスト、アラート)がフィードタイプごとに分岐する必要がなくなります。

呼び出すタイミング

  • ユーザーが「この RSS フィードを読んで」「ブログフィードをポーリングして」「Atom フィードから最新エントリを取得して」「サイトの新着投稿を監視して」と依頼したとき。
  • コードがすでにフィードのバイト列を取得しており、構造化されたエントリが必要なとき。

呼び出さないタイミング

  • ソースが実際の JSON API を提供している場合 – フィードをスクレイピングする代わりにそちらを呼び出してください。
  • 完全な feedparser のクセ対応(あらゆる不正な方言)が必要な場合 – feedparser をインストールしてください。

具体的な例

ユーザー入力:

https://example.com/feed.xml を読み込んで、各投稿のタイトルとリンクを出力して。

出力:

# assets/feed.py をプロジェクトにコピーしてから:
from urllib.request import urlopen
from feed import parse_feed

with urlopen("https://example.com/feed.xml", timeout=20) as r:
    for item in parse_feed(r.read()):
        print(item["title"], "->", item["link"])

すべてのアイテムは、フィードが RSS か Atom かに関わらず同じキーを持つ辞書になるため、id による重複排除や published による並び替えが特別な処理なしで機能します。

適用するパターン

  1. xml.etree.ElementTree で一度解析し、item(RSS)と {atom}entry(Atom)を反復処理します。
  2. 安定したキーセットに正規化し、以降のパイプラインがフィード形式に依存しないようにします。
  3. guid/Atom id からリンクにフォールバックし、すべてのアイテムに重複排除のための安定した ID を確保します。
  4. ネットワーク処理をパーサーから分離します。バイト列またはテキストを渡すことで、純粋でテスト可能な状態を保ちます。

参考: assets/feed.py。

ソース

著者のニュース集約プロジェクトから抽出。v1.0.0。 関連: [[gmail-imap-digest]]、[[sqlite-state]]、[[pipeline-orchestrator]]。

→ Trawlkit で完全な実行可能ボットを構築してください。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

baronguyen001/ai-automation-skills

Schedule any script to run on a recurring schedule on Windows (Task Scheduler) or Linux (cron) - register, list, and remove jobs from one command, with logging to a file and a guard against overlapping runs. Use for schedule a script, run nightly, set up a cron job, windows task scheduler, or run on a timer.

baronguyen001/ai-automation-skills

Turn a run's list of result dicts into a schema'd CSV and a Markdown table from one column spec - declare columns once, emit both, with stable ordering and safe escaping, stdlib only, no pandas. Use when the user asks to write results to CSV, export a report, make a markdown summary table, or save a run's output as a spreadsheet.

baronguyen001/ai-automation-skills

Strip HTML to clean plain text with the standard library only (no BeautifulSoup/lxml): drops script/style, turns block tags into line breaks, and collapses whitespace. Use when the user wants readable text from an HTML page/email, to clean scraped HTML before sending it to an LLM, or to build a text index from web content.

baronguyen001/ai-automation-skills

Persist records between scheduled runs as append-only JSON Lines (one object per line) with streaming reads and optional key-based dedup, stdlib only. Use when the user wants to log run results to JSONL, append events to a file, dedup records by id across runs, or keep a simple durable history without a database.

baronguyen001/ai-automation-skills

Extract text and simple table-like rows from a PDF for downstream AI without OCR binaries. Use when the user asks to read a PDF, turn a PDF into text, pull simple tables from statements/reports, or feed PDF content into an LLM pipeline.

baronguyen001/ai-automation-skills

Rotate a pool of HTTP/SOCKS proxies with round-robin selection, failure tracking, and a cooldown that benches dead proxies before retrying. BYO proxy list via env - none are shipped. Use for rotate proxies, spread requests across proxies, avoid IP bans, retry through a different proxy, or proxy health check.

baronguyen001/ai-automation-skills

Upload and download run artifacts from S3-compatible storage with BYO bucket and credentials from env. Use when the user asks to store scraper output, archive reports, publish artifacts to object storage, fetch a prior run file, or use MinIO/R2/Spaces/S3 without hardcoding credentials.

baronguyen001/ai-automation-skills

Draft a short-form TikTok/Reels/Shorts or long-form video script from a topic and creator persona file - hook variants, beat-structured body, CTA, b-roll cues, caption overlays, and [STORY]/[NUMBER] slots so the model never fabricates personal facts. Use for write a video script, tiktok script, youtube script, or /shortform-script.

baronguyen001/ai-automation-skills

Give scheduled scripts memory between runs with one SQLite file - a seen-set for dedup, a key/value cursor to resume where you left off, and order-preserving new-item filtering. Use for dedup across runs, don't re-alert the same item, remember the last id, resume a scraper, or persist state between cron runs.

関連スキル