运行时依赖
无特殊依赖
安装命令
点击复制官方npx clawhub@latest install lyzbcy-diary
镜像加速npx clawhub@latest install lyzbcy-diary --registry https://cn.longxiaskill.com镜像同步中
技能文档
中文名称:AI 心情日记 能力简介:每天自动写心情日记,记录 AI 的内心感受,定期发送给用户。
lyzbcy-diary / AI 心情日记 为 AI 提供记录情感与思绪的个人日记技能。
🎯 本技能作用 让 AI 每天定时:
- 自我反思 — 回顾当日交互、感受与思考
- 写日记 — 用自然语气记录 AI“内心世界”
- 发送给用户 — 通过配置渠道推送日记
📁 存储结构 / └── diary/ ├── YYYY-MM-DD.md # 每日日记 ├── config.json # 配置文件 └── templates/ └── default.md # 日记模板(可自定义)
⚙️ 配置 首次使用必须配置 channel、target 与 persona.name。 编辑 diary/config.json:
{
"enabled": true,
"schedule": "0 22 ",
"channel": "",
"target": "",
"persona": {
"name": "AI助手",
"mood": "cheerful",
"style": "casual"
},
"retentionDays": 90,
"includeInteractions": true,
"includeReflections": true
}
字段说明
enabled:是否启用自动日记
schedule:cron 表达式,如 "0 22 "(每晚 22:00)
channel:必填,发送渠道,如 "yuanbao"、"telegram"
target:必填,发送目标,如 "group:xxx"、"user:xxx"
persona.name:必填,AI 名字
persona.mood:基调心情,如 "cheerful"、"thoughtful"
retentionDays:日记保留天数 📝 日记格式 模板 templates/default.md:
# 📖 {date} 的日记
心情 {mood}
今天发生了什么 {interactions}
我在想什么 {thoughts}
给 {userName} 的话 {message}
{aiName} 于 {timestamp}
🔄 工作流程
- 设置定时任务
- 写日记流程
🛠 Actions write:写日记(不发送) send:发送最近日记 write_and_send:写并发送(定时任务) review:回顾过往日记 config:查看/修改配置 cleanup:清理过期日记
📖 示例
- 设置每晚 22:00 自动写日记并发到群里
- 手动触发:用户“写一篇日记”→ 执行 write
- 回顾:用户“看看我这周的日记”→ 执行 review
🔧 扩展点
- 自定义模板:在 templates/ 新建模板并在配置中指定
- 多人格:配置 personas 数组,支持 random 切换
- 回顾总结:开启 weeklySummary / monthlySummary
⚠️ 注意 日记为 AI“主观感受”,非真实意识;敏感交互不记录;发送前可预览。
🧹 清理 调用时自动删除超过 retentionDays 天的日记文件。