0xcjl/auto-diary-0xcjl/SKILL.md
Automatically write daily/weekly/monthly diary summaries and extract insights to auto-learn.md for HexaLoop.
npx skillsauth add openclaw/skills auto-diaryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
自动写日记(中英双语)、提取洞察、推送飞书卡片、闭环 HexaLoop。
三句话核心:
auto-learn.md(供冥想层)oc_15949806c...Cron 触发
│
▼
读取上下文(按优先级):
1. `memory/YYYY-MM-DD.md`(昨日工作日志,若有)
2. `memory/auto-learn.md`(近期洞察,供关联参考)
3. `farm/farm.json`(能量值、活跃种子数、待确认收获)
4. `NOW.md`(当前 session 状态)
5. `memory/heartbeat-state.json`(近期心跳检查结果)
│
▼
AI 写结构化日记,必须包含:
- **中文摘要**(Jialin 看):≤3句话,结论先行
- **关键决策**(中文):1-3条,每条含「决定内容」和「原因」
- **收获教训**(中文 + 英文):从工作/系统运行中学到的
- **下一步**(中文 + 英文):今天或近期要做的具体行动
- **HexaLoop 状态**(英文):farm energy、seeds、harvests,N/A 若无数据
- **English System Notes**(英文):任务类型、决策点、教训、可操作下一步,供 OPD Scorer 使用
- **HexaLoop Hints**(英文,1-2句):对冥想/农场最有价值的信号,如"farm energy dropped significantly"或"new agent pattern learned"
│
├─→ 保存本地文件
│ `~/.openclaw/workspace/memory/diary/YYYY-MM-DD.md`(每日)
│ `~/.openclaw/workspace/memory/diary/WWWW-MM-DD_weekly.md`(每周)
│ `~/.openclaw/workspace/memory/diary/YYYY-MM_monthly.md`(每月)
│
├─→ 提取价值片段 → auto-learn.md(格式 A,每次 1-3 条)
│ - 从日记中提取最有价值的 1-3 条:关键决策 / 教训 / 可操作改进点
│
└─→ 推送飞书卡片(oc_15949806c791613dbf45b872e8bc111a)
| 脚本 | 用途 | 被谁调用 |
|------|------|---------|
| scripts/write_diary.py | 读取上下文 → AI 写日记 → 保存本地 → 提取 insights | main agent |
| scripts/send_diary.py | 构建飞书 Interactive 卡片 JSON → 推送 | main agent |
| scripts/weekly_review.py | 聚合7天日记 → 生成周度卡片 | main agent |
| scripts/monthly_review.py | 聚合30天日记 → 生成月度卡片 | main agent |
见 templates/diary_template.md(main agent 参考该模板生成日记 Markdown)
追加到 memory/auto-learn.md,使用格式 A:
## 学习记录
### 2026-03-30 08:20
**任务类型**: diary
**涉及 Skill**: auto-diary
**关键决策**: 发现昨日无 memory 文件,改用 farm.json + NOW.md 作为主要上下文
**教训**: 即使无主动工作,系统状态变化(如农场能量涨跌)也值得记入日记
**下次应用**: 日记生成前检查 memory/ 日期文件,缺失时自动降级到系统状态摘要
判断标准:
cron 触发时 main agent 收到纯文本消息:
diary write → 生成昨日日记diary weekly → 聚合上周7天diary monthly → 聚合上月全月典型执行场景:
diary write:读 memory/2026-03-30.md + farm.json + NOW.md → 生成双语日记 → 写文件 → extract insights → 推卡片diary weekly:读 DIARY_DIR 下 7 个 .md → 聚合成周报 → 写 _weekly.md → 推卡片diary monthly:读 DIARY_DIR 下 ~30 个 .md → 聚合成月报 → 写 _monthly.md → 推卡片memory/diary/YYYY-MM-DD.md(仅每日日记文件,排除 _weekly.md / _monthly.md)memory/diary/WWWW-MM-DD_weekly.mdauto-learn.mdmemory/diary/YYYY-MM-DD.md(仅每日日记文件,排除 _weekly.md / _monthly.md)memory/diary/YYYY-MM_monthly.mdauto-learn.mdmemory/HexaLoop系统架构-2026-03-31.md使用飞书 Interactive 卡片,JSON 结构如下:
{
"msg_type": "interactive",
"card": {
"header": {
"title": {"tag": "plain_text", "text": "📓 YYYY-MM-DD 日记"},
"template": "blue" // daily=blue, weekly=purple, monthly=orange
},
"elements": [
{"tag": "div", "text": {"tag": "lark_md", "content": "**中文摘要**\n{内容}"}},
{"tag": "hr"},
{"tag": "div", "text": {"tag": "lark_md", "content": "**HexaLoop**\n{能量/洞察状态}"}},
{"tag": "note", "elements": [{"tag": "plain_text", "text": "Generated by auto-diary | YYYY-MM-DD HH:MM"}]}
]
}
}
receive_id: oc_15949806c791613dbf45b872e8bc111areceive_id_type: chat_id在飞书向皮皮虾发消息:
diary write — 立即生成昨日日记diary weekly — 立即生成周度回顾diary monthly — 立即生成月度回顾cron 触发后,main agent 在 isolated session 中执行。执行完成后:
oc_15949806c791613dbf45b872e8bc111a(飞书群)announce 模式(结果推送至 last channel)# 日记(每天 08:20)
openclaw cron add --name "每日日记" --cron "20 8 * * *" --tz "Asia/Shanghai" --message "diary write" --session isolated --agent main
# 周度回顾(周六 09:00)
openclaw cron add --name "周度日记回顾" --cron "0 9 * * 6" --tz "Asia/Shanghai" --message "diary weekly" --session isolated --agent main
# 月度回顾(每月1日 09:00)
openclaw cron add --name "月度日记回顾" --cron "0 9 1 * *" --tz "Asia/Shanghai" --message "diary monthly" --session isolated --agent main
| 场景 | 行为 |
|------|------|
| 无 memory/YYYY-MM-DD.md 文件 | 仍写日记,用"(无主动工作记录,基于系统状态生成)"标注 |
| farm.json 不存在或格式错误 | 跳过 HexaLoop 状态模块,继续写日记 |
| 飞书推送失败(网络/权限) | 打印错误日志至 stdout,不阻塞日记保存 |
| auto-learn.md 写失败 | 打印警告,不阻塞主流程 |
| DIARY_DIR 不存在 | 自动创建 ~/.openclaw/workspace/memory/diary/ |
| 周/月度无任何日记文件 | 输出"无记录",不生成空白卡片 |
| 指标 | 来源 | 含义 | |------|------|------| | farm energy | farm.json | 0.0~1.0,低于 0.3 说明需要关注 | | 活跃种子 | farm.json seeds[].status | "growing" 状态的种子数 | | 待确认收获 | farm.json harvested[] | pending review 的收获数 | | 洞察数 | auto-learn.md 新增条数 | 本次日记提炼出的可操作洞察 | | 记录天数 | DIARY_DIR 中对应周期的 .md | 当期有日记的天数 |
工具调用(以用户身份发飞书卡片):
feishu_im_user_message(
action="send",
receive_id_type="chat_id",
receive_id="oc_15949806c791613dbf45b872e8bc111a",
msg_type="interactive",
content=json.dumps(card) # card 由 send_diary.py 生成
)
文件路径:
~/.openclaw/workspace/memory/diary/YYYY-MM-DD.md~/.openclaw/workspace/memory/auto-learn.md~/.openclaw/workspace/farm/farm.jsontools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。