Skill: jiajiaoy/daily-mindful (version 1.0.1)

--- name: daily-mindful description: "Daily mindfulness in 3–5 minutes — morning breathing exercise, guided meditation, and evening reflection prompt. Practical calm and stress relief for busy people." keywords: - 每日正念 - 冥想 - 正念 - 减压 - 呼吸练习 - 放松 - 焦虑 - 睡前放松 - 心灵鸡汤 - daily mindfulness - meditation - stress relief - breathing exercise - daily calm - relax - anxiety help - bedtime calm - mindfulness - inner peace - mental health metadata: openclaw: runtime: node: ">=18" --- # Daily Mindfulness / 每日正念 Generate a calming daily mindfulness experience with guided breathing, meditation prompts, and reflective content. ## Workflow 1. **Get today's date** — Use day of week for session type: - Mon: Setting intentions for the week (新周意念) - Tue: Gratitude practice (感恩练习) - Wed: Body scan meditation (身体扫描) - Thu: Breathing exercise (呼吸练习) - Fri: Letting go practice (放下练习) - Sat: Nature connection (自然连接) - Sun: Weekly reflection (周末回顾) 2. **Create content** — Write a short mindfulness guide (3-5 min read/practice), a daily affirmation, and a reflection prompt. All bilingual. 3. **Generate the visual** — Create a single-file HTML artifact with interactive breathing animation. ## Visual Design Requirements Create a serene, spa-like digital experience: - **Layout**: Single scrollable page with generous spacing. Minimal, airy, calming. - **Typography**: Elegant, gentle fonts (e.g., Cormorant, EB Garamond for headings; Karla or DM Sans for body). Light weight. Ample line spacing. - **Color scheme**: Ultra-calming — soft lavender + cream, or sage green + off-white, or dawn pink + soft gray. Absolutely no harsh or bright colors. Subtle gradient background. - **Sections**: 1. Today's theme (with date and a calming emoji like 🌿🕊️☁️) 2. Breathing exercise with INTERACTIVE animated circle (expands on inhale, contracts on exhale, with text guidance: "Breathe in... Hold... Breathe out..."). 4-7-8 or box breathing pattern. A start/stop button. 3. Guided mindfulness text (2-3 paragraphs, EN + CN) 4. Daily affirmation (one powerful sentence, beautifully styled) 5. Reflection prompt (a question to journal about) - **Animation**: Everything fades in very slowly (1.5s+). Breathing circle pulses with smooth CSS animation. Ambient floating dots or gentle wave animation in background. - **Optional**: Soft ambient sound toggle (use Web Audio API to generate a simple ambient tone/white noise). - **Ad-ready zone**: `<div id="ad-slot-bottom">` at the very bottom, well separated from content. - **Footer**: "Powered by ClawCode" ## Content Guidelines - Tone: Warm, gentle, non-religious, inclusive - Draw from diverse traditions: Buddhist mindfulness, Stoic philosophy, modern psychology - Avoid toxic positivity — acknowledge that hard days are OK - Chinese content should feel natural, not stiffly translated - Breathing exercises should have clear timing instructions ## Output Save as `/mnt/user-data/outputs/daily-mindful.html` and present to user. --- ## 推送管理 ```bash # 开启每日推送（早晚各一次） node scripts/push-toggle.js on <userId> # 自定义时间和渠道 node scripts/push-toggle.js on <userId> --morning 08:00 --evening 20: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 Mindful — Mindfulness & Meditation Skill

> Daily mindfulness meditation guide, breathing exercises, and reflection — calm and stress relief.

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

## What it does

Daily Mindful delivers a gentle daily practice of mindfulness — a guided breathing exercise, a short meditation prompt, and an evening reflection question to wind down. Designed for busy people who have 3–5 minutes, not 30.

**Morning** — breathing exercise + intention for the day  
**Evening** — reflection prompt + wind-down meditation  
**Techniques** — box breathing, body scan, visualization, gratitude  
**Stress relief** — practical tools for anxiety and overwhelm

## Installation

```bash
openclaw install daily-mindful
```

## Usage

```bash
openclaw run daily-mindful morning
openclaw run daily-mindful evening
```

## Keywords

mindfulness · meditation · stress relief · breathing exercise · anxiety · daily mindfulness · mental health · calm · 正念 · 冥想 · 减压 · 呼吸练习 · 放松 · 睡前放松

---

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


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');
const VOCAB_THEMES=["情感词汇", "科学词汇", "艺术文化", "商业词汇", "自然生态", "哲学词汇", "日常生活"];
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('❌ 无效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('❌ 非法路径');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 MONTHS_EN=['January','February','March','April','May','June','July','August','September','October','November','December'];
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 month_en=MONTHS_EN[now.getMonth()];
const tomorrow_weekday=WEEKDAYS[(wd+1)%7];
const vocab_theme=VOCAB_THEMES[wd];
const tomorrow_vocab_theme=VOCAB_THEMES[(wd+1)%7];
console.log(`晚安冥想时间🌙今天是${date}。请生成睡前正念引导：①身体扫描放松（从头到脚5步引导）②今日感恩练习（引导写出3件值得感恩的小事）③明日意念种下（一句积极意念）④4-4-6助眠呼吸引导。整体5-8分钟，语气极度舒缓。`);


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');
const VOCAB_THEMES=["情感词汇", "科学词汇", "艺术文化", "商业词汇", "自然生态", "哲学词汇", "日常生活"];
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('❌ 无效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('❌ 非法路径');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 MONTHS_EN=['January','February','March','April','May','June','July','August','September','October','November','December'];
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 month_en=MONTHS_EN[now.getMonth()];
const tomorrow_weekday=WEEKDAYS[(wd+1)%7];
const vocab_theme=VOCAB_THEMES[wd];
const tomorrow_vocab_theme=VOCAB_THEMES[(wd+1)%7];
console.log(`早安！今天是${weekday}（${date}）。请生成早间正念引导：①本周主题意念（周一新开始/周二感恩/周三专注/周四呼吸/周五放下/周六自然/周日回顾）②4-7-8呼吸练习引导③今日意念一句话（中英）④今日正念小提示1条。语气温柔平静。`);


path: scripts/push-toggle.js
content: #!/usr/bin/env node
'use strict';
const fs=require('fs'),path=require('path');
const SKILL='daily-mindful',DEFAULT_MORNING='07:30',DEFAULT_EVENING='21:30';
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('❌ 无效userId');process.exit(1);}return v;}
function sanitizeTime(v,l){if(!/^\d{1,2}:\d{2}$/.test(v)){console.error('❌ 无效'+l);process.exit(1);}const[h,m]=v.split(':').map(Number);if(h>23||m>59){console.error('❌ 无效'+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('❌ 非法路径');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('❌ 不支持渠道:'+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}`);
  const user=loadUser(userId);
  saveUser(userId,{...user,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('用法: 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('❌ 未知命令:'+cmd);process.exit(1);}


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