Skip to content

feat: add OpenClaw Skill support for one-click installation - #5

Open
gudo7208 wants to merge 4 commits into
77AutumN:mainfrom
gudo7208:refactor/code-quality-optimization
Open

feat: add OpenClaw Skill support for one-click installation#5
gudo7208 wants to merge 4 commits into
77AutumN:mainfrom
gudo7208:refactor/code-quality-optimization

Conversation

@gudo7208

Copy link
Copy Markdown
Contributor

概述

新增 OpenClaw Skill 支持,让用户可以一键安装使用情报简报功能。

🆕 OpenClaw Skill 支持

一键安装

clawhub install intel-briefing

自然语言触发

  • "帮我生成今日情报简报"
  • "今天科技圈有什么新闻"
  • "morning briefing"

OpenClaw 会自动处理数据采集、AI 摘要和推送。

变更内容

新增文件

  • SKILL.md: OpenClaw 技能定义文件,包含元数据、触发词、操作步骤
  • scripts/openclaw_handler.py: OpenClaw 适配层,复用核心逻辑

删除文件

  • src/utils/webhook_notifier.py: 646 行代码,推送功能交给 OpenClaw 处理

修改文件

  • .env.example: 从 95 行精简到 45 行,只保留数据源配置
  • README.md: 添加 OpenClaw 安装说明
  • run_mission.py: 移除 webhook 调用

设计理念

功能 独立模式 OpenClaw 模式
数据抓取 src/sensors/ 复用
报告生成 report_generator.py 复用(跳过 AI 增强)
AI 摘要 Gemini API OpenClaw LLM
推送通知 webhook_notifier.py OpenClaw 推送

核心价值聚焦: Intel Briefing 专注于情报聚合和报告生成,推送交给 OpenClaw。

测试验证

$ python3 -m pytest tests/test_core.py -v
13 passed in 0.26s

$ python3 scripts/openclaw_handler.py --help
usage: openclaw_handler.py [-h] [--days DAYS] [--format {markdown,json}] [--quiet]

所有测试通过,向后兼容。

gudo7208 and others added 4 commits February 13, 2026 23:20
- Add AI-generated Executive Summary at report top (via Gemini)
- Hide empty sections instead of showing "暂无数据"
- Add webhook notifier supporting WeChat Work, Feishu, Slack, DingTalk
- Update .env.example with webhook configuration
- Update tests for new behavior

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Add support for multiple notification channels:
- Domestic: WeChat Work, Feishu, DingTalk
- International: Slack, Discord, Telegram
- Personal: Bark (iOS), Pushover
- Email: SMTP with HTML/plain text
- Custom: Generic webhook for n8n/Zapier

Improvements:
- Smart content formatting (Markdown/HTML/plain text)
- Extract executive summary and top items per section
- Platform-specific optimizations (Discord Embed, Feishu Card, etc.)
- Respect each platform's length limits
- Optional REPORT_BASE_URL for "view full report" link

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Telegram: Switch from Markdown to HTML mode for better stability
  (avoids special character escaping issues)
- Bark: Add level parameter, improve URL format documentation
- Pushover: Use string values for html/priority parameters

Verified against official documentation:
- WeChat Work: https://developer.work.weixin.qq.com/document/
- Feishu: https://open.feishu.cn/document/
- DingTalk: https://open.dingtalk.com/document/
- Slack: https://api.slack.com/messaging/webhooks
- Discord: https://discord.com/developers/docs/resources/webhook
- Telegram: https://core.telegram.org/bots/api
- Bark: https://github.com/Finb/Bark
- Pushover: https://pushover.net/api

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Add SKILL.md with OpenClaw skill definition
- Add scripts/openclaw_handler.py as OpenClaw adapter
- Remove webhook_notifier.py (646 lines) - push via OpenClaw instead
- Simplify .env.example (95 -> 45 lines)
- Update README with OpenClaw installation instructions

Users can now install via: clawhub install intel-briefing

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant