Communitygithub.com

baronguyen001/ai-automation-skills

解析 RSS 2.0 或 Atom 订阅源为标准条目字典(标题、链接、ID、发布时间、摘要),仅使用标准库,无需 feedparser。适用于用户要求读取 RSS/Atom 订阅源、轮询博客/新闻源、提取订阅条目或监控发布订阅的网站。

ai-automation-skills 是什么?

该技能提供了一种纯标准库实现的 RSS/Atom 订阅源解析器,无需依赖任何第三方库如 feedparser。它通过一次 `ElementTree` 遍历,将 RSS 2.0 和 Atom 两种格式的条目统一规范化为包含 `title`、`link`、`id`、`published`、`summary` 字段的字典,使得下游代码(去重、摘要、告警)无需区分订阅源类型。支持在 Claude Code、Cursor、Codex 等 AI 代理环境中直接使用,只需复制 `assets/feed.py` 文件即可集成。该技能适用于博客/新闻订阅源读取、网站新内容监控等场景,但对于提供 JSON API 的源建议直接调用 API。解析器保持纯净,不处理网络请求,传入字节或文本数据即可完成解析,便于测试和复用。

兼容平台~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。

具体示例

用户输入:

读取 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 回退到链接,确保每个条目都有稳定的身份标识用于去重。
  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.

相关技能