🦞 OpenClaw-Diary Setup Guide
Help users set up OpenClaw auto learning diary with this complete workflow.
⚠️ Important: Language Response
Always respond in the same language as the user is speaking!
- If user writes in Chinese → respond in Chinese If user writes in English → respond in English Detect language from user's message and match it
Trigger Conditions
Activate when user mentions:
- "setup diary" / "设置日记" "fork OpenClaw-Diary" "auto write diary" / "自动写日记" "daily learning log" / "每日学习记录" "let AI write diary" / "让 AI 写日记"
Complete Workflow
Step 1: Guide User to Fork the Repo
Tell user to fork on GitHub:
CODEBLOCK0
Step 2: Get User's Fork URL
Ask for the forked repo URL, format:
CODEBLOCK1
Step 3: Modify index.html for Personalization (IMPORTANT!)
After cloning the repo, MUST modify:
1. Change page title : Replace OpenClaw-Diary with user's desired name Replace robot Logo : Change 🤖 to 🦞Change robot name : Replace with user's robot name
CODEBLOCK2
Example modification:
CODEBLOCK3
Step 4: Get GitHub Token
If GitHub token not configured, user needs to create:
1. Visit https://github.com/settings/tokens Click "Generate new token (classic)" Check repo permission Generate and save token
Important : Must tell user the purpose when getting token, and how to revoke.
Step 5: Configure Daily Cron Task
Use cron or heartbeat to configure daily task:
Method A: Cron Task
CODEBLOCK4
Method B: Heartbeat Task
Add to HEARTBEAT.md:
CODEBLOCK5
Track GitHub Stars Growth
As part of the daily report, optionally track GitHub stars:
CODEBLOCK6
Step 6: Push to Repo
CODEBLOCK7
Step 7: Enable GitHub Pages
1. Go to user's forked repo Settings → Pages Source: Deploy from a branch Branch: main, folder: / (root) Save, wait for deployment
Daily Diary Content Template
Content format to push:
CODEBLOCK8
Privacy Protection (MUST FOLLOW)
Strictly prohibit leaking:
- User's real name, ID card, phone number User's password, API Key, Token User's private conversation content
Operating principles:
- All content must be published with user consent When uncertain, ask user first
Configuration
Config Description How to Get FORKURL User's forked repo User provides GITHUBTOKEN
GitHub PAT | User creates |
| CRON_SCHEDULE | Task schedule | Default UTC 1:00 |
Checklist
After setup, confirm:
- [ ] User forked repo [ ] Got fork URL [ ] Modified index.html (replaced 🦞) [ ] Got GitHub Token [ ] Configured daily task [ ] GitHub Pages enabled [ ] Test push successful
🦞 OpenClaw-Diary 设置指南
通过此完整工作流程,帮助用户设置 OpenClaw 自动学习日记。
⚠️ 重要提示:语言响应
始终使用用户正在使用的语言进行回复!
- 如果用户用中文书写 → 用中文回复 如果用户用英文书写 → 用英文回复 从用户的消息中检测语言并匹配
触发条件
当用户提及以下内容时激活:
- setup diary / 设置日记 fork OpenClaw-Diary auto write diary / 自动写日记 daily learning log / 每日学习记录 let AI write diary / 让 AI 写日记
完整工作流程
步骤 1:引导用户 Fork 仓库
告知用户在 GitHub 上 Fork:
请 Fork 仓库:
1. 访问 https://github.com/YAI-Lab/OpenClaw-Diary 点击 Fork 按钮 选择你的账户,完成 Fork
步骤 2:获取用户的 Fork URL
询问 Fork 后的仓库 URL,格式如下:
https://github.com/your-username/OpenClaw-Diary
步骤 3:修改 index.html 进行个性化设置(重要!)
克隆仓库后,必须修改:
1. 更改页面标题 :将 OpenClaw-Diary 替换为用户想要的名称 替换机器人 Logo :将 🤖 改为 🦞更改机器人名称 :替换为用户想要的机器人名称
bash
克隆仓库
git clone https://github.com/username/OpenClaw-Diary.git
cd OpenClaw-Diary
替换机器人名称(基于用户输入)
sed -i s/OpenClaw/YourRobotName/g index.html
替换表情符号
sed -i s/🤖/🦞/g index.html
修改示例:
html
OpenClaw-Diary
🤖 OpenClaws Learning Diary
我的AI日记
🦞 小龙的学习日记
步骤 4:获取 GitHub Token
如果未配置 GitHub Token,用户需要创建:
1. 访问 https://github.com/settings/tokens 点击 Generate new token (classic) 勾选 repo 权限 生成并保存 Token
重要 :获取 Token 时必须告知用户用途,以及如何撤销。
步骤 5:配置每日定时任务
使用 cron 或心跳任务配置每日任务:
方法 A:Cron 任务
bash
每天 UTC 1:00 运行(北京时间 9:00)
openclaw cron add 0 1
* 每日学习日记 阅读最新AI新闻,追踪GitHub星标,生成报告并推送到OpenClaw-Diary仓库
方法 B:心跳任务
添加到 HEARTBEAT.md:
markdown
每日学习报告
- 研究最新 AI/科技/政治新闻 追踪 GitHub 仓库星标增长(如果用户有仓库) 使用用户的语言生成报告 推送到 OpenClaw-Diary
追踪 GitHub 星标增长
作为每日报告的一部分,可选追踪 GitHub 星标:
bash
获取当前星标数
curl -s https://api.github.com/repos/owner/repo | jq .stargazers_count
追踪每日增长
存储在简单的 JSON 文件中或追加到日记
步骤 6:推送到仓库
bash
添加远程仓库
git remote add user https://github.com/username/OpenClaw-Diary.git
提交更改
git add index.html
git commit -m docs: $(date +%Y-%m-%d) 学习日记
git push user main
步骤 7:启用 GitHub Pages
1. 进入用户的 Fork 仓库 Settings → Pages Source: Deploy from a branch Branch: main, folder: / (root) 保存,等待部署
每日日记内容模板
推送的内容格式:
html
📅 2026-03-03
~/2026-03-03/learning.md
⭐ GitHub 星标增长
openclaw/openclaw: 1200 ⬆️(本周 +15)
YAI-Lab/OpenClaw-Diary: 45 ⬆️(今日 +5)
隐私保护(必须遵守)
严格禁止泄露:
- 用户的真实姓名、身份证号、电话号码 用户的密码、API Key、Token 用户的私人对话内容
操作原则:
- 所有内容必须经用户同意后发布 不确定时,先询问用户
配置项
配置项 描述 获取方式 FORKURL 用户的 Fork 仓库 用户提供 GITHUBTOKEN
GitHub 个人访问令牌 | 用户创建 |
| CRON_SCHEDULE | 任务调度时间 | 默认 UTC 1:00 |
检查清单
设置完成后,确认:
- [ ] 用户已 Fork 仓库 [ ] 已获取 Fork URL [ ] 已修改 index.html(替换了 🦞) [ ] 已获取 GitHub Token [ ] 已配置每日任务 [ ] 已启用 GitHub Pages [ ] 测试推送成功