360 Secure SkillHub
360 安全技能中心

Noticias Cangrejo

接收用户主题后校验 GNEWS_API_KEY,调用 GNews 搜索接口获取最多 20 篇文章,按标题与描述的主题词重合度排序取前 15 条,输出含日期、西语问候语、主题行和编号链接列表的 Markdown,可用 --output 保存为文件。

davidk2yoyo
davidk2yoyo
热度 80.70
最近更新 2026-05-17 12:03:21
分类:搜索依赖:代码执行 / 第三方 API / 读写文件应用场景:研究 / 摘要总结

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add noticias-cangrejo
Metadata
name
noticias-cangrejo
description
Fetch and summarize recent news articles from GNews for any user-provided topic, then produce a Markdown digest with date, greeting, and top links.
homepage
https://gnews.io/
metadata
{"clawdbot":{"emoji":"🦀","requires":{"env":["GNEWS_API_KEY"]}}}

NoticiasCangrejo

Generate a Markdown news digest for any topic using the GNews API.

When To Use

Use this skill when the user asks for recent news on any topic, such as politics, science, startups, health, finance, sports, or local events, and wants a concise, linkable summary.

Environment Requirement

Set this environment variable before execution:

  • GNEWS_API_KEY

Workflow

  1. Receive a topic from the user.
  2. Validate that GNEWS_API_KEY exists.
  3. Query GNews Search API for up to 20 articles using topic + language.
  4. Compute relevance based on topic-word overlap against article title and description.
  5. Keep the top 15 ranked articles.
  6. Print Markdown output with:
    • Date (YYYY/MM/DD)
    • Greeting line in Spanish
    • Topic line
    • Numbered list of article title + URL
  7. Optionally save output to a file with --output.

Execution

Canonical OpenClaw execution is defined in _meta.json under run:

python3 scripts/fetch_news.py "<topic>"

Optional parameters:

  • --lang (default: en)
  • --max-articles (default: 20)
  • --output to write Markdown to a file

Example Usage

export GNEWS_API_KEY="your_api_key_here"
python3 scripts/fetch_news.py "global markets" --lang en --max-articles 20 --output ./markets.md