Install
openclaw skills install @harrylabsj/habits-trackerTrack habits, routines, streaks, completions, reminders, and weekly progress with a local Node.js CLI. Use when the user wants to build a daily habit system, log habit completions, review consistency, recover from broken streaks, generate reports, or set up cron reminders.
openclaw skills install @harrylabsj/habits-trackerUser input: "I want to track my daily reading habit — read for 30 minutes every evening"
Expected output: The skill provides the exact CLI command (node scripts/habit-cli.js add "Read 30 minutes" --frequency daily --target 1 --reminder "21:00"), explains what it records, and suggests a realistic starting target.
User input: "How did I do on my habits this week?" Expected output: The skill generates a progress report with visual progress bars, completion rates, current streaks, and a summary of missed days for each tracked habit.
User input: "I missed three days of exercise this week, what should I do?" Expected output: A recovery plan: log the missed days, temporarily lower the weekly target, and suggests shrinking the habit size rather than adding more reminders if the completion rate is below 50%.
User input: "我经常一忙就忘记喝水,每天喝不到两杯水,想养成多喝水的习惯,怎么做?" Expected output: 设计喝水习惯追踪方案:1)设置每小时闹钟或智能手表提醒;2)使用带刻度的水杯(如500ml瓶装水,目标每天4瓶);3)在工位显眼位置贴便签提醒;4)使用'小日常'/HabitNow等App做打卡记录。进阶技巧:每次上厕所后回来必喝一口水(形成习惯叠加),用柠檬片/茶包增加喝水乐趣。设定前两周目标:每天1.5L,达标奖励周末一杯奶茶。
node scripts/habit-cli.js add "Read 30 minutes" --frequency daily --target 1 --reminder "21:00"
node scripts/habit-cli.js log "Read 30 minutes" --note "Finished chapter 5"
node scripts/habit-cli.js stats "Read 30 minutes" --days 30
When a user asks for habit advice, first decide whether they need:
The habit tracker is available as a Node.js CLI tool. No dependencies required.
node scripts/habit-cli.js add "Exercise" --frequency daily --target 1 --reminder "08:00"
Options:
--frequency: daily, weekly, or monthly (default: daily)--target: completions per period (default: 1)--reminder: time in HH:MM format--description: habit descriptionnode scripts/habit-cli.js list
node scripts/habit-cli.js log "Exercise" --count 1 --note "Morning run"
Options:
--count: number of completions (default: 1)--date: YYYY-MM-DD format (default: today)--note: optional notenode scripts/habit-cli.js logs "Exercise" --days 7
node scripts/habit-cli.js stats "Exercise" --days 30
Shows:
node scripts/habit-cli.js report --days 7
Displays visual progress bars and summary for all habits.
node scripts/habit-cli.js edit "Exercise" --target 2 --reminder "07:00"
node scripts/habit-cli.js delete "Exercise"
node scripts/habit-cli.js reminder
Habits and logs are stored in ~/.config/habit-tracker/:
habits.json: Habit definitionslogs.json: Completion logsFor natural-language requests, return:
Add to crontab for hourly reminder checks:
0 * * * * node /path/to/habit-tracker/scripts/habit-cli.js reminder
0 21 * * * node /path/to/habit-tracker/scripts/habit-cli.js report --days 1
This skill can be triggered by:
Track a new habit:
habit add "Read 30 minutes" --frequency daily --target 1 --reminder "21:00"
habit log "Read 30 minutes" --note "Finished chapter 5"
Weekly habit with multiple targets:
habit add "Meditate" --frequency weekly --target 5
habit log "Meditate" --count 1
View progress:
habit stats --days 30
habit report --days 7