Skill: jiajiaoy/daily-reflect (version 1.0.3)

--- name: daily-reflect description: "Daily journaling prompts for meaningful reflection — morning intention-setting and evening review. Build a consistent self-reflection habit one prompt at a time." keywords: - 日记 - 写日记 - 今天写什么 - 每日日记 - 日记打卡 - 自我反思 - 情绪日记 - 成长日记 - 感恩日记 - 晨间日记 - 晚间日记 - 日记引导 - 五年日记 - 每日复盘 - journal - daily journal - journaling - writing prompt - morning journal - evening reflection - gratitude journal - self-reflection - mindfulness journal - bullet journal - diary - daily writing - mood journal - growth journal metadata: openclaw: runtime: node: ">=18" --- # 每日日记引导 > 每日日记引导 — 晨间写作 · 晚间反思 · 情绪觉察 · 习惯打卡 ## 何时使用 - 用户说"写日记""今天写什么""日记打卡" - 用户想做情绪记录、自我反思 - 用户说"journal""journaling""writing prompt" - 用户说"帮我复盘今天""今天有什么值得记录的" --- ## 推送管理 ```bash node scripts/push-toggle.js on <userId> node scripts/push-toggle.js on <userId> --morning 09:00 --evening 21:00 --channel feishu node scripts/push-toggle.js off <userId> node scripts/push-toggle.js status <userId> ``` 支持渠道：`telegram` / `feishu` / `slack` / `discord`

path: README.md
content: # Daily Reflect — Daily Journal Prompts Skill

> Morning writing prompts and evening reflections to build a daily journaling habit.

