watchers

GitHub

用于轮询RSS、JSON API和GitHub,通过水印机制去重并仅响应新内容。提供三个脚本分别处理不同数据源,支持终端运行或集成至定时任务,实现自动监控与通知。

optional-skills/devops/watchers/SKILL.md NousResearch/hermes-agent

Trigger Scenarios

用户希望监控RSS/Atom Feed的新条目 用户希望监控GitHub仓库的Issues、PRs、Release或Commit变更 用户希望轮询任意JSON API以获取新数据 用户请求为特定对象设置Watcher或通知服务

Install

npx skills add NousResearch/hermes-agent --skill watchers -g -y
More Options

Non-standard path

npx skills add https://github.com/NousResearch/hermes-agent/tree/main/optional-skills/devops/watchers -g -y

Use without installing

npx skills use NousResearch/hermes-agent@watchers

指定 Agent (Claude Code)

npx skills add NousResearch/hermes-agent --skill watchers -a claude-code -g -y

安装 repo 全部 skill

npx skills add NousResearch/hermes-agent --all -g -y

预览 repo 内 skill

npx skills add NousResearch/hermes-agent --list

SKILL.md

Frontmatter
{
    "name": "watchers",
    "author": "Hermes Agent",
    "license": "MIT",
    "version": "1.0.0",
    "metadata": {
        "hermes": {
            "tags": [
                "cron",
                "polling",
                "rss",
                "github",
                "http",
                "automation",
                "monitoring"
            ],
            "category": "devops",
            "related_skills": [],
            "requires_toolsets": [
                "terminal"
            ]
        }
    },
    "platforms": [
        "linux",
        "macos"
    ],
    "description": "Poll RSS, JSON APIs, and GitHub with watermark dedup."
}

Watchers

Poll external sources on an interval and react only to new items. Three ready-made scripts plus a shared watermark helper; wire them into a cron job (or run them ad-hoc from the terminal).

When to Use

  • User wants to watch an RSS/Atom feed and be notified of new entries
  • User wants to watch a GitHub repo's issues / pulls / releases / commits
  • User wants to poll an arbitrary JSON endpoint and get notified on new items
  • User asks for "a watcher for X" or "notify me when X changes"

Mental model

A watcher is just a script that:

  1. Fetches data from the external source
  2. Compares against a watermark file of previously-seen IDs
  3. Writes the new watermark back
  4. Prints new items to stdout (or nothing on no-change)

The scripts below handle all three. The agent runs them via the terminal tool — from a cron job, a webhook, or an interactive chat — and reports what's new.

Ready-made scripts

All three live in $HERMES_HOME/skills/devops/watchers/scripts/ once the skill is installed. Each reads WATCHER_STATE_DIR (defaults to $HERMES_HOME/watcher-state/) for its state file, keyed by the --name argument.

Script What it watches Dedup key
watch_rss.py RSS 2.0 or Atom feed URL <guid> / <id>
watch_http_json.py Any JSON endpoint returning a list of objects Configurable id field
watch_github.py GitHub issues / pulls / releases / commits for a repo id / sha

All three:

  • First run records a baseline — never replays existing feed
  • Watermark is a bounded ID set (max 500) to cap memory
  • Output format: ## <title>\n<url>\n\n<optional body> per item
  • Empty stdout on no-new — the caller treats that as silent
  • Non-zero exit on fetch errors

Usage

Run a watcher directly from the terminal tool:

python $HERMES_HOME/skills/devops/watchers/scripts/watch_rss.py \
  --name hn --url https://news.ycombinator.com/rss --max 5

Watch a GitHub repo (set GITHUB_TOKEN in ${HERMES_HOME:-~/.hermes}/.env to avoid the 60 req/hr anonymous rate limit):

python $HERMES_HOME/skills/devops/watchers/scripts/watch_github.py \
  --name hermes-issues --repo NousResearch/hermes-agent --scope issues

Poll an arbitrary JSON API:

python $HERMES_HOME/skills/devops/watchers/scripts/watch_http_json.py \
  --name api --url https://api.example.com/events \
  --id-field event_id --items-path data.events

Wiring into cron

Ask the agent to schedule a cron job with a prompt like:

Every 15 minutes, run watch_rss.py --name hn --url https://news.ycombinator.com/rss. If it prints anything, summarize the headlines and deliver them. If it prints nothing, stay silent.

The agent invokes the script via the terminal tool inside the cron job's agent loop; no changes to cron's built-in --script flag are needed.

