Files
youlu-openclaw-workspace/TOOLS.md
Yanxin Lu 36143fcd93 Add digest command to email processor
Read-only summary of recent decisions, grouped by action with
[auto]/[user] markers. Supports --recent N for multi-day lookback.
2026-03-13 11:17:43 -07:00

119 lines
4.2 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.
# TOOLS.md - Local Notes
Skills define _how_ tools work. This file is for _your_ specifics — the stuff that's unique to your setup.
### Ollama 本地模型使用规则
**通用规则**
- 只用已下载的模型,绝不自动下载新模型
- 需要未下载的模型时,先询问用户
**默认模型kamekichi128/qwen3-4b-instruct-2507**
- 用途:邮件摘要、轻量分析
- 速度:快(~5秒
- 无需额外参数,直接调用即可
**备选模型**
- `ministral-3:3b` - 速度快,格式清晰
- `gemma3:4b` - 适中速度
- `qwen3:4b` - 较慢,仅备用
### agent-browser 浏览器自动化
**注意agent-browser 是独立的 CLI 工具,不是 OpenClaw 内置功能**
- 文档见 `~/.openclaw/workspace/skills/agent-browser/SKILL.md`
- 依赖 Chrome/Chromium已安装于 `/usr/bin/google-chrome`
### himalaya 邮件客户端
**本地配置:**
- 二进制:`~/.local/bin/himalaya`
- 配置:`~/.config/himalaya/config.toml`
- 文档:`~/.openclaw/workspace/skills/himalaya/SKILL.md`
**核心用法:**
```bash
himalaya envelope list --page-size 20 # 列出邮件
himalaya message read <id> # 读取邮件
himalaya message delete <id> # 删除邮件
himalaya message write # 写新邮件(交互式)
```
**邮件发送规则:**
- **youlu@luyanxin.com → lu@luyx.org**: 直接发送,无需确认
- 其他所有对外邮件: 仍需确认
### ~~News Digest 新闻摘要~~ (已停用)
~~**自动任务Cron + Subagent**~~
~~- 时间:每天早上 5:00 AM (PST)~~
~~- Cron ID: `cc95dcf3-0d6c-44f4-90af-76b836ca0c87`~~
~~**本地配置:**~~
~~- 目录:`~/.openclaw/workspace/scripts/news_digest/`~~
~~- 主脚本:`send_digest.py`~~
~~- 配置:`config.json`~~
~~- 数据库:`news_digest.db`~~
~~- 日志:`news_digest.log`~~
**注:** Cron 任务已删除。如需重新启用,需手动创建新的 cron 任务。
### 🌐 网页操作 - 工具选择决策表
| 场景 | 首选 | 次选 |
|------|------|------|
| 任何网页操作(抓取、点击、填表、截图) | `agent-browser` | `web_fetch` (仅纯文本) |
| Browser extension 有登录态/已打开页面 | `browser` (Chrome extension) | `agent-browser` |
| agent-browser 不可用 | `browser` | `web_fetch` |
**agent-browser 快速命令:**
```bash
agent-browser open <url>
agent-browser snapshot -i # 获取交互元素
agent-browser click @e1
agent-browser fill @e2 "text"
agent-browser close
```
### Email Processor 邮件自动处理
**目录**: `~/.openclaw/workspace/scripts/email_processor/`
**文档**: `README.md`(完整使用说明和标签更新流程)
**核心用法**:
```bash
./email-processor.sh scan # 扫描未读邮件
./email-processor.sh scan --recent 7 # 扫描最近7天
./email-processor.sh scan --dry-run # 测试模式(不执行)
./email-processor.sh review list # 查看待处理队列
./email-processor.sh review accept # 接受所有建议
./email-processor.sh review 1 delete # 处理第1封删除
./email-processor.sh stats # 查看统计
./email-processor.sh digest # 今日处理摘要
./email-processor.sh digest --recent 3 # 最近3天摘要
```
**置信度机制**:
- **阈值**: 85%`config.json``automation.confidence_threshold`
- **计算方式**: 基于 `(发件人邮箱, 标签)` 签名匹配历史决策
- **增长规则**: 每个匹配增加 10% 上限9次一致决策达到85%+
- **起步**: 新/未知发件人从 50% 开始
**标签分类14个**:
`receipt, billing, shipping, promotion, newsletter, security, social, reminder, confirmation, alert, personal, account, subscription, travel`
**何时需要更新标签**:
- 某发件人处理10+次后仍进队列(置信度<85%
- 同一发件人历史决策不一致(有时删有时留)
- 详见 `README.md` 的 "Refining the Tag Taxonomy" 章节
**重要文件**:
- `config.json` — Ollama 配置和自动化阈值
- `data/decision_history.json` — 决策历史(学习数据)
- `data/pending_emails.json` — 待处理队列
- `logs/` — 处理日志
---
Add whatever helps you do your job. This is your cheat sheet.