[![clawhub](https://img.shields.io/badge/clawhub-daily--reflect-blue)](https://clawhub.ai/skills/daily-reflect)
[![openclaw](https://img.shields.io/badge/openclaw-skill-orange)](https://openclaw.ai)

An [OpenClaw](https://openclaw.ai) skill that guides you through daily journaling — a morning writing prompt to set intentions, and an evening reflection to review your day. Designed to build a sustainable journaling habit with the highest user retention of any daily skill type.

---

## Features

- **Morning Prompts** — Theme-based writing guide (7 weekly themes: intention / gratitude / challenge / connection / weekly review / dreams / inner voice)
- **Evening Reflection** — 3-question daily review, emotion check-in, next-day intention
- **Streak Tracking** — Daily check-in motivation
- **Non-judgmental Tone** — Warm, open, inclusive writing guidance
- **Bilingual** — Chinese and English

---

## Daily Push Schedule

| Push | Time | Content |
|------|------|---------|
| Morning | 09:00 | Today's journal theme + 3 guiding questions + writing starter |
| Evening | 21:00 | Day review + emotion score + tomorrow's intention |

```bash
node scripts/push-toggle.js on <userId>
node scripts/push-toggle.js on <userId> --morning 09:00 --evening 21:00 --channel telegram
node scripts/push-toggle.js off <userId>
node scripts/push-toggle.js status <userId>
```

Supported channels: `telegram` / `feishu` / `slack` / `discord`

---

## Trigger Words

日记、写日记、今天写什么、每日日记、日记打卡、自我反思、情绪日记、每日复盘、journal、journaling、writing prompt、morning journal、evening reflection、gratitude journal、self-reflection

---

*MIT License · OpenClaw Skill*

## Keywords

daily journal · journaling · journal prompts · writing prompts · daily reflection · self-awareness · gratitude · 日记 · 写日记 · 每日日记 · 自我反思 · 日记打卡

---

Built for [OpenClaw](https://openclaw.ai) · Published on [clawhub.ai](https://clawhub.ai/skills/daily-reflect)


path: _meta.json
content: {
  "slug": "daily-reflect",
  "version": "1.0.0",
  "runtime": {
    "node": ">=18"
  },
  "ownerId": "kn79bebfnwg15sb0g7cj5z5nyd83gxh0"
}

path: package.json
content: {
  "name": "daily-journal",
  "version": "1.0.2",
  "description": "Daily journaling prompts for meaningful reflection — morning intention-setting and evening review. Build a consistent self-reflection habit one prompt at a time.",
  "engines": {
    "node": ">=18"
  },
  "license": "MIT"
}

path: scripts/evening-push.js
content: #!/usr/bin/env node
'use strict';
const fs=require('fs'),path=require('path');
const USERS_DIR=path.join(__dirname,'../data/users');
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('invalid userId');process.exit(1);}return v;}
function safeUserPath(u){const r=path.resolve(USERS_DIR,u+'.json');if(!r.startsWith(path.resolve(USERS_DIR)+path.sep)){console.error('illegal path');process.exit(1);}return r;}
function loadUser(u){const f=safeUserPath(u);return fs.existsSync(f)?JSON.parse(fs.readFileSync(f,'utf8')):{};}
const userId=sanitizeId(process.argv[2]||'default');
loadUser(userId);
const now=new Date();
const WEEKDAYS=['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
const wd=now.getDay();
const date=`${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-${String(now.getDate()).padStart(2,'0')}`;
const weekday=WEEKDAYS[wd];
const month=now.getMonth()+1;
const day=now.getDate();
const tomorrow_weekday=WEEKDAYS[(wd+1)%7];
console.log(`晚间日记时间🌙今天是${date}。请生成今晚的日记回顾引导：①今日复盘3问（今天发生了什么？有什么感受？有什么想法？）②情绪检测（引导用1-10分为今天打分并说明原因）③明日意图设定（引导写下明天最想完成的1件事）④今日金句（一句适合今晚心情的话，中英双语）。语气轻柔，像陪伴的老朋友。`);


path: scripts/morning-push.js
content: #!/usr/bin/env node
'use strict';
const fs=require('fs'),path=require('path');
const USERS_DIR=path.join(__dirname,'../data/users');
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('invalid userId');process.exit(1);}return v;}
function safeUserPath(u){const r=path.resolve(USERS_DIR,u+'.json');if(!r.startsWith(path.resolve(USERS_DIR)+path.sep)){console.error('illegal path');process.exit(1);}return r;}
function loadUser(u){const f=safeUserPath(u);return fs.existsSync(f)?JSON.parse(fs.readFileSync(f,'utf8')):{};}
const userId=sanitizeId(process.argv[2]||'default');
loadUser(userId);
const now=new Date();
const WEEKDAYS=['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
const wd=now.getDay();
const date=`${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-${String(now.getDate()).padStart(2,'0')}`;
const weekday=WEEKDAYS[wd];
const month=now.getMonth()+1;
const day=now.getDate();
const tomorrow_weekday=WEEKDAYS[(wd+1)%7];
console.log(`早安！今天是${weekday}（${date}）。请生成今日日记引导。主题按星期轮换：周一=新的开始与意图、周二=感恩与欣赏、周三=挑战与成长、周四=关系与连接、周五=本周收获复盘、周六=梦想与想象、周日=内心独白。输出：①今日日记主题（标题，中英双语）②引导问题3个（由浅入深）③今日写作提示（具体句子开头）④写作小技巧1条。语气温暖，不评判。`);


path: scripts/push-toggle.js
content: #!/usr/bin/env node
'use strict';
const fs=require('fs'),path=require('path');
const SKILL='daily-journal',DEFAULT_MORNING='09:00',DEFAULT_EVENING='21:00';
const USERS_DIR=path.join(__dirname,'../data/users');
const ALLOWED_CH=new Set(['telegram','feishu','slack','discord']);
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('invalid userId');process.exit(1);}return v;}
function sanitizeTime(v,l){if(!/^\d{1,2}:\d{2}$/.test(v)){console.error('invalid '+l);process.exit(1);}const[h,m]=v.split(':').map(Number);if(h>23||m>59){console.error('invalid '+l);process.exit(1);}return{h,m};}
function safeUserPath(u){const r=path.resolve(USERS_DIR,u+'.json');if(!r.startsWith(path.resolve(USERS_DIR)+path.sep)){console.error('illegal path');process.exit(1);}return r;}
function loadUser(u){const f=safeUserPath(u);return fs.existsSync(f)?JSON.parse(fs.readFileSync(f,'utf8')):{};}
function saveUser(u,d){fs.mkdirSync(USERS_DIR,{recursive:true});fs.writeFileSync(safeUserPath(u),JSON.stringify(d,null,2),'utf8');}
function enablePush(userId,opts){
  userId=sanitizeId(userId);
  const user=loadUser(userId);
  const mt=opts.morning||user.morningTime||DEFAULT_MORNING;
  const et=opts.evening||user.eveningTime||DEFAULT_EVENING;
  const{h:mh,m:mm}=sanitizeTime(mt,'--morning');
  const{h:eh,m:em}=sanitizeTime(et,'--evening');
  const ch=opts.channel||user.channel||'telegram';
  if(!ALLOWED_CH.has(ch)){console.error('unsupported channel:'+ch);process.exit(1);}
  const sk=`agent:main:${ch}:direct:${userId}`;
  console.log('__OPENCLAW_CRON_ADD__:'+JSON.stringify({name:`${SKILL}-morning-${userId}`,cronExpr:`${mm} ${mh} * * *`,tz:'Asia/Shanghai',session:'isolated',sessionKey:sk,channel:ch,to:userId,announce:true,timeoutSeconds:180,message:`node ${path.join(__dirname,'morning-push.js')} ${userId}`}));
  console.log('__OPENCLAW_CRON_ADD__:'+JSON.stringify({name:`${SKILL}-evening-${userId}`,cronExpr:`${em} ${eh} * * *`,tz:'Asia/Shanghai',session:'isolated',sessionKey:sk,channel:ch,to:userId,announce:true,timeoutSeconds:180,message:`node ${path.join(__dirname,'evening-push.js')} ${userId}`}));
  saveUser(userId,{...user,morningTime:mt,eveningTime:et,channel:ch,pushEnabled:true,updatedAt:new Date().toISOString()});
  console.log(`\n✅ ${SKILL} 推送已开启\n⏰ 早推: ${mt}  🌙 晚推: ${et}  📡 渠道: ${ch}\n关闭: node push-toggle.js off ${userId}`);
}
function disablePush(userId){
  userId=sanitizeId(userId);
  console.log(`__OPENCLAW_CRON_RM__:${SKILL}-morning-${userId}`);
  console.log(`__OPENCLAW_CRON_RM__:${SKILL}-evening-${userId}`);
  saveUser(userId,{...loadUser(userId),pushEnabled:false,updatedAt:new Date().toISOString()});
  console.log(`✅ ${SKILL} 推送已关闭`);
}
function showStatus(userId){
  userId=sanitizeId(userId);
  const u=loadUser(userId);
  console.log(`\n📡 ${SKILL} — ${userId}\n状态: ${u.pushEnabled?'✅ 开启':'❌ 关闭'}  早推: ${u.morningTime||DEFAULT_MORNING}  晚推: ${u.eveningTime||DEFAULT_EVENING}  渠道: ${u.channel||'telegram'}\n`);
}
if(require.main!==module)return;
const[cmd,uid,...rest]=process.argv.slice(2);
if(!cmd||!uid){console.log('Usage: node push-toggle.js on|off|status <userId>');process.exit(1);}
const opts={};
const mi=rest.indexOf('--morning');if(mi!==-1)opts.morning=rest[mi+1];
const ei=rest.indexOf('--evening');if(ei!==-1)opts.evening=rest[ei+1];
const ci=rest.indexOf('--channel');if(ci!==-1)opts.channel=rest[ci+1];
if(cmd==='on')enablePush(uid,opts);
else if(cmd==='off')disablePush(uid);
else if(cmd==='status')showStatus(uid);
else{console.error('unknown cmd:'+cmd);process.exit(1);}


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)