Skill: davidk2yoyo/noticias-cangrejo (version 1.0.4)

--- 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`: ```bash python3 scripts/fetch_news.py "<topic>" ``` Optional parameters: - `--lang` (default: `en`) - `--max-articles` (default: `20`) - `--output` to write Markdown to a file ## Example Usage ```bash export GNEWS_API_KEY="your_api_key_here" python3 scripts/fetch_news.py "global markets" --lang en --max-articles 20 --output ./markets.md ```

path: README.md
content: # NoticiasCangrejo

NoticiasCangrejo is an OpenClaw skill that fetches news from GNews (`gnews.io`) for any topic and outputs a Markdown summary of the top articles.

## Features

- Works with any topic provided by the user
- Uses GNews Search API
- Pulls up to 20 articles and returns the 15 most relevant
- Outputs clean Markdown with date, greeting, titles, and URLs
- Includes dashboard API key metadata for ClawHub/OpenClaw publishing
- No third-party Python packages required

## Installation

Install the skill from ClawHub or from its repository path. The packaged skill uses only:

- `SKILL.md`
- `README.md`
- `requirements.txt`
- `_meta.json`
- `scripts/fetch_news.py`

## Environment Variable Setup

Set your GNews API key:

```bash
export GNEWS_API_KEY="your_api_key_here"
```

Do not commit real API keys to source control.

## Canonical Run Command

The canonical command is defined in `_meta.json` (`run`):

```bash
python3 scripts/fetch_news.py "<topic>"
```

## CLI Usage

Basic:

```bash
python3 scripts/fetch_news.py "space exploration"
```

Custom language and result size:

```bash
python3 scripts/fetch_news.py "renewable energy" --lang en --max-articles 20
```

Save summary to a file:

```bash
python3 scripts/fetch_news.py "cybersecurity" --output ./cybersecurity-news.md
```

## OpenClaw Usage

When this skill is installed, ask for a topic summary, for example:

- "Usa noticias-cangrejo para Terpel Colombia"
- "Resume las noticias sobre Formula 1"

The skill reads `GNEWS_API_KEY` from dashboard/environment configuration and returns Markdown output.

## Publishing Notes (ClawHub)

- Skill folder name is slug-friendly: `noticias-cangrejo`
- `_meta.json` defines explicit `run` behavior for packaged installs
- No hardcoded API credentials are included
- Runtime is dependency-free (standard library only)


path: _meta.json
content: {
  "slug": "noticias-cangrejo",
  "version": "1.0.1",
  "run": {
    "command": "python3",
    "args": [
      "scripts/fetch_news.py",
      "{topic}"
    ]
  }
}


path: requirements.txt
content: # No external dependencies required.


path: scripts/__init__.py
content: """NoticiasCangrejo scripts package."""


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: suspicious | SkillSpector: clean (LOW)