← Back to Plugins
Tools

Ai Newspaper Skill

AuroraLHL By AuroraLHL 👁 8 views ▲ 0 votes

A Claude Code and OpenClaw plugin that generates personalized, newspaper-style weekly AI briefings and provides on-demand research paper summaries and Q&A.

GitHub

Install

pip install -e

Configuration Example

{ "cache_ttl_days": 7 }

README

# ๐Ÿ“ฐ newspaper

A Claude Code / OpenClaw plugin that turns the past week of AI research and news
into a polished, self-contained **newspaper-style HTML brief** โ€” and reads
academic papers on demand.

It bundles two skills:

- **`daily-briefing`** โ€” scans HuggingFace Daily Papers, smol.ai AI News, and
  Latent.Space over a 7-day window, scores items against your topics, and
  generates a two-tab HTML report (็ƒญ้—จๆ–ฐ้—ป / ็ƒญ้—จ PaperยทBlog) with detailed
  Chinese summaries.
- **`paper-reading`** โ€” downloads a paper from arXiv / OpenReview / HuggingFace /
  Semantic Scholar (or a direct PDF), then summarizes it or answers your
  questions about it.

---

## Examples

A generated weekly brief is a single, dependency-free HTML file: a light
"newspaper" layout with a **ๆฏๅ‘จ้€Ÿ่งˆ (Weekly Glance)**, topic chips, and two
switchable tabs. Items matching your `topic-of-interest.md` are up-ranked and
flagged with a โ˜….

| ็ƒญ้—จๆ–ฐ้—ป (News tab) | ็ƒญ้—จ Paper ยท Blog (Papers tab) |
| --- | --- |
| ![Weekly brief โ€” news tab](assets/example-news.png) | ![Weekly brief โ€” papers tab](assets/example-papers.png) |

> Screenshots rendered from [`examples/2026-06-26-weekly-brief.html`](examples/2026-06-26-weekly-brief.html). Each card
> carries a bulleted summary (numbers, model names, benchmark scores) plus a
> separate **ไธบไป€ไนˆ้‡่ฆ** box explaining why it matters.

---

## How it works

The pipeline cleanly separates **deterministic data collection** (Python) from
**generation** (the LLM):

```
scripts/sources/*.py  โ”€โ”€โ–บ  generate_weekly_brief.py  โ”€โ”€โ–บ  briefs/<date>-raw.json  โ”€โ”€โ–บ  LLM  โ”€โ”€โ–บ  briefs/<date>-weekly-brief.html
   (fetch & normalize)        (score, rank, window)         (structured data)       (writes HTML)
```

1. **Collect** โ€” `generate_weekly_brief.py` auto-discovers every `*.py` in
   `scripts/sources/`, runs each one for all 7 days of the window, and
   normalizes the output into a common schema.
2. **Score & rank** โ€” items are scored on topic matches (default: *LLM RL*,
   *Agent*, *Foundation Model*, plus your own topics), link count, and a small
   set of "heat" keywords. The top news and papers are kept.
3. **Generate** โ€” the `daily-briefing` skill reads the raw JSON and writes a
   complete, self-contained HTML file following a fixed CSS/structure template.

This means new sources are just scripts, and the visual template lives in one
place โ€” no external libraries or CDNs are ever pulled in.

---

## Install

Install the Python dependencies (used by the source scripts and the generator):

```bash
pip install -e .
```

**Claude Code:**

```bash
claude plugins add /path/to/newspaper
```

**OpenClaw:**

```bash
opencode plugins add /path/to/newspaper
```

On session start, a hook injects both skill descriptions into context so Claude
knows when to reach for them.

---

## Usage

### Weekly brief

Just ask Claude in natural language:

> "Give me this week's AI brief"
> "What are the hot AI papers this week?"

Or run the data collector directly and let the skill render the HTML:

```bash
# Full run (collect + prompt to generate HTML)
python scripts/generate_weekly_brief.py

# Data only โ€” write the raw JSON for a specific end date
python scripts/generate_weekly_brief.py --json-only --end-date 2026-06-26
```

