Install
openclaw skills install openclaw-new-digestUser-configurable multi-slot news aggregation and push system. Schedule, topics, and keywords are defined by the user via config.json. Aggregates from Twitte...
openclaw skills install openclaw-new-digestAI-assisted news aggregation and push system with user-defined schedule and topics. The agent fetches content from Twitter (Xpoz MCP), Hacker News, and Tavily Search, then filters, summarizes, and delivers via Feishu/Telegram. This is an agent-driven workflow — the agent is the executor, triggered manually or by cron.
Before executing any push, check if a configuration exists:
node {baseDir}/scripts/manage-config.mjs show
If the output says "No Configuration Found", you MUST ask the user to set up their schedule before proceeding. Do NOT use hardcoded defaults without user consent.
Ask the user these questions one by one:
After collecting user preferences, save each slot:
node {baseDir}/scripts/manage-config.mjs set-slot \
--name <slot_name> \
--time <HH:MM> \
--topic "<topic>" \
--label "<display_label>" \
--keywords "<kw1,kw2,kw3>" \
--priority "<priority_rules>" \
--sources "twitter,tavily,hackernews"
Example:
node {baseDir}/scripts/manage-config.mjs set-slot --name morning --time 08:00 --topic "Finance" --label "金融早报" --keywords "crypto,bitcoin,ethereum,finance,stock" --priority "crypto > financial events > US stocks" --sources "twitter,tavily,hackernews"
node {baseDir}/scripts/manage-config.mjs set-defaults --summary-language en --items-per-push "5-15"
If the user is okay with the standard 3-slot setup (08:00 Finance, 12:00 AI, 18:00 General):
node {baseDir}/scripts/manage-config.mjs init
node {baseDir}/scripts/manage-config.mjs show
Manual push — just tell the agent:
"Execute the news digest push for [slot_name]"
Scheduled push — set up cron entries matching your config (see references/setup-guide.md):
# Example — adjust times and slot names to match YOUR config
0 8 * * * /path/to/news-digest-1.0.0/scripts/cron-trigger.sh --slot morning
0 12 * * * /path/to/news-digest-1.0.0/scripts/cron-trigger.sh --slot noon
0 18 * * * /path/to/news-digest-1.0.0/scripts/cron-trigger.sh --slot evening
The cron-trigger.sh script reads config.json for slot definitions, loads .env, and spawns an OpenClaw session.
Check environment:
node {baseDir}/scripts/env-check.mjs
# View current config
node {baseDir}/scripts/manage-config.mjs show
# Add or update a slot
node {baseDir}/scripts/manage-config.mjs set-slot --name <name> --time <HH:MM> --topic <topic> --label <label> --keywords <kw>
# Remove a slot
node {baseDir}/scripts/manage-config.mjs remove-slot --name <name>
# Update defaults
node {baseDir}/scripts/manage-config.mjs set-defaults --summary-length "100-300"
# Reset to factory defaults
node {baseDir}/scripts/manage-config.mjs reset
The user can change their schedule at any time. Just re-run set-slot or remove-slot and update cron accordingly.
For each push slot, follow these steps in order. Read the slot's configuration first.
node {baseDir}/scripts/manage-config.mjs show
Identify the target slot from the output: its topic, keywords, priority, sources, and influence_thresholds. All subsequent steps use these values — do NOT use hardcoded topics or keywords.
node {baseDir}/scripts/query.mjs feedback --days 3
Review recent feedback and adjust your filtering/summarization strategy accordingly.
Use the slot's keywords and sources from config. Run in parallel:
Hacker News (if hackernews in sources):
node {baseDir}/scripts/fetch-hackernews.mjs "<keywords joined with OR>" --min-score <hackernews_score from config> --hours <time_window_hours from defaults> -n 20
Tavily Search (if tavily in sources):
node {baseDir}/scripts/fetch-tavily.mjs "<keywords as search query>" --topic news --days 1 -n 10
Run multiple Tavily queries if the slot has diverse keywords — e.g. one for high-priority keywords, one for secondary.
Twitter via Xpoz MCP (if twitter in sources and XPOZ_API_KEY is set):
Use the Xpoz MCP tool xpoz_search_tweets with the slot's keywords. Filter by min_likes > <twitter_likes from config>. If XPOZ_API_KEY is not configured, skip and rely on other sources.
For articles with thin summaries, extract full content:
node {baseDir}/scripts/extract-tavily.mjs "https://example.com/article1" "https://example.com/article2"
Apply these rules, using thresholds from the slot's config:
time_window_hours (default: 24h).influence_thresholds from the slot config.priority to rank.items_per_push range from config defaults.For each selected item:
summary_length from config defaults (default: 100-300 chars).summary_language from config defaults (default: zh-CN).【{slot.label}】{time} 推送
1. [{category}] {title}(来源:{source})
{summary}
🔗 {url}
2. [{category}] {title}(来源:{source})
{summary}
🔗 {url}
...
---
📊 本次用量:Tavily Search ×{n} | Tavily Extract ×{n} | HN ×{n} | Xpoz ×{n}
💬 如有反馈,请直接回复。
Use the label field from the slot config as the topic label.
Last slot of the day extra: For the last scheduled slot in the config, append a monthly API usage forecast:
node {baseDir}/scripts/track-usage.mjs forecast
Count your API calls during steps 2-3:
fetch-tavily.mjs = +1 tavily_searchextract-tavily.mjs = +1 tavily_extract per URL batchfetch-hackernews.mjs = +1 hackernewsxpozInclude the counts in the usage field when storing:
echo '{
"slot": "<slot_name>",
"topic": "<slot_topic>",
"keywords": ["<from config>"],
"items": [
{
"source": "twitter",
"category": "crypto",
"title": "Bitcoin hits new high",
"url": "https://...",
"author": "@example",
"influence_score": 1520,
"raw_excerpt": "Original excerpt...",
"summary": "Your summary...",
"metadata": {"likes": 1520, "retweets": 340}
}
],
"usage": {
"tavily_search": 2,
"tavily_extract": 1,
"hackernews": 1,
"xpoz": 1
}
}' | node {baseDir}/scripts/store-push.mjs
This automatically persists usage data to data/usage/YYYY-MM.json.
You can also record usage separately:
node {baseDir}/scripts/track-usage.mjs record --slot <name> --tavily-search 2 --tavily-extract 1 --hackernews 1 --xpoz 1
Send the formatted push content through OpenClaw's built-in messaging (Feishu or Telegram, as configured by the user).
When a user provides feedback (free text), record it:
node {baseDir}/scripts/add-feedback.mjs --date 2026-03-06 --slot <name> "feedback text"
# Feedback on a specific item
node {baseDir}/scripts/add-feedback.mjs --date 2026-03-06 --slot <name> --item-id item-001 "this summary is too brief"
When a user asks to modify the schedule or topics, use manage-config.mjs:
# Change a slot's time
node {baseDir}/scripts/manage-config.mjs set-slot --name morning --time 07:30
# Change keywords
node {baseDir}/scripts/manage-config.mjs set-slot --name morning --keywords "crypto,defi,bitcoin,ethereum"
# Add a new slot
node {baseDir}/scripts/manage-config.mjs set-slot --name afternoon --time 15:00 --topic "Markets" --label "盘后速递" --keywords "stocks,earnings,markets"
# Remove a slot
node {baseDir}/scripts/manage-config.mjs remove-slot --name evening
# View a specific push
node {baseDir}/scripts/query.mjs pushes --date 2026-03-06 --slot <name>
# View all pushes for a date
node {baseDir}/scripts/query.mjs pushes --date 2026-03-06
# View feedback
node {baseDir}/scripts/query.mjs feedback --date 2026-03-06 --slot <name>
# Search by keyword across recent pushes
node {baseDir}/scripts/query.mjs search --keyword "bitcoin" --days 7
# Today's usage breakdown by slot
node {baseDir}/scripts/track-usage.mjs today
# Current month's total usage
node {baseDir}/scripts/track-usage.mjs monthly
# Monthly forecast
node {baseDir}/scripts/track-usage.mjs forecast
Usage is recorded automatically when store-push.mjs receives a usage field.
Before each push, review feedback from the past 3 days. Adjust behavior based on patterns:
| Feedback Pattern | Adjustment |
|---|---|
| "Too brief" on summaries | Increase summary detail, aim for upper end of summary_length |
| "More about X topic" | Add X-related keywords via manage-config.mjs set-slot |
| "Less about Y" | Remove or deprioritize Y keywords |
| "Timing too early/late" | Update slot time via manage-config.mjs set-slot --name <name> --time <HH:MM> |
| "Wrong category" | Refine topic matching rules |
| "Liked this item" | Boost similar content sources/authors |
| Variable | Required | Description |
|---|---|---|
TAVILY_API_KEY | Yes | Tavily Search API key. Get from https://tavily.com |
XPOZ_API_KEY | Recommended | Xpoz MCP service key. If missing, Twitter source is skipped gracefully. |
NEWS_DIGEST_DATA_DIR | No | Data storage directory. Default: {baseDir}/data/ |
tavily-search separately.