Files
ai-chat-app/skills/xian-favor/SKILL.md

177 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Xian Favor - 收藏关注技能
收藏管理系统,用于保存文本笔记、链接、专栏订阅、待办事项。
## 触发条件
当用户提到以下内容时激活此技能:
- 收藏、保存、记录(笔记、链接)
- 待办、任务、提醒
- 专栏、订阅
- "帮我记一下"、"保存这个链接"、"添加待办"
- 查看收藏、我的笔记、待办列表
## 核心功能
### 1. 添加条目
```bash
# 添加文本笔记
xian_favor add text "内容" -t "标签1,标签2"
# 添加链接
xian_favor add link "https://url" --title "标题" -t "标签"
# 添加专栏订阅
xian_favor add column "https://feed.url" --title "专栏名" --source "RSS" -t "订阅"
# 添加待办事项
xian_favor add todo "任务内容" -p high -d "2026-12-31" -t "工作"
# -p 优先级: low/medium/high/urgent
# -d 截止日期: YYYY-MM-DD
```
### 2. 查看列表
```bash
# 全部条目
xian_favor list
# 筛选类型
xian_favor list --type todo
xian_favor list --type link
xian_favor list --type text
# 筛选状态(待办)
xian_favor list --type todo --status pending
xian_favor list --type todo --status in_progress
xian_favor list --type todo --status completed
# 筛选标签
xian_favor list --tag "技术"
# JSON输出用于AI处理
xian_favor list --json
```
### 3. 搜索
```bash
xian_favor search "关键词"
xian_favor search "关键词" --type todo --json
```
### 4. 查看详情
```bash
xian_favor show <ID>
xian_favor show 1 --json
```
### 5. 编辑
```bash
xian_favor edit <ID> --status completed --note "已完成"
xian_favor edit <ID> --priority high -d "2026-12-31"
xian_favor edit <ID> --tags "新标签1,新标签2"
```
### 6. 完成待办
```bash
xian_favor done <ID>
```
### 7. 删除
```bash
xian_favor delete <ID> -f # -f 强制删除不确认
```
### 8. 标签管理
```bash
xian_favor tags # 列出所有标签
xian_favor tags --delete "旧标签" # 删除标签
```
### 9. 统计
```bash
xian_favor stats
```
## AI 使用指南
### 添加笔记时
当用户说"帮我记一下...",自动创建文本笔记:
```bash
xian_favor add text "用户的内容" --title "标题(可选)" -t "自动分类标签"
```
### 添加链接时
当用户提供链接说"收藏这个"
```bash
xian_favor add link "URL" --title "链接标题(从内容推断)" -t "分类标签"
```
### 添加待办时
当用户说"提醒我..."、"我要做..."
```bash
xian_favor add todo "任务内容" -p medium -t "待办"
```
- 根据用户语气判断优先级
- 如果用户提到时间,设置截止日期
### 查看待办时
```bash
xian_favor list --type todo --status pending --json
```
然后用自然语言总结给用户。
### 完成待办时
当用户说"完成了..."
```bash
xian_favor done <ID>
```
### 搜索时
```bash
xian_favor search "关键词" --json
```
## Web 界面
服务运行在端口 **19014**
- http://localhost:19014
## 数据存储
SQLite 数据库:`~/.xian_favor/xian_favor.db`
## 注意事项
1. **自动分类**:根据内容自动添加合适标签
2. **智能标题**:如果没有标题,从内容提取关键信息作为标题
3. **优先级推断**:用户说"紧急"、"重要"→ high/urgent用户说"有空做"→ low
4. **JSON输出**AI处理时使用 `--json` 参数获取结构化数据
## 示例对话
用户:"帮我记一下,今天学了一个新命令 git stash"
`xian_favor add text "今天学了一个新命令 git stash" -t "学习,git"`
用户:"收藏这个链接 https://example.com/article"
`xian_favor add link "https://example.com/article" -t "收藏"`
用户:"提醒我明天检查邮件"
`xian_favor add todo "检查邮件" -d "YYYY-MM-DD" -t "工作"`
用户:"我有什么待办?"
`xian_favor list --type todo --status pending --json` → 总结给用户