State files

Every watcher writes $HERMES_HOME/watcher-state/<name>.json. Inspect:

cat $HERMES_HOME/watcher-state/hn.json

Force a replay (next run treated as first poll):

rm $HERMES_HOME/watcher-state/hn.json

Writing your own

All three scripts use the same template: load watermark, fetch, diff, save, emit. scripts/_watermark.py is the shared helper; import it to get atomic writes + bounded ID set + first-run baseline for free. See any of the three reference scripts for how little boilerplate it takes.

Common Pitfalls

  1. Printing a "no new items" header every tick. Callers rely on empty stdout = silent. If you print anything on an empty delta, you spam the channel. The shipped scripts handle this; custom scripts must too.
  2. Expecting the first run to emit items. It won't — first run records a baseline. If you need an initial digest, delete the state file after the first run or add a --prime-with-latest N flag in your own script.
  3. Unbounded watermark growth. The shared helper caps at 500 IDs. Raise it for high-churn feeds; lower it on constrained filesystems.
  4. Putting the state dir where the agent's sandbox can't write. $HERMES_HOME/watcher-state/ is always writable. Docker/Modal backends may not see arbitrary host paths.

Version History

  • e0dfcf2 Current 2026-07-25 11:35

Same Skill Collection

optional-skills/autonomous-ai-agents/antigravity-cli/SKILL.md
optional-skills/autonomous-ai-agents/blackbox/SKILL.md
optional-skills/autonomous-ai-agents/grok/SKILL.md
optional-skills/autonomous-ai-agents/honcho/SKILL.md
optional-skills/autonomous-ai-agents/openhands/SKILL.md
optional-skills/blockchain/evm/SKILL.md
optional-skills/blockchain/hyperliquid/SKILL.md
optional-skills/blockchain/solana/SKILL.md
optional-skills/creative/audiocraft-audio-generation/SKILL.md
optional-skills/creative/baoyu-article-illustrator/SKILL.md
optional-skills/creative/baoyu-comic/SKILL.md
optional-skills/creative/blender-mcp/SKILL.md
optional-skills/creative/concept-diagrams/SKILL.md
optional-skills/creative/creative-ideation/SKILL.md
optional-skills/creative/heartmula/SKILL.md
optional-skills/creative/kanban-video-orchestrator/SKILL.md
optional-skills/creative/meme-generation/SKILL.md
optional-skills/creative/pixel-art/SKILL.md
optional-skills/creative/tldraw-offline/SKILL.md
optional-skills/creative/unreal-mcp/SKILL.md
optional-skills/data-science/jupyter-notebook/SKILL.md
optional-skills/devops/cli/SKILL.md
optional-skills/devops/docker-management/SKILL.md
optional-skills/devops/hermes-s6-container-supervision/SKILL.md
optional-skills/devops/pinggy-tunnel/SKILL.md
optional-skills/dogfood/adversarial-ux-test/SKILL.md
optional-skills/finance/3-statement-model/SKILL.md
optional-skills/finance/comps-analysis/SKILL.md
optional-skills/finance/dcf-model/SKILL.md
optional-skills/finance/excel-author/SKILL.md
optional-skills/finance/lbo-model/SKILL.md
optional-skills/finance/stocks/SKILL.md
optional-skills/gaming/minecraft-modpack-server/SKILL.md
optional-skills/health/fitness-nutrition/SKILL.md
optional-skills/health/neuroskill-bci/SKILL.md
optional-skills/mcp/mcp-oauth-remote-gateway/SKILL.md
optional-skills/mcp/mcporter/SKILL.md
optional-skills/migration/openclaw-migration/SKILL.md
optional-skills/mlops/accelerate/SKILL.md
optional-skills/mlops/clip/SKILL.md
optional-skills/mlops/flash-attention/SKILL.md
optional-skills/mlops/guidance/SKILL.md
optional-skills/mlops/huggingface-tokenizers/SKILL.md
optional-skills/mlops/inference/outlines/SKILL.md
optional-skills/mlops/llava/SKILL.md
optional-skills/mlops/models/segment-anything-model/SKILL.md
optional-skills/mlops/nemo-curator/SKILL.md
optional-skills/mlops/obliteratus/SKILL.md
optional-skills/mlops/peft/SKILL.md

Metadata

Files
0
Version
e0dfcf2
Hash
29c01df1
Indexed
2026-07-25 11:35

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 00:38
浙ICP备14020137号-1 $bản đồ khách truy cập$