Outputs land in `briefs/`:

| File | Contents |
| --- | --- |
| `briefs/<date>-raw.json` | Scored, ranked items (the LLM's input) |
| `briefs/<date>-weekly-brief.html` | The final newspaper-style report |
| `briefs/<date>-weekly-brief.md` | Markdown companion (when generated) |

### Reading a paper

> "Summarize https://arxiv.org/abs/2506.12345"
> "What loss function does this paper use? https://openreview.net/forum?id=..."

The `paper-reading` skill resolves the URL to a PDF, downloads it, reads it
(chunking large PDFs), and either returns a structured summary or answers your
question grounded in the paper's content.

---

## Configuration

### Topics of interest

Copy the included example, then customize `topic-of-interest.md`. The personal
file is gitignored; each non-comment line is a topic that gets up-ranked and
flagged in the brief:

```bash
cp topic-of-interest.example.md topic-of-interest.md
```

```markdown
GUI Agent
Reinforcement Learning
```

These are merged with the built-in defaults (*LLM RL*, *Agent*,
*Foundation Model*). When the file is present, the brief adds a closing
**้’ˆๅฏนไฝ ็š„ๅ…ณๆณจ็‚น** section tailored to your topics.

### Caching

`paper-reading` caches downloaded PDFs and generated summaries (via
`scripts/cache.py`). The TTL is controlled by `settings.json`:

```json
{ "cache_ttl_days": 7 }
```

Ask for "fresh data" / "re-download" to bypass the cache for a single run.

---

## Adding sources

A source is just a Python script in `scripts/sources/` that prints a JSON array
to **stdout** and exits `0`:

```json
[
  {
    "title": "Item title",
    "body": "Full text content (may include markdown/HTML)",
    "urls": ["https://link-to-original"],
    "source_name": "Human-readable source name",
    "date": "YYYY-MM-DD",
    "item_type": "paper | news"
  }
]
```

It must accept `--date YYYY-MM-DD` and exit non-zero with a message on
**stderr** on failure. The generator auto-discovers it โ€” no registration
needed. See `scripts/sources/README.md` for the full interface.

Built-in sources:

| Script | Source | Type |
| --- | --- | --- |
| `huggingface_papers.py` | HuggingFace Daily Papers API | papers |
| `latent_space.py` | Latent.Space RSS (Substack) | blog |
| `smol_news.py` | smol.ai AI News RSS | news |

---

## Project structure

```
newspaper/
โ”œโ”€โ”€ skills/
โ”‚   โ”œโ”€โ”€ daily-briefing/SKILL.md   # weekly brief workflow + HTML/CSS template
โ”‚   โ””โ”€โ”€ paper-reading/SKILL.md    # paper download โ†’ summarize / Q&A workflow
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ generate_weekly_brief.py  # collect, score, rank โ†’ raw JSON
โ”‚   โ”œโ”€โ”€ cache.py                  # cache CLI (check/write/path/list)
โ”‚   โ”œโ”€โ”€ resolve_and_download.py   # paper URL โ†’ PDF resolver + downloader
โ”‚   โ””โ”€โ”€ sources/                  # one script per news/paper source
โ”œโ”€โ”€ hooks/                        # session-start context injection
โ”œโ”€โ”€ briefs/                       # generated reports (gitignored)
โ”œโ”€โ”€ assets/                       # example screenshots
โ”œโ”€โ”€ examples/                     # tracked example report
โ”œโ”€โ”€ topic-of-interest.example.md  # copy to topic-of-interest.md and customize
โ””โ”€โ”€ tests/                        # pytest suite + smoke test
```

---

## Development

Run the test suite:

```bash
pip install -e ".[dev]"
pytest
bash tests/smoke_test.sh
```

Tests cover each source parser (against fixtures in `tests/fixtures/`), the
scoring/ranking generator, the cache CLI, and the PDF resolver.

---

## License

MIT
tools

Comments

Sign in to leave a comment

Loading comments...