healthcheck

Track water and sleep with JSON file storage

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "healthcheck" with this command: npx skills add roseknife520/healthcheck-rose

Health Tracker

Simple tracking for water intake and sleep using JSON file.

Data Format

File: {baseDir}/health-data.json

{
  "water": [{"time": "ISO8601", "cups": 2}],
  "sleep": [{"time": "ISO8601", "action": "sleep|wake"}]
}

Add Water Record

When user says "uống X cốc" or "uống nước X cốc":

node -e "const fs=require('fs');const f='{baseDir}/health-data.json';let d={water:[],sleep:[]};try{d=JSON.parse(fs.readFileSync(f))}catch(e){}d.water.push({time:new Date().toISOString(),cups:CUPS});fs.writeFileSync(f,JSON.stringify(d));console.log('Da ghi: '+CUPS+' coc')"

Replace CUPS with number from user input.

Add Sleep Record

When user says "đi ngủ":

node -e "const fs=require('fs');const f='{baseDir}/health-data.json';let d={water:[],sleep:[]};try{d=JSON.parse(fs.readFileSync(f))}catch(e){}d.sleep.push({time:new Date().toISOString(),action:'sleep'});fs.writeFileSync(f,JSON.stringify(d));console.log('Da ghi: di ngu')"

Add Wake Record

When user says "thức dậy" or "dậy rồi":

node -e "const fs=require('fs');const f='{baseDir}/health-data.json';let d={water:[],sleep:[]};try{d=JSON.parse(fs.readFileSync(f))}catch(e){}const last=d.sleep.filter(s=>s.action==='sleep').pop();d.sleep.push({time:new Date().toISOString(),action:'wake'});fs.writeFileSync(f,JSON.stringify(d));if(last){const h=((new Date()-new Date(last.time))/3600000).toFixed(1);console.log('Da ngu: '+h+' gio')}else{console.log('Da ghi: thuc day')}"

View Stats

When user says "thống kê" or "xem thống kê":

node -e "const fs=require('fs');const f='{baseDir}/health-data.json';let d={water:[],sleep:[]};try{d=JSON.parse(fs.readFileSync(f))}catch(e){}console.log('Water:',d.water.length,'records');console.log('Sleep:',d.sleep.length,'records');const today=d.water.filter(w=>new Date(w.time).toDateString()===new Date().toDateString());console.log('Today:',today.reduce((s,w)=>s+w.cups,0),'cups')"

Update Record

To update last water entry:

node -e "const fs=require('fs');const f='{baseDir}/health-data.json';let d=JSON.parse(fs.readFileSync(f));d.water[d.water.length-1].cups=NEW_CUPS;fs.writeFileSync(f,JSON.stringify(d));console.log('Updated')"

Delete Record

To delete last water entry:

node -e "const fs=require('fs');const f='{baseDir}/health-data.json';let d=JSON.parse(fs.readFileSync(f));d.water.pop();fs.writeFileSync(f,JSON.stringify(d));console.log('Deleted')"

Notes

  • Uses Node.js built-in modules only
  • File auto-created if missing
  • All timestamps in ISO8601 format

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Diet Tracker

Tracks daily diet and calculates nutrition information to help achieve weight loss goals. Use when user provides meal information, asks about calorie intake,...

Registry SourceRecently Updated
2.8K5Profile unavailable
General

dialysis-assistant

自动记录和分析透析上下机体重、血压及脱水量,提供趋势、警告和个性化饮水建议。

Registry SourceRecently Updated
850Profile unavailable
Research

Floreo

Floreo - Autonomous compounding journal with local storage and open connections. Auto-detects activities, tracks compound metrics (streaks, trends, velocity)...

Registry SourceRecently Updated
760Profile unavailable
Research

Supplement Research

Evidence-based supplement intelligence powered by the SupStack database (220 supplements, 7,780+ studies, 21 health goals). Use when the user asks about supp...

Registry Source
1560Profile unavailable