sleep-tracker

sleep-tracker is a skill for Codex from JuneYaooo/mediwise-health-suite. It costs 131 tokens per session (1,008 once invoked), scanned A, original, MIT.

A sleep-tracking and sleep-quality record for personal use. It records sleep duration and stages such as deep sleep, light sleep, REM, and awake time, then shows scores and trends; the scores are not medical judgments.

In plain words
What is it for?
Manually logging sleep, viewing a day's details, and reviewing a seven-day trend. It can also use sleep data synchronized from wearable devices.
Why use it?
It keeps nightly sleep information in one place and makes differences from built-in reference ranges easier to review. It does not provide treatment or improvement advice.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Manually logging sleep, viewing a day's details, and reviewing a seven-day trend. It can also use sleep data synchronized from wearable devices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/juneyaooo/mediwise-health-suite/sleep-tracker
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JuneYaooo/mediwise-health-suite --skill sleep-tracker
Clone the repo
git clone --depth 1 https://github.com/JuneYaooo/mediwise-health-suite

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sleep-tracker

README.md
[![agentmods](https://agentmods.dev/badge/skills/juneyaooo/mediwise-health-suite/sleep-tracker/github.svg)](https://agentmods.dev/skills/juneyaooo/mediwise-health-suite/sleep-tracker)
Your own site
<a href="https://agentmods.dev/skills/juneyaooo/mediwise-health-suite/sleep-tracker"><img src="https://agentmods.dev/badge/skills/juneyaooo/mediwise-health-suite/sleep-tracker/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sleep-tracker

Your own site · 80×15
<a href="https://agentmods.dev/skills/juneyaooo/mediwise-health-suite/sleep-tracker"><img src="https://agentmods.dev/badge/skills/juneyaooo/mediwise-health-suite/sleep-tracker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,008 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.01008
Opus 5 $0.00066 $0.00504
Sonnet 5 $0.00026 $0.00202
Haiku 4.5 $0.00013 $0.00101

Measured 11d ago against content hash 9d3c8ed753e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

sleep-tracker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (index.js, scripts/sleep.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sleep-tracker/SKILL.md · 102 lines

What it actually says

MediWise · 睡眠追踪 Skill

记录和汇总睡眠数据,展示睡眠规律和与内置参考值的差异。评分只用于记录展示,不是医学判断,也不提供改善或治疗建议。

睡眠质量评分标准

评分 标签 说明
85-100 高匹配 与内置参考值匹配较多
70-84 较高匹配 与内置参考值存在少量差异
55-69 部分匹配 与内置参考值存在多项差异
0-54 低匹配 与内置参考值差异较多

内置展示参考值(不用于医学判断):

  • 总时长:7-9 小时
  • 深睡比例:13-23%
  • REM 比例:20-25%
  • 清醒时间:<10%

核心工作流

当前公开版本只用于个人本地档案。身份隔离由安装时的个人模式和 action 适配层处理,不向普通用户暴露或索取 owner_id

1. 手动录入睡眠

用户说「昨晚睡了7小时」「记录睡眠」时使用:

# 录入总时长(最简方式,其他阶段留空)
python3 {baseDir}/scripts/sleep.py log --member-id <id> --duration 420

# 带阶段详情录入
python3 {baseDir}/scripts/sleep.py log --member-id <id> --duration 480 \
  --deep 90 --light 240 --rem 100 --awake 30

# 指定日期(默认昨天)
python3 {baseDir}/scripts/sleep.py log --member-id <id> --duration 450 --date 2026-03-26

时长换算提示:

  • 用户说「7小时」→ duration=420
  • 用户说「7.5小时」→ duration=450
  • 用户说「7小时30分」→ duration=450

2. 查看每日睡眠

用户说「昨晚睡得怎么样」「查看睡眠」时使用:

# 查看昨晚(默认)
python3 {baseDir}/scripts/sleep.py daily --member-id <id>

# 查看指定日期
python3 {baseDir}/scripts/sleep.py daily --member-id <id> --date 2026-03-26

3. 每周睡眠趋势

用户说「这周睡眠怎么样」「睡眠趋势」时使用:

# 近7天(默认)
python3 {baseDir}/scripts/sleep.py weekly --member-id <id>

# 近14天
python3 {baseDir}/scripts/sleep.py weekly --member-id <id> --days 14

4. 历史记录

# 最近14条(默认)
python3 {baseDir}/scripts/sleep.py list --member-id <id>

# 最近30条
python3 {baseDir}/scripts/sleep.py list --member-id <id> --limit 30

数据来源

睡眠数据来自两个渠道:

  1. 手动录入:通过 sleep-log action 直接输入
  2. 可穿戴同步:通过 wearable-sync 从 Apple Health / Gadgetbridge 自动导入

两种来源均存储在 health_metrics 表(metric_type='sleep'),查询时统一处理。

反模式

  • 不要重复录入同一天 — 系统会显示多条,建议先 daily 确认再录入
  • 阶段时长之和不能超过总时长 — 否则录入报错
  • 手动录入不需要精确到分钟 — 大致时长即可,质量评分有容忍范围
Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 102 lines · 131 tokens per session scan A 9d3c8ed753e9

Subscribe to this mod's changes

sleep-tracker is a skill published in the GitHub repository JuneYaooo/mediwise-health-suite (28 stars, last pushed 1mo ago), licensed MIT. It adds 131 tokens to every session and 1,008 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.