sports-news by machina-sports/sports-skills
npx skills add https://github.com/machina-sports/sports-skills --skill sports-news在编写查询之前,请查阅 references/api-reference.md 了解命令参数,查阅 references/rss-feeds.md 获取精选的订阅源 URL。
推荐使用 CLI —— 它可以避免 Python 导入路径问题:
sports-skills news fetch_items --google_news --query="Arsenal transfer" --limit=5
sports-skills news fetch_feed --url="https://feeds.bbci.co.uk/sport/football/rss.xml"
Python SDK(备选方案):
from sports_skills import news
articles = news.fetch_items(google_news=True, query="Arsenal transfer news", limit=10)
feed = news.fetch_feed(url="https://feeds.bbci.co.uk/sport/football/rss.xml")
关键:在调用任何新闻命令之前,请验证:
currentDate —— 切勿硬编码。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
google_news=True 必须与 query 参数配对使用。sort_by_date=True。从系统提示的日期推导当前日期(例如,currentDate: 2026-02-16 表示今天是 2026-02-16)。
after = 今天 - 7 天after = 今天 - 3 天| 命令 | 必需参数 | 可选参数 | 描述 |
|---|---|---|---|
fetch_feed | url | 通过 URL 获取 RSS/Atom 订阅源 | |
fetch_items | google_news, query, url, limit, after, before, sort_by_date | 从 Google 新闻或 RSS 订阅源获取新闻 |
fetch_items --google_news --query="<主题>" --limit=5 --sort_by_date=Truefetch_items --google_news --query="<主题>" --after=<7天前> --sort_by_date=True --limit=10fetch_feed --url="<rss_url>"。fetch_items --google_news --query="<体育项目> results" --after=<7天前> --limit=5。示例 1:转会新闻搜索 用户说:“阿森纳最新的转会新闻是什么?” 操作:
currentDate 推导 after:今天减去 3 天fetch_items(google_news=True, query="Arsenal transfer news", after=<推导出的日期>, sort_by_date=True, limit=10)
结果:带有来源、日期和链接的近期阿森纳转会新闻标题示例 2:精选 RSS 订阅源 用户说:“给我看看 BBC 体育足球新闻标题” 操作:
fetch_feed(url="https://feeds.bbci.co.uk/sport/football/rss.xml")
结果:BBC 体育足球订阅源的标题、最后更新时间以及近期文章示例 3:日期筛选新闻 用户说:“这周有欧冠联赛的新闻吗?” 操作:
currentDate 推导 after:今天减去 7 天fetch_items(google_news=True, query="Champions League", after=<推导出的日期>, sort_by_date=True, limit=10)
结果:过去 7 天内的欧冠联赛文章,按最新排序get_newsfetch_feed(用于 RSS)或 fetch_items(用于 Google 新闻搜索)。search_newsfetch_items 并设置 google_news=True 和一个 query 参数。get_headlinesfetch_items 并设置 google_news=True。如果某个命令未在上方的命令表中列出,则它不存在。
错误:Google 新闻返回空结果
原因:缺少 query 或查询条件过窄,或未设置 google_news=True
解决方案:确保同时设置了 google_news=True 和 query。尝试更宽泛的关键词(例如,使用“Arsenal”而不是“Arsenal vs Chelsea goal”)
错误:RSS 订阅源返回错误
原因:订阅源 URL 可能暂时不可用,或者 URL 格式已更改
解决方案:使用 Google 新闻(fetch_items 并设置 google_news=True)作为同一主题的备用方案
错误:尽管使用了“最近”查询,返回的文章却很旧
原因:未设置 sort_by_date=True,或者缺少 after 日期过滤器
解决方案:添加 sort_by_date=True 和 after=<今天 - 3 天> 以确保最新的文章首先出现
每周安装量
215
仓库
GitHub 星标数
54
首次出现
2026 年 2 月 16 日
安全审计
安装于
codex202
gemini-cli199
opencode199
github-copilot190
cursor188
kimi-cli184
Before writing queries, consult references/api-reference.md for command parameters and references/rss-feeds.md for curated feed URLs.
Prefer the CLI — it avoids Python import path issues:
sports-skills news fetch_items --google_news --query="Arsenal transfer" --limit=5
sports-skills news fetch_feed --url="https://feeds.bbci.co.uk/sport/football/rss.xml"
Python SDK (alternative):
from sports_skills import news
articles = news.fetch_items(google_news=True, query="Arsenal transfer news", limit=10)
feed = news.fetch_feed(url="https://feeds.bbci.co.uk/sport/football/rss.xml")
CRITICAL: Before calling any news command, verify:
currentDate — never hardcoded.google_news=True is always paired with a query parameter.sort_by_date=True is set for any "recent" or "latest" query.Derive the current date from the system prompt's date (e.g., currentDate: 2026-02-16 means today is 2026-02-16).
after = today - 7 daysafter = today - 3 days| Command | Required | Optional | Description |
|---|---|---|---|
fetch_feed | url | Fetch an RSS/Atom feed by URL | |
fetch_items | google_news, query, url, limit, after, before, sort_by_date | Fetch news from Google News or an RSS feed |
fetch_items --google_news --query="<topic>" --limit=5 --sort_by_date=Truefetch_items --google_news --query="<topic>" --after=<7_days_ago> --sort_by_date=True --limit=10fetch_feed --url="<rss_url>".fetch_items --google_news --query="<sport> results" --after=<7_days_ago> --limit=5.Example 1: Transfer news search User says: "What's the latest Arsenal transfer news?" Actions:
after from currentDate: today minus 3 daysfetch_items(google_news=True, query="Arsenal transfer news", after=<derived_date>, sort_by_date=True, limit=10) Result: Recent Arsenal transfer headlines with source, date, and linksExample 2: Curated RSS feed User says: "Show me BBC Sport football headlines" Actions:
fetch_feed(url="https://feeds.bbci.co.uk/sport/football/rss.xml") Result: BBC Sport football feed title, last updated, and recent articlesExample 3: Date-filtered news User says: "Any Champions League news from this week?" Actions:
after from currentDate: today minus 7 daysfetch_items(google_news=True, query="Champions League", after=<derived_date>, sort_by_date=True, limit=10) Result: Champions League articles from the last 7 days, sorted newest firstget_newsfetch_feed (for RSS) or fetch_items (for Google News search).search_newsfetch_items with google_news=True and a query parameter.get_headlinesfetch_items with google_news=True.If a command is not listed in the Commands table above, it does not exist.
Error: Google News returns empty results Cause: query is missing or too narrow, or google_news=True is not set Solution: Ensure google_news=True AND a query are both set. Try broader keywords (e.g., "Arsenal" instead of "Arsenal vs Chelsea goal")
Error: RSS feed returns an error Cause: The feed URL may be temporarily down or the URL format has changed Solution: Use Google News (fetch_items with google_news=True) as a fallback for the same topic
Error: Articles returned are old despite using "recent" query Cause: sort_by_date=True is not set, or the after date filter is missing Solution: Add sort_by_date=True and after=<today - 3 days> to ensure newest articles appear first
Weekly Installs
215
Repository
GitHub Stars
54
First Seen
Feb 16, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex202
gemini-cli199
opencode199
github-copilot190
cursor188
kimi-cli184
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
29,800 周安装