Sleep Tracker logo

Sleep Tracker

Community
JuneYaooo
sleep-tracker

睡眠追踪与质量分析。记录每晚睡眠时长和各阶段(深睡/浅睡/REM/清醒), 评估睡眠质量评分,查看每日详情和每周趋势。支持手动录入和可穿戴设备自动同步。 Sleep tracking and quality analysis. Records nightly sleep duration and stages (deep/light/REM/awake), scores sleep quality, and shows daily details and weekly trends. 关键词:睡眠记录、睡眠质量、深睡、REM、睡眠趋势、睡眠分析、失眠、睡了多久、昨晚睡眠。

Overview

PublisherJuneYaooo
Repositorymediwise-health-suite
Skill namesleep-tracker
Stars
37
Forks
4
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by JuneYaooo on GitHub. Read the source before you install it.

Installation

Install the Sleep Tracker AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/JuneYaooo/mediwise-health-suite/tree/main/sleep-tracker
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/JuneYaooo/mediwise-health-suite.git /tmp/mediwise-health-suite
mkdir -p .claude/skills
cp -r /tmp/mediwise-health-suite/sleep-tracker .claude/skills/sleep-tracker
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sleep Tracker in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sleep Tracker on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sleep Tracker is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

MediWise · 睡眠追踪 Skill

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

睡眠质量评分标准

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

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

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

核心工作流

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

1. 手动录入睡眠

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

bash
# 录入总时长(最简方式,其他阶段留空)
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. 查看每日睡眠

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

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

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

3. 每周睡眠趋势

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

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

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

4. 历史记录

bash
# 最近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 确认再录入
  • 阶段时长之和不能超过总时长 — 否则录入报错
  • 手动录入不需要精确到分钟 — 大致时长即可,质量评分有容忍范围

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Sleep Tracker AI skill do?

睡眠追踪与质量分析。记录每晚睡眠时长和各阶段(深睡/浅睡/REM/清醒), 评估睡眠质量评分,查看每日详情和每周趋势。支持手动录入和可穿戴设备自动同步。 Sleep tracking and quality analysis. Records nightly sleep duration and stages (deep/light/REM/awake), scores sleep quality, and shows daily details and weekly trends. 关键词:睡眠记录、睡眠质量、深睡、REM、睡眠趋势、睡眠分析、失眠、睡了多久、昨晚睡眠。

Why use Sleep Tracker on TypingMind?

Because you install it once and use it with any model. Sleep Tracker is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sleep Tracker in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/JuneYaooo/mediwise-health-suite/tree/main/sleep-tracker. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Sleep Tracker?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sleep Tracker?

As many as you like. As long as a model supports skills, you can use Sleep Tracker with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sleep Tracker AI skill free?

Yes. It is published on GitHub by JuneYaooo under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