← 返回 Skills 市场
loutai0307-prog

Sleep Tracker

作者 loutai0307-prog · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
81
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install bytesagain-sleep-tracker
功能描述
睡眠改善工具。睡眠分析、改善建议、作息规划、睡眠环境优化、小睡指南、睡眠日记。Sleep tracker with analysis, improvement tips, schedule planning, environment optimization, nap guide.
使用说明 (SKILL.md)

sleep-tracker

Health and wellness tracker for logging daily activities, tracking streaks, viewing statistics, setting reminders and goals, and getting health tips. A versatile CLI tool for building and maintaining healthy habits.

Commands

Command Description
sleep-tracker log \x3Centry> Log a new entry with today's date
sleep-tracker today Show all entries logged today
sleep-tracker streak Check your current streak of consecutive days
sleep-tracker stats Show total number of entries in the data log
sleep-tracker reminder \x3Ctask> [time] Set a reminder for a task (default time: 8:00)
sleep-tracker tips Get health tips (hydration, movement, sleep)
sleep-tracker goal \x3Cgoal> [frequency] Set a goal with optional frequency (default: daily)
sleep-tracker history View the last 14 entries from the data log
sleep-tracker export Export all data to stdout
sleep-tracker reset Reset tracker (requires --confirm flag to actually clear data)
sleep-tracker help Show help message with all available commands
sleep-tracker version Show version number

How It Works

sleep-tracker manages a simple text-based data log (data.log) where each entry is automatically stamped with the current date. It provides a lightweight way to track health activities, build streaks, and review your history.

Daily Workflow

  1. Log activities: Record what you did — exercise, meals, sleep times, etc.
  2. Check today: Review everything logged today with sleep-tracker today
  3. Track progress: Use streak to see consecutive days and stats for totals
  4. Set goals and reminders: Keep yourself accountable with goal and reminder
  5. Review history: Look at the last 2 weeks with history

Data Storage

All data is stored in $SLEEP_TRACKER_DIR or defaults to ~/.local/share/sleep-tracker/. The directory contains:

  • data.log — main data file with date-stamped entries
  • history.log — timestamped log of all commands executed for auditing

The tool automatically creates the data directory on first run. You can override the storage location by setting the SLEEP_TRACKER_DIR environment variable.

Requirements

  • Shell: Bash 4+
  • No external dependencies — uses only standard Unix utilities (date, grep, wc, tail, cat)
  • Works on: Linux, macOS, any POSIX-compatible system

When to Use

  1. Daily health logging — Run sleep-tracker log "8h sleep, felt rested" each morning to build a habit history
  2. Tracking exercise streaks — Log workouts daily and check sleep-tracker streak to stay motivated with consecutive-day tracking
  3. Setting health reminders — Use sleep-tracker reminder "drink water" 14:00 to record reminder notes for key health tasks
  4. Reviewing weekly patterns — Run sleep-tracker history to see the last 14 entries and spot trends in your health data
  5. Exporting data for analysis — Use sleep-tracker export > health-data.txt to get all records into a file for spreadsheet analysis or sharing with a health professional

Examples

# Log a sleep entry
sleep-tracker log "Slept 7.5 hours, quality 4/5"

# Log exercise
sleep-tracker log "30 min jog, 5km"

# Log meals
sleep-tracker log "Healthy breakfast: oatmeal, fruit, coffee"

# Check what you logged today
sleep-tracker today

# View your streak
sleep-tracker streak

# Get overall statistics
sleep-tracker stats

# Set a daily water reminder
sleep-tracker reminder "drink 2L water" 10:00

# Set a fitness goal
sleep-tracker goal "run 5km" weekly

# Get health tips
sleep-tracker tips

# View the last 14 entries
sleep-tracker history

# Export all data to a file
sleep-tracker export > my-health-log.txt

# Reset (dry run — shows instructions)
sleep-tracker reset

Health Tips (Built-in)

The tips command provides three core health reminders:

  1. Stay hydrated — drink water throughout the day
  2. Move every hour — take short breaks from sitting
  3. Sleep 7-8 hours — prioritize consistent rest

Configuration

Set the SLEEP_TRACKER_DIR environment variable to change the data directory:

export SLEEP_TRACKER_DIR="$HOME/my-health-data"

Default location: ~/.local/share/sleep-tracker/

Output

All output goes to stdout in plain text. Use shell redirection to save results:

sleep-tracker history > weekly-review.txt
sleep-tracker export | grep "2024-03"

Powered by BytesAgain | bytesagain.com | [email protected]

安全使用建议
The package appears coherent and mostly local: it stores logs in ~/.local/share/sleep-tracker (or SLEEP_TRACKER_DIR) and /tmp, and uses plain Bash. Before installing or running: 1) Inspect the full scripts locally (the provided sleep.sh was truncated in the listing) to confirm there are no network calls, credential reads, or commands like curl/wget/ssh/exfiltration. 2) Be aware your entries and command history are stored in plain text (data.log, history.log, /tmp/sleep_journal.txt) — avoid putting secrets there or set SLEEP_TRACKER_DIR to an encrypted/controlled location. 3) Run first in a sandboxed environment if you want to be extra cautious. 4) If you plan to export or share data, remember exports go to stdout and could leak sensitive notes. If you can provide the full sleep.sh content I can re-evaluate and raise confidence.
功能分析
Type: OpenClaw Skill Name: bytesagain-sleep-tracker Version: 1.0.0 The skill bundle provides a legitimate health and sleep tracking utility consisting of two bash scripts (scripts/script.sh and scripts/sleep.sh). The scripts implement basic logging, statistics, and sleep analysis logic using standard Unix utilities, with data stored locally in the user's data directory or /tmp. No evidence of data exfiltration, malicious execution, or prompt injection was found, and the code behavior aligns perfectly with the documentation in SKILL.md.
能力评估
Purpose & Capability
Name/description (sleep tracking, tips, journaling) aligns with included CLI design and two Bash scripts. The scripts implement logging, tips, analysis, reminders, export and history — all consistent with the stated purpose. No unrelated cloud or remote-service credentials are requested.
Instruction Scope
SKILL.md instructs only local CLI use and optionally reading SLEEP_TRACKER_DIR. The scripts create and write to a local data directory (~/.local/share/sleep-tracker or XDG_DATA_HOME override) and /tmp/sleep_journal.txt, and log command history. That is expected, but storing user text (notes, journal entries) to plain text files means sensitive content could be written to disk. I could not review the entire body of scripts because the provided sleep.sh content in the listing is truncated; the visible portions show no network calls, but the unseen tail could change that.
Install Mechanism
No install spec is provided (instruction-only install) — lowest risk for remote code fetch. The package simply includes Bash scripts. No downloads from arbitrary URLs or package manager installs are declared.
Credentials
No required environment variables or credentials are declared. The skill optionally respects SLEEP_TRACKER_DIR/XDG_DATA_HOME for storage location — reasonable for a CLI data-writing tool. No other env vars are accessed in SKILL.md or the visible script excerpts.
Persistence & Privilege
always is false and the skill does not request elevated or persistent platform privileges. It writes to its own data directory and /tmp; it does not appear to modify other skills or global agent configuration based on the visible content.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bytesagain-sleep-tracker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bytesagain-sleep-tracker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Restored with improvements
元数据
Slug bytesagain-sleep-tracker
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Sleep Tracker 是什么?

睡眠改善工具。睡眠分析、改善建议、作息规划、睡眠环境优化、小睡指南、睡眠日记。Sleep tracker with analysis, improvement tips, schedule planning, environment optimization, nap guide. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 81 次。

如何安装 Sleep Tracker?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bytesagain-sleep-tracker」即可一键安装,无需额外配置。

Sleep Tracker 是免费的吗?

是的,Sleep Tracker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Sleep Tracker 支持哪些平台?

Sleep Tracker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Sleep Tracker?

由 loutai0307-prog(@loutai0307-prog)开发并维护,当前版本 v1.0.0。

💬 留言讨论