← 返回 Skills 市场
106
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hsyhp-healthcheck
功能描述
Track water and sleep with JSON file storage
使用说明 (SKILL.md)
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
安全使用建议
This skill appears to do what it says (store and read health records in a JSON file) and does not contact external services, but it is risky as written: the SKILL.md instructs running node -e one-liners with direct substitution of user-provided values (CUPS, NEW_CUPS). Before installing or enabling it, ensure the agent will (1) run these commands in a restricted/sandboxed working directory mapped from {baseDir}, (2) only substitute validated numeric values (e.g., parseInt/Number checks) rather than raw text, or better yet pass user values as safe arguments instead of embedding them into code strings, and (3) have Node.js available (declare node as a required binary). If you cannot guarantee input sanitization or sandboxing, avoid enabling this skill or request a safer implementation (small script file that accepts sanitized CLI args rather than executing interpolated -e code). Also consider file permissions and backups for the health-data.json file.
功能分析
Type: OpenClaw Skill
Name: hsyhp-healthcheck
Version: 1.0.0
The skill implements health tracking using Node.js one-liners in SKILL.md that directly embed user-provided values (e.g., 'CUPS') into shell-executed code. This pattern introduces a code injection vulnerability, as a malicious user could potentially provide input that executes arbitrary JavaScript or shell commands. While the logic is aligned with the stated purpose and no evidence of intentional malice or data exfiltration was found, the insecure handling of input templates is a high-risk vulnerability.
能力评估
Purpose & Capability
The described purpose (track water and sleep in a JSON file) matches the commands provided. However the SKILL.md uses Node.js one-liners but the skill metadata does not declare Node.js as a required binary — a minor incoherence that could cause failures or unexpected substitutions if the agent environment differs.
Instruction Scope
All instructions operate only on {baseDir}/health-data.json (no networking), which is appropriate. However the instructions tell the agent to replace placeholders (CUPS, NEW_CUPS) with user input directly inside node -e strings that are executed on the shell. If the agent substitutes raw user text there, a malicious or malformed input can inject arbitrary JavaScript (or break out into shell metacharacters) and execute with the agent's permissions. The SKILL.md provides no sanitization guidance or safe argument-passing pattern.
Install Mechanism
Instruction-only skill with no install steps or external downloads — low install risk.
Credentials
No environment variables, credentials, or config paths requested; access is limited to a single JSON file under {baseDir}, which is proportionate to the described task.
Persistence & Privilege
Does not request permanent/always-on presence, does not modify other skills or system-wide settings. Normal user-invocable skill behavior.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install hsyhp-healthcheck - 安装完成后,直接呼叫该 Skill 的名称或使用
/hsyhp-healthcheck触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of healthcheck skill for tracking water intake and sleep.
- Supports adding, updating, and deleting water intake records.
- Allows logging sleep and wake times.
- Provides simple statistics for daily water intake and overall records.
- Stores all data in a local JSON file with automatic file creation if missing.
- Uses only built-in Node.js modules; no external dependencies.
元数据
常见问题
Health Check 是什么?
Track water and sleep with JSON file storage. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 106 次。
如何安装 Health Check?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install hsyhp-healthcheck」即可一键安装,无需额外配置。
Health Check 是免费的吗?
是的,Health Check 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Health Check 支持哪些平台?
Health Check 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Health Check?
由 hsyhph(@hsyhph)开发并维护,当前版本 v1.0.0。
推荐 Skills