Install
openclaw skills install @haohuawu/ai-daily-briefing生成每日 AI 资讯简报并发送到飞书。从多数据源采集 AI 资讯,整合为紧凑列表格式,以飞书卡片消息形式发送。当用户提到每日简报、AI 日报、AI 资讯、AI Daily 等意图时触发。
openclaw skills install @haohuawu/ai-daily-briefing生成每日 AI 资讯简报,从 5 个板块采集、整合、去重、格式化,最终以飞书卡片发送到目标群聊。
ai-daily-briefing/
├── SKILL.md # 本文件:协议定义 + 质量标准 + 使用说明
├── scripts/
│ ├── common.py # 公共函数:环境检测、代理、HTTP 请求
│ ├── setup.py # 首次安装:检测 OS/GUI、装依赖、配置指引
│ ├── preflight_check.py # 执行前检查:环境变量、API 可用性、代理
│ ├── collect.py # 统一采集:5 板块参数化(--section)
│ └── verify.py # 去重 + URL 校验 + 入库 + 聚合发送
┌─────────────────────────────────────────────────────────────────┐
│ Main Agent │
│ 1. python3 scripts/preflight_check.py │
│ 2. spawn 5 sub agents(各板块并行采集) │
│ 3. python3 scripts/verify.py aggregate --date <YYYY-MM-DD> │
│ → 聚合 → URL 校验 → 入库 → 飞书卡片 → lark-cli 发送 │
└─────────────────────────────────────────────────────────────────┘
│
┌───────────┬───────────┼───────────┬───────────┐
▼ ▼ ▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐
│ 行业动态 │ │ GitHub │ │ Product │ │ Agent │ │ 前沿技术 │
│ Sub Agent │ │ Trending │ │ Hunt │ │ 工程 │ │ Sub Agent │
│ │ │ Sub Agent │ │ Sub Agent │ │ Sub Agent │ │ │
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
collect.py collect.py collect.py collect.py collect.py
--section --section --section --section --section
industry github producthunt agent_eng frontier
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
/tmp/ai-daily-briefing/<date>/
├── industry.json
├── github.json
├── producthunt.json
├── agent_eng.json
└── frontier.json
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ verify.py aggregate │
│ · 读取 5 个板块 JSON │
│ · URL 校验(排除 Product Hunt 等已知限流站点) │
│ · 去重入库(source_id / URL hash / SimHash) │
│ · 构造飞书卡片(紧凑列表 + hr 分隔) │
│ · lark-cli 发送到群聊 │
│ · 异常时私信用户 │
└─────────────────────────────────────────────────────────────────┘
必需: FEISHU_APP_ID, FEISHU_OPEN_ID, FEISHU_CHAT_ID, PH_API_TOKEN 可选: FIRECRAWL_API_KEY(Anthropic 等无 RSS 博客的抓取)、PROXY_URL(GitHub Topics 等需要时自动检查)、HTTP_PROXY_URL、AI_DAILY_DB_PATH
lark-cli config bind --source openclaw --app-id $FEISHU_APP_ID --identity bot-only --force首次运行:
python3 <skill-dir>/scripts/setup.py
每次执行前:
python3 <skill-dir>/scripts/preflight_check.py
sessions_yield 等待所有 sub agent 返回python3 verify.py aggregate --date <YYYY-MM-DD>每个 sub agent 的职责:执行采集脚本,对结果做质量判断和去重,写入约定文件。
| Sub Agent | 板块 | 采集命令 | 文件路径 | 目标条数 |
|---|---|---|---|---|
| 1 | 行业动态 | python3 collect.py --section industry | /tmp/ai-daily-briefing/<date>/industry.json | 5-10 |
| 2 | GitHub Trending | python3 collect.py --section github | /tmp/ai-daily-briefing/<date>/github.json | 5 |
| 3 | Product Hunt | python3 collect.py --section producthunt | /tmp/ai-daily-briefing/<date>/producthunt.json | 5 |
| 4 | Agent 工程 | python3 collect.py --section agent_eng | /tmp/ai-daily-briefing/<date>/agent_eng.json | 5 |
| 5 | 前沿技术 | python3 collect.py --section frontier | /tmp/ai-daily-briefing/<date>/frontier.json | 5 |
每个 sub agent 的标准 task:
1. 执行采集脚本:python3 <skill-dir>/scripts/collect.py --section <section>
2. 读取脚本输出的 JSON 文件
3. 对每条结果执行质量判断(按下方标准过滤)
4. 对保留的条目执行去重检查(调用 `verify.py` 的 `is_duplicate`)
5. 去重通过后写入最终文件
6. 最多 3 次 loop,不足条目不凑数
脚本已处理:
sub agent 只需做:质量判断 + 去重检查。
每个 sub agent 在质量判断通过后,执行去重检查。去重只读不写,写入由主 agent 汇总后执行。
import sys
sys.path.insert(0, "<skill-dir>/scripts")
from verify import get_db, is_duplicate
conn = get_db()
is_dup, reason = is_duplicate(conn, title=title, url=url, description=description, section=section)
if is_dup:
# 丢弃,不计数
continue
板块名:industry, github, producthunt, agent_eng, frontier
三层去重:
去重通过后,该条目计入目标条数。重复条目丢弃后继续采集。
主 agent 只需执行聚合脚本:
python3 <skill-dir>/scripts/verify.py aggregate --date <YYYY-MM-DD>
聚合脚本自动完成:
/tmp/ai-daily-briefing/<date>/*.json 读取各板块结果如需调试,加 --dry-run 只输出卡片 JSON 不发送:
python3 <skill-dir>/scripts/verify.py aggregate --date 2026-07-19 --dry-run
每个 sub agent 独立循环:
异常时私信用户(不发群):
lark-cli --profile $FEISHU_APP_ID --as bot im +messages-send \
--user-id $FEISHU_OPEN_ID --msg-type text \
--content '{"text":"⚠️ AI Daily 采集异常:<原因>"}'
异常场景:
memory/YYYY-MM-DD.md