名称: proactive-research
描述: 监控感兴趣的主题,并在重要动态发生时主动发出警报。适用于用户希望对特定主题(例如产品发布、价格变动、新闻话题、技术更新)进行自动化监控的场景。支持定时网络搜索、AI驱动的重要性评分、智能警报与每周摘要,以及基于记忆的上下文摘要。
监控重要事项,在发生时获得通知。
主动研究通过持续监控您关心的主题,并智能地仅在真正重要的事件发生时通知您,从而将您的助手从被动响应转变为主动服务。
# 初始化配置
cp config.example.json config.json
# 添加一个主题
python3 scripts/manage_topics.py add "Dirac Live 更新" \
--keywords "Dirac Live,房间校正,音频" \
--frequency daily \
--importance medium
# 测试监控(试运行)
python3 scripts/monitor.py --dry-run
# 设置 cron 以实现自动监控
python3 scripts/setup_cron.py
每个主题包含以下属性:
hourly(每小时)、daily(每天)、weekly(每周)high(立即警报)、medium(重要时警报)、low(仅收录摘要){
"topics": [
{
"id": "ai-models",
"name": "AI 模型发布",
"query": "新 AI 模型发布 GPT Claude Llama",
"keywords": ["GPT", "Claude", "Llama", "发布", "公告"],
"frequency": "daily",
"importance_threshold": "high",
"channels": ["telegram"],
"context": "为工作关注 AI 发展动态",
"alert_on": ["model_release", "major_update"]
},
{
"id": "tech-news",
"name": "科技行业新闻",
"query": "科技 初创公司 融资 收购",
"keywords": ["初创公司", "融资", "A轮", "收购"],
"frequency": "daily",
"importance_threshold": "medium",
"channels": ["telegram"],
"context": "了解科技趋势",
"alert_on": ["major_funding", "acquisition"]
},
{
"id": "security-alerts",
"name": "安全漏洞",
"query": "CVE 严重漏洞 安全补丁",
"keywords": ["CVE", "漏洞", "安全", "补丁", "严重"],
"frequency": "hourly",
"importance_threshold": "high",
"channels": ["telegram", "email"],
"context": "DevOps 安全监控",
"alert_on": ["critical_cve", "zero_day"]
}
],
"settings": {
"digest_day": "sunday",
"digest_time": "18:00",
"max_alerts_per_day": 5,
"deduplication_window_hours": 72,
"learning_enabled": true
}
}
管理研究主题:
# 添加主题
python3 scripts/manage_topics.py add "主题名称" \
--query "搜索查询" \
--keywords "关键词1,关键词2" \
--frequency daily \
--importance medium \
--channels telegram
# 列出主题
python3 scripts/manage_topics.py list
# 编辑主题
python3 scripts/manage_topics.py edit eth-price --frequency hourly
# 移除主题
python3 scripts/manage_topics.py remove eth-price
# 测试主题(预览结果而不保存)
python3 scripts/manage_topics.py test eth-price
主监控脚本(通过 cron 运行):
# 正常运行(发送警报 + 保存状态)
python3 scripts/monitor.py
# 试运行(不发送警报,显示将要执行的操作)
python3 scripts/monitor.py --dry-run
# 强制检查特定主题
python3 scripts/monitor.py --topic eth-price
# 详细日志
python3 scripts/monitor.py --verbose
工作原理:
1. 读取需要检查的主题(基于频率设置)
2. 使用 web-search-plus 或内置的 web_search 进行搜索
3. 使用 AI 重要性评分器为每个结果评分
4. 高重要性 → 立即发送警报
5. 中重要性 → 保存以备摘要
6. 低重要性 → 忽略
7. 更新状态以防止重复警报
生成每周摘要:
# 生成本周摘要
python3 scripts/digest.py
# 生成并发送
python3 scripts/digest.py --send
# 预览而不发送
python3 scripts/digest.py --preview
输出格式示例:
# 每周研究摘要 - [日期范围]
## 🔥 重点内容
- **AI 模型**:Claude 4.5 发布,推理能力提升
- **安全**:流行框架中的严重 CVE 漏洞已修复
## 📊 按主题分类
### AI 模型发布
- [本周有 3 项发现]
### 安全漏洞
- [本周有 1 项发现]
## 💡 建议
根据您的兴趣,您可能希望监控:
- "Kubernetes 安全"(本周提及 3 次)
配置自动化监控:
# 交互式设置
python3 scripts/setup_cron.py
# 使用默认值自动设置
python3 scripts/setup_cron.py --auto
# 移除 cron 任务
python3 scripts/setup_cron.py --remove
创建 cron 条目示例:
# 主动研究 - 每小时主题
0 * * * * cd /path/to/skills/proactive-research && python3 scripts/monitor.py --frequency hourly
# 主动研究 - 每日主题
0 9 * * * cd /path/to/skills/proactive-research && python3 scripts/monitor.py --frequency daily
# 主动研究 - 每周摘要
0 18 * * 0 cd /path/to/skills/proactive-research && python3 scripts/digest.py --send
评分器使用多种信号来决定警报优先级:
高优先级(立即警报):
- 重大突发新闻(通过新鲜度和关键词密度检测)
- 价格变动 >10%(针对金融主题)
- 与您精确关键词匹配的产品发布
- 您使用的工具中的安全漏洞
- 对您提出的具体问题的直接回答
中优先级(值得收录摘要):
- 相关新闻但不紧急
- 跟踪产品的次要更新
- 您关注主题中的有趣进展
- 教程/指南发布
- 高参与度的社区讨论
低优先级(忽略):
- 重复新闻(已警报过)
- 略微相关的内容
- 低质量来源
- 过时信息
- 垃圾/推广内容
启用时(learning_enabled: true),系统会:
1. 跟踪您与哪些警报互动
2. 根据您的行为调整评分权重
3. 建议主题优化
4. 自动调整重要性阈值
学习数据存储在 .learning_data.json 中(保护隐私,绝不共享)。
主动研究与您的对话历史连接:
警报示例:
🔔 Dirac Live 更新
版本 3.8 已发布,包含您上周询问的房间校正改进。
上下文: 您曾提到工作室的低频响应问题。此更新包含了新的低频优化功能。
[链接] | [完整详情]
工作原理:
1. 读取 references/memory_hints.md 文件(需创建此文件)
2. 扫描最近的对话日志(如果可用)
3. 将发现与过去的上下文匹配
4. 生成个性化摘要
帮助 AI 建立联系:
# 主动研究记忆提示
## AI 模型
- 使用 Claude 进行编码辅助
- 对推理能力改进感兴趣
- 比较不同用例的模型
## 安全
- 运行生产环境 Kubernetes 集群
- 需要快速修补严重 CVE 漏洞
- 对零日漏洞披露感兴趣
## 科技新闻
- 关注初创企业生态系统
- 对开发者工具领域感兴趣
- 跟踪潜在的收购目标
需要 OpenClaw 消息工具:
{
"channels": ["telegram"],
"telegram_config": {
"chat_id": "@your_username",
"silent": false,
"effects": {
"high_importance": "🔥",
"medium_importance": "📌"
}
}
}
基于 Webhook:
{
"channels": ["discord"],
"discord_config": {
"webhook_url": "https://discord.com/api/webhooks/...",
"username": "研究机器人",
"avatar_url": "https://..."
}
}
SMTP 或 API:
{
"channels": ["email"],
"email_config": {
"to": "you@example.com",
"from": "research@yourdomain.com",
"smtp_server": "smtp.gmail.com",
"smtp_port": 587
}
}
微调何时触发警报:
{
"alert_on": [
"price_change_10pct",
"keyword_exact_match",
"source_tier_1",
"high_engagement"
],
"ignore_sources": [
"spam-site.com",
"clickbait-news.io"
],
"boost_sources": [
"github.com",
"arxiv.org",
"official-site.com"
]
}
匹配特定模式:
{
"patterns": [
"version \\d+\\.\\d+\\.\\d+",
"\\$\\d{1,3}(,\\d{3})*",
"CVE-\\d{4}-\\d+"
]
}
防止警报疲劳:
{
"settings": {
"max_alerts_per_day": 5,
"max_alerts_per_topic_per_day": 2,
"quiet_hours": {
"start": "22:00",
"end": "08:00"
}
}
}
跟踪:
- 每个主题的最后检查时间
- 已警报的 URL(去重)
- 重要性评分历史
- 学习数据(如果启用)
示例:
{
"topics": {
"eth-price": {
"last_check": "2026-01-28T22:00:00Z",
"last_alert": "2026-01-28T15:30:00Z",
"alerted_urls": [
"https://example.com/eth-news-1"
],
"findings_count": 3,
"alerts_today": 1
}
},
"deduplication": {
"url_hash_map": {
"abc123": "2026-01-28T15:30:00Z"
}
}
}
存储值得收录摘要的发现:
.findings/
├── 2026-01-22_eth-price.json
├── 2026-01-24_fm26-patches.json
└── 2026-01-27_ai-breakthroughs.json
importance_threshold: medium,根据警报质量调整"keywords": ["AI", "-clickbait", "-spam"]自动使用智能路由:
- 产品/价格主题 → Serper
- 研究主题 → Tavily
- 公司/初创企业发现 → Exa
根据对话模式建议主题:
"您本月已询问 Rust 12 次。需要我监控 'Rust 语言更新' 吗?"
未发送警报:
- 检查 cron 是否运行:crontab -l
- 验证渠道配置(Telegram 聊天 ID、Discord webhook)
- 使用 --dry-run --verbose 运行以查看评分
警报过多:
- 提高 importance_threshold
- 添加速率限制
- 优化关键词(添加否定过滤器)
- 启用学习模式
错过重要新闻:
- 降低 importance_threshold
- 增加检查频率
- 扩大关键词范围
- 检查 .research_state.json 中的去重问题
摘要未生成:
- 验证 .findings/ 目录是否存在且有内容
- 检查摘要 cron 计划
- 手动运行:python3 scripts/digest.py --preview
python3 scripts/manage_topics.py add "iPhone 17 发布" \
--query "iPhone 17 公告 发布日期" \
--keywords "iPhone 17,苹果发布会,九月" \
--frequency daily \
--importance high \
--channels telegram \
--context "计划从 iPhone 13 升级"
python3 scripts/manage_topics.py add "竞争对手分析" \
--query "CompetitorCo 产品发布 融资" \
--keywords "CompetitorCo,产品,发布,轮次,融资" \
--frequency weekly \
--importance medium \
--channels discord,email
python3 scripts/manage_topics.py add "量子计算论文" \
--query "量子计算 arxiv" \
--keywords "量子,量子比特,arxiv" \
--frequency weekly \
--importance low \
--channels email
为 ClawHub 构建。使用 web-search-plus 技能进行智能搜索路由。