Communitygithub.com

baronguyen001/ai-automation-skills

使用標準函式庫解析 RSS 2.0 或 Atom 摘要,將其正規化為統一的條目字典(title、link、id、published、summary),無需 feedparser。

ai-automation-skills 是什麼?

此技能提供一個輕量級的 RSS/Atom 摘要閱讀器,完全依賴 Python 標準函式庫中的 `xml.etree.ElementTree`,無需任何第三方套件(如 feedparser)。它接受 RSS 2.0 或 Atom 格式的摘要內容,並將其正規化為一致的條目字典,包含 title、link、id、published 與 summary 等鍵值,讓下游的程式碼(如去重、摘要、警報)無需區分摘要類型即可處理。支援的場景包括用戶要求讀取 RSS 摘要、輪詢部落格或新聞摘要、或監控某個網站的新貼文。若來源已有真正的 JSON API,應優先使用 API 而非解析摘要。此技能適用於 Claude Code、Cursor 等具備執行 Python 程式碼能力的 AI 代理平台。實作方式為:使用 ElementTree 解析摘要,迭代 RSS 的 `<item>` 或 Atom 的 `<entry>` 元素,並從 guid 或 id 回退至連結以確保每個項目都有穩定的識別碼,方便去重與排序。範例程式碼位於 `assets/feed.py`。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

RSS / Atom 摘要閱讀器

當腳本需要讀取摘要,且希望在 RSS 2.0 與 Atom 之間擁有統一的正規化格式、且不依賴第三方套件時,使用此技能。它透過單一次的 ElementTree 解析,從任一格式中提取 title、link、id、published 與 summary,讓後續的程式碼(去重、摘要、警報)無需因摘要類型而分支處理。

何時使用

  • 使用者說:「讀取這個 RSS 摘要」、「輪詢部落格摘要」、「取得 Atom 摘要的最新條目」、「監控網站的新貼文」。
  • 程式碼已取得摘要位元組資料,需要結構化的條目。

何時不使用

  • 來源提供真正的 JSON API——應優先呼叫 API 而非解析摘要。
  • 需要完整的 feedparser 異常處理(處理各種格式錯誤的方言)——請安裝 feedparser。

具體範例

使用者輸入:

Read https://example.com/feed.xml and print each post title and link.

輸出:

# 將 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 解析一次;疊代 RSS 的 item 與 Atom 的 {atom}entry。
  2. 正規化為穩定的鍵值集合,使管線其餘部分與摘要格式無關。
  3. 從 guid/Atom 中的 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.

相關技能