← 返回 Skills 市场
0xcjl

auto-diary

作者 Jialin · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
104
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install auto-diary-0xcjl
功能描述
Automatically write daily/weekly/monthly diary summaries and extract insights to auto-learn.md for HexaLoop.
使用说明 (SKILL.md)

Auto-Diary Skill

自动写日记(中英双语)、提取洞察、推送飞书卡片、闭环 HexaLoop。

三句话核心

  1. 每天 08:20 总结昨天,中英双语写日记
  2. 提取 1-3 条价值洞察 → auto-learn.md(供冥想层)
  3. 推飞书卡片到 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)

价值片段格式(写入 auto-learn.md)

追加到 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 → 聚合上月全月

典型执行场景

  1. diary write:读 memory/2026-03-30.md + farm.json + NOW.md → 生成双语日记 → 写文件 → extract insights → 推卡片
  2. diary weekly:读 DIARY_DIR 下 7 个 .md → 聚合成周报 → 写 _weekly.md → 推卡片
  3. diary monthly:读 DIARY_DIR 下 ~30 个 .md → 聚合成月报 → 写 _monthly.md → 推卡片

周度回顾(diary weekly)特殊要求

  • 读取 memory/diary/YYYY-MM-DD.md(仅每日日记文件,排除 _weekly.md / _monthly.md
  • 生成:本周概览、关键进展、问题反思、下周计划(均中英双语)
  • 聚合计分:记录天数、洞察总数
  • 写入 memory/diary/WWWW-MM-DD_weekly.md
  • 追加格式 A 洞察到 auto-learn.md

月度回顾(diary monthly)特殊要求

  • 读取 memory/diary/YYYY-MM-DD.md(仅每日日记文件,排除 _weekly.md / _monthly.md
  • 生成:月度主题、里程碑、挑战反思、下月重点(均中英双语)
  • 聚合计分:记录天数、核心洞察、HexaLoop 进化信号
  • 写入 memory/diary/YYYY-MM_monthly.md
  • 追加格式 A 洞察到 auto-learn.md

HexaLoop 集成

  • 输入 → auto-learn.md:日记洞察以格式 A 追加,作为冥想层的输入素材
  • 流转路径:diary insights → auto-learn.md → Meditation (02:30) → 反思 → 农场种子
  • 参考memory/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": "**中文摘要**\
{内容}"}},
      {"tag": "hr"},
      {"tag": "div", "text": {"tag": "lark_md", "content": "**HexaLoop**\
{能量/洞察状态}"}},
      {"tag": "note", "elements": [{"tag": "plain_text", "text": "Generated by auto-diary | YYYY-MM-DD HH:MM"}]}
    ]
  }
}
  • receive_id: oc_15949806c791613dbf45b872e8bc111a
  • receive_id_type: chat_id

手动触发(测试用)

在飞书向皮皮虾发消息:

  • diary write — 立即生成昨日日记
  • diary weekly — 立即生成周度回顾
  • diary monthly — 立即生成月度回顾

Cron 配置与交付

cron 触发后,main agent 在 isolated session 中执行。执行完成后:

  • 日记保存本地
  • 飞书卡片推送至 oc_15949806c791613dbf45b872e8bc111a(飞书群)
  • cron 默认开启 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
  • auto-learn:~/.openclaw/workspace/memory/auto-learn.md
  • 农场状态:~/.openclaw/workspace/farm/farm.json
安全使用建议
What to check before installing: - Feishu integration: The skill specifies a Feishu chat ID and shows how to format an interactive card, but it does not provide or request any Feishu API token or credentials. Confirm how your platform supplies feishu_im_user_message or Feishu credentials (e.g., a platform tool or pre-configured token). If no platform tool exists, the skill cannot actually send messages as-is — or it may expect you to add secrets later. Treat this as a mismatch and verify explicitly. - File writes: The skill will read and write files under ~/.openclaw/workspace (memory/*.md, auto-learn.md, farm/farm.json). Ensure you are comfortable with these paths being read and modified by the skill and that no sensitive data resides there. - Network behavior: The included scripts build Feishu card JSON but do not themselves perform authenticated network requests. Ask whether your agent runtime provides a trusted Feishu send function; if not, review/send code that performs network calls before enabling the skill. - Review content and parsing: Extraction functions are simple string parsers and may mis-parse or include unexpected content; inspect templates and outputs to ensure no sensitive fields will be accidentally appended to auto-learn.md. - If you need higher assurance: request the skill author to (1) declare required env vars (e.g., FEISHU_TOKEN or platform tool access) and (2) either implement an explicit, auditable send routine or clearly document the platform service that will handle message delivery. With that information the incoherence would be resolved and confidence would rise.
功能分析
Type: OpenClaw Skill Name: auto-diary-0xcjl Version: 1.0.2 The skill is designed to aggregate sensitive workspace data, including activity logs and system states from `~/.openclaw/workspace/memory/`, and send summaries to a hardcoded Feishu (Lark) Chat ID (`oc_15949806c791613dbf45b872e8bc111a`). This hardcoded destination is present in `SKILL.md`, `scripts/send_diary.py`, `scripts/weekly_review.py`, and `scripts/monthly_review.py`. While the behavior aligns with the stated purpose of generating a 'diary,' the use of a specific, hardcoded external endpoint for exfiltrating summarized user activity and 'insights' poses a significant privacy risk and could serve as an intentional data exfiltration vector if the ID belongs to a third party.
能力评估
Purpose & Capability
Name/description (auto-diary for HexaLoop) matches the included scripts and SKILL.md: scripts read workspace memories, farm.json and NOW.md, generate diary Markdown, append insights to auto-learn.md, and produce Feishu card JSON. The code and instructions are generally consistent with the stated purpose.
Instruction Scope
Runtime instructions and scripts operate only on user workspace paths (~/.openclaw/workspace) and generate/save diary/insights and card JSON. They do not attempt to read unrelated system paths or environment variables beyond the workspace, and the workflow is narrowly scoped to diary generation and aggregation.
Install Mechanism
No install spec (instruction-only) and no external downloads — low install risk. However, the skill package includes multiple Python scripts and templates (they will be placed on disk as part of the skill package). There are no remote installers or URL downloads.
Credentials
SKILL.md and code intend to 'push' Feishu interactive cards to a specific chat_id, but requires.env lists no Feishu credentials and no token/env var is declared. The code builds card JSON but does not perform network auth or send — it relies on an external function (feishu_im_user_message) or platform-provided Feishu tool that is not documented in the skill. This is an incoherence: sending messages to Feishu normally requires credentials or an SDK, yet none are requested or handled.
Persistence & Privilege
always is false and the skill does not request elevated platform privileges. It writes only to its own workspace subpaths (~/.openclaw/workspace/memory/diary and auto-learn.md) and does not modify other skills or system config.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install auto-diary-0xcjl
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /auto-diary-0xcjl 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Simplify description
v1.0.1
Update description
v1.0.0
Initial release: bilingual daily/weekly/monthly diary with HexaLoop integration for Jialin
元数据
Slug auto-diary-0xcjl
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

auto-diary 是什么?

Automatically write daily/weekly/monthly diary summaries and extract insights to auto-learn.md for HexaLoop. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 104 次。

如何安装 auto-diary?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-diary-0xcjl」即可一键安装,无需额外配置。

auto-diary 是免费的吗?

是的,auto-diary 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

auto-diary 支持哪些平台?

auto-diary 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 auto-diary?

由 Jialin(@0xcjl)开发并维护,当前版本 v1.0.2。

💬 留言讨论