@stellarhold170nt

healthcheck

Track water and sleep with JSON file storage

当前版本
v1.0.2
9 2.2万总安装 1,098

name: healthcheck description: Track water and sleep with JSON file storage version: 1.0.2 tags: health, tracking

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

Security Scan

状态

suspicious

打开 VirusTotal

OpenClaw

gpt-5-mini

suspicious

OpenClaw 分析

Skill's stated purpose (local JSON health tracking) matches its instructions, but there are inconsistencies and a command-injection risk from the one-line node -e shells and an undeclared Node runtime requirement.

置信度: medium

VirusTotal

Type: OpenClaw Skill Name: healthcheck Version: 1.0.2 The skill is classified as suspicious due to the potential for prompt/command injection. The `SKILL.md` file instructs the AI agent to execute `node -e` commands that directly embed user input variables (`CUPS`, `NEW_CUPS`) into the JavaScript string. If the OpenClaw platform does not strictly sanitize these variables to numerical values, an attacker could inject arbitrary JavaScript code, leading to unauthorized execution. While there is no explicit malicious intent (like data exfiltration or persistence) within the provided code, this mechanism presents a significant security risk.

元数据

  • 作者: @stellarhold170nt
  • 创建时间: 2026/02/01
  • 更新时间: 2026/04/14
  • 版本数: 3
  • 评论数: 0
  • 扫描时间: 2026/02/11

运行要求

官方公开数据里暂未列出运行要求。

healthcheck | ClawHub 中文站