Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 83 additions & 1 deletion task-reminder/skills/task-reminder/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: task-reminder
description: 本地提醒调度技能。用于用户说提醒我多久之后/在某个时间做什么等新增提醒需求,尤其适合非技术用户。负责检查服务、自动启动、安装依赖并调用提醒脚本
description: 本地提醒调度技能。用于用户说"提醒我多久之后/在某个时间做什么"等新增提醒需求,也支持"推送新闻"、"订阅新闻"等新闻资讯推送。尤其适合非技术用户。负责检查服务、自动启动、安装依赖并调用提醒/新闻脚本
---

# 提醒调度技能
Expand Down Expand Up @@ -103,3 +103,85 @@ python remind.py --at "明天 08:00" 开会

- 成功:确认提醒内容与时间(邮件已发送/将按时发送)。
- 失败:展示脚本错误信息,并提示检查服务或配置。

---

# 通知渠道

系统支持多渠道通知(邮件 + 企业微信),提醒和新闻推送均走统一通知。

## 配置文件

- `<skill_root>/config/notify_config.json` — 默认渠道列表
- `<skill_root>/config/wechat_config.json` — 企业微信 Webhook 配置
- `<skill_root>/config/email_config.json` — 邮件 SMTP 配置

## 企业微信配置

编辑 `config/wechat_config.json`,填入真实的 Webhook Key:
```json
{
"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY",
"mentioned_list": []
}
```

---

# 新闻推送技能

## 意图识别

当用户说以下内容时,触发新闻推送功能:
- "推送新闻"、"看看今天的新闻"、"新闻早报" → 立即抓取推送
- "订阅新闻"、"每天推送新闻"、"定时新闻" → 注册定时任务
- "抓取新闻看看" → 仅抓取预览(不推送)

## 核心流程

1) 确定可用的 Python 命令(同提醒技能)。
2) 确保服务运行(同提醒技能)。
3) 根据意图执行对应命令。

## 命令

### A) 立即推送

```
python news.py now
python news.py now --channels wechat
python news.py now --sources 36kr zhihu_hot
```

在此工作目录运行:`<skill_root>/scripts`

### B) 仅抓取预览(不推送)

```
python news.py now --no-push
```

### C) 注册定时推送

```
python news.py schedule
python news.py schedule --cron "0 8,20 * * *"
python news.py schedule --channels wechat
```

默认 cron: `0 8 * * *`(每天早8点)

## 支持的新闻源

内置源(通过 `config/news_config.json` 启用/禁用):
- `36kr` — 36氪热榜
- `zhihu_hot` — 知乎热榜
- `sina_news` — 新浪新闻
- `infoq` — InfoQ 中文站

自定义 RSS 源:在配置文件 `custom_rss` 数组中添加。

## 输出给用户

- 成功:展示抓取条数和推送结果。
- 失败:展示错误信息,提示检查服务或网络。
Loading