AgentSkillsCN

news-headlines

从美国商业新闻、TechCrunch 和《华尔街日报》中抓取并汇总新闻头条。当用户询问最新资讯、头条新闻、科技新闻、商业动态或华尔街故事时使用。

SKILL.md
--- frontmatter
name: news-headlines
description: Fetch and summarize news headlines from US business news, TechCrunch, and Wall Street Journal. Use when users ask for latest news, headlines, tech news, business news, or Wall Street stories.

News Headlines

Use the bundled script to fetch headlines from NewsAPI.

Available Sources

SourceFlagDescription
US Business--source us-businessTop US business headlines
TechCrunch--source techcrunchLatest TechCrunch articles
Wall Street Journal--source wsjRecent WSJ stories

Sandbox Constraints

This script runs inside a sandboxed environment with strict rules:

  • Only .venv/bin/python is allowed. Do not use bare python, python3, or any other interpreter.
  • No shell operators. Do not use &&, ||, ;, |, >, <, $(...), or backticks.
  • No cd. Always use the relative path from the project root.
  • The API key is injected by the sandbox proxy. Do not pass an API key.
  • The exact command prefix must be: .venv/bin/python plugins/news-plugin/skills/news-headlines/scripts/get_news.py

Any command that does not match this format will be rejected.

Run Workflow

  1. Determine the source. Based on the user's request, pick the appropriate --source flag.

    • General US/business news: us-business
    • Tech news or TechCrunch: techcrunch
    • Wall Street Journal or financial news: wsj
  2. Run the script with the chosen source.

  3. Summarize the result for the user.

    • List the top headlines with brief descriptions.
    • Mention the source and publish time.
    • If the user asked broadly for "news", run multiple sources.

Command Format

The only allowed Bash command format:

bash
.venv/bin/python plugins/news-plugin/skills/news-headlines/scripts/get_news.py --source <SOURCE>

Optional flags:

bash
.venv/bin/python plugins/news-plugin/skills/news-headlines/scripts/get_news.py \
  --source techcrunch \
  --page-size 5

Output Expectations

  • Article number, title, source name, author, publish date, description, and URL.
  • Default returns 10 articles per source.