Files
youlu-openclaw-workspace/TOOLS.md
Yanxin Lu 734790a599 calendar: add todo edit command
Allow editing todo fields (due date, priority) in place via todoman,
instead of requiring delete + recreate. Updates all docs for consistency.
2026-03-24 21:56:23 -07:00

6.1 KiB
Raw Blame History

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

核心用法:

himalaya envelope list --page-size 20    # 列出邮件
himalaya message read <id>               # 读取邮件
himalaya message delete <id>             # 删除邮件
himalaya message write                   # 写新邮件(交互式)

邮件发送规则:

🌐 网页操作 - 工具选择决策表

场景 首选 次选
任何网页操作(抓取、点击、填表、截图) agent-browser web_fetch (仅纯文本)
Browser extension 有登录态/已打开页面 browser (Chrome extension) agent-browser
agent-browser 不可用 browser web_fetch

agent-browser 快速命令:

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(完整使用说明和标签更新流程) Cron: 每天 08:30 / 17:00PST

核心用法:

./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.jsonautomation.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/ — 处理日志

Calendar 日历 + 待办

文档: ~/.openclaw/workspace/skills/calendar/SKILL.md 目录: ~/.openclaw/workspace/skills/calendar/ 默认发件人: youlu@luyanxin.com 默认时区: America/Los_Angeles 日历数据: ~/.openclaw/workspace/calendars/home/(事件)、calendars/tasks/(待办) 运行方式: uv run(依赖 icalendar 库)

核心用法:

SKILL_DIR=~/.openclaw/workspace/skills/calendar

# 发送日历邀请(--from 默认 youlu@luyanxin.com
$SKILL_DIR/scripts/calendar.sh send \
  --to "friend@example.com" \
  --subject "Lunch" --summary "Lunch at Tartine" \
  --start "2026-03-20T12:00:00" --end "2026-03-20T13:00:00"

# 接受邀请(从邮件中提取 .ics
$SKILL_DIR/scripts/calendar.sh reply --envelope-id 42 --action accept

# 拒绝邀请(附带留言)
$SKILL_DIR/scripts/calendar.sh reply --envelope-id 42 --action decline \
  --comment "Sorry, I have a conflict."

# 待办管理
$SKILL_DIR/scripts/calendar.sh todo add --summary "跟进报销" --due "2026-03-25" --priority high
$SKILL_DIR/scripts/calendar.sh todo list
$SKILL_DIR/scripts/calendar.sh todo edit --match "报销" --due "2026-03-28"
$SKILL_DIR/scripts/calendar.sh todo complete --match "报销"
$SKILL_DIR/scripts/calendar.sh todo delete --match "报销"
$SKILL_DIR/scripts/calendar.sh todo check    # 每日摘要cron

# 查看日历(检查冲突)
khal list today 7d

支持操作: 发送邀请 (send)、接受/拒绝/暂定 (reply)、待办管理 (todo add/list/edit/complete/delete/check) 依赖: himalaya邮件、vdirsyncerCalDAV 同步、khal查看日历、todoman待办管理 同步: 发送/回复/待办变更后自动 vdirsyncer sync,心跳也会定期同步 注意: 发送日历邀请属于对外邮件,需先确认

OpenClaw Cron 定时任务

规则: 确定性 shell 任务用 systemEvent,需要 LLM 判断的用 agentTurn

# systemEvent 直接执行(不走 LLM
openclaw cron edit <id> --session main \
  --system-event 'exec:cd /path && command'

# 查看/测试
openclaw cron list
openclaw cron runs --id <id>
openclaw cron run <id>  # 立即触发

注意: kimi-k2.5 工具使用弱,agentTurn 容易产生"已完成"幻觉。详见 MEMORY.md 2026-03-24 备份修复记录。


Add whatever helps you do your job. This is your cheat sheet.