Two independent skills for the news harvesting pipeline:
Three independent skills for the news harvesting + consumption pipeline:
## news-source-analyzer (无状态分析器)
...
...
@@ -10,6 +10,10 @@ Analyze news websites, author fetch recipes, and produce installable source bund
Harvest and archive news articles from configured sources to Obsidian vault with Chinese summaries + original text. Sources are installed from bundles produced by the analyzer. Manages vault path, push config, and source registry.
## news-hub-feed (阅读 / 标注)
Search and browse News Hub articles, read full article details (summary / original / translation), and manage key-value marks for annotation. A pure API consumer — no chromium, no vault, no bundle, zero npm dependencies. Used for rapid hot-topic discovery and post-hoc annotation.
└───── manual/scripted transfer ─────→ harvester │
│
Feed (any machine) ───┘
─────────────────
search → article detail → marks
```
The `.nhsource.json` bundle is the only interface between the two skills. No shared runtime state, no shared config, no shared browser profile.
The `.nhsource.json` bundle is the only interface between the analyzer and harvester. The feed skill connects directly to the News Hub API — no shared runtime state, config, or browser profile with the other two.
## Shared scripts
Four CDP/Chromium infrastructure scripts (`ensure-chromium.js`, `cdp-client.js`, `fetcher-helper.js`, `block-check.js`) are duplicated in both skills as standalone copies. These are stable low-level CDP wrappers with low change frequency. When modifying one, sync the copy in the other skill.
Four CDP/Chromium infrastructure scripts (`ensure-chromium.js`, `cdp-client.js`, `fetcher-helper.js`, `block-check.js`) are duplicated in the analyzer and harvester skills as standalone copies. These are stable low-level CDP wrappers with low change frequency. When modifying one, sync the copy in the other skill. The feed skill does not use Chromium.
description:Search, browse, and annotate News Hub articles via the News Hub API. Use this skill whenever the user wants to discover trending news, search articles by keyword/source/category/tags/marks, read an article's full detail (summary, original, translation), or add/remove key-value marks for later retrieval and analysis. A lightweight read + annotate client — no harvesting, no pushing, no browser. Triggers on phrases like "检索新闻", "搜索文章", "查看文章", "文章详情", "添加标记", "标注", "热点", "热门", "hot news", "trending", "search articles", "article detail", "marks", "discover trending", "标签列表", "按标记检索".
---
# News Hub Feed Skill
Search and browse articles stored in News Hub, read full article details (summary / original / translation), and manage key-value **marks** for annotation. This skill is a **pure API consumer** — it never harvests, pushes, or launches a browser. Its sole purpose is rapid hot-topic discovery and post-hoc annotation for later retrieval and analysis.
> **Skill root** = the directory containing this `SKILL.md`. Prefix every command with `cd "<skill-root>" &&`, or scripts fail with `MODULE_NOT_FOUND`.
| Remove a mark | `node scripts/marks.js remove <id> <key>` |
| List article marks | `node scripts/marks.js list <id>` |
| List mark keys | `node scripts/marks.js keys` |
| List mark values | `node scripts/marks.js values <key>` |
| Search by marks | `node scripts/marks.js marked --marks 已读:是,重要:高` |
| List all tags (read-only) | `node scripts/tags.js` |
> **All commands must be prefixed with `cd "<skill-root>" &&`**. Scripts live in `scripts/` — always reference them as `node scripts/search.js`, never `node search.js`.
---
## First-Run Setup
**Pre-flight gate** — run this at the start of a task. If it prints `OK`, skip setup:
```bash
cd"<skill-root>"&& node -e"const c=require('./config.json'); console.log(c.api&&c.api.enabled?'OK':'UNCONFIGURED')" 2>/dev/null ||echo"UNCONFIGURED (no config.json)"
```
### Onboarding (only if UNCONFIGURED)
This skill only needs the `api` block in `config.json` (no chromium, no vault, no sources). The config is auto-created from `references/config-template.json` on first script run. To configure:
Use facets to spot trends — a high count in a category or tag signals a hot topic.
### Flow B — Read article detail (article.js)
```bash
# 全部内容(摘要 + 原文 + 译文)
node scripts/article.js 101
# 只看摘要
node scripts/article.js 101 --fields summary
# 只看译文
node scripts/article.js 101 --fields translation
```
Displays: title (ZH/EN), metadata (source/category/tags/authors/publish time/version/translation status), summary sections (overview/background/key quote/impact), full translation, original markdown, and asset list.
Marks are **App-isolated** key-value pairs — only the current App's marks are visible. Use them to build a personal classification system: `已读`, `重要`, `分类`, `跟进`, `已分析`, etc.
---
## Marks vs Tags
| | Marks | Tags |
|---|------|------|
| **Writable** | ✅ After the fact via `marks.js` | ❌ Set at push time only |
Tags are useful for filtering during search but **cannot be modified** after an article is pushed. For post-hoc annotation and personal classification, **always use marks**.
---
## References
| File | When to read |
|------|--------------|
| News Hub API docs (external) | Full API specification — endpoint details, error codes, scope matrix, pagination conventions. Located in the News Hub repository at `docs/API.md`. |