---
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

| Source | Flag | Description |
|---|---|---|
| US Business | `--source us-business` | Top US business headlines |
| TechCrunch | `--source techcrunch` | Latest TechCrunch articles |
| Wall Street Journal | `--source wsj` | Recent 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.
