Sleep Analyzer logo

Sleep Analyzer

Visit

Claude Code skill from WellAlly Health that tracks sleep duration, efficiency, and schedule, scores PSQI and STOP-BANG, and flags insomnia and apnea risk.

Share:
View alternatives

Sleep Analyzer

Sleep Analyzer is a Claude Code skill from WellAlly Health (formerly Claude-Ally-Health), an MIT-licensed, local-first personal health record project maintained by WellAlly Tech. You log each night with the /sleep command (bedtime, wake time, quality, awakenings) and can add standard questionnaires. The skill then shows how your sleep is trending, what is affecting it, and which patterns are worth raising with a doctor.

Not a sleep diagnosis. The skill cannot diagnose insomnia or sleep apnea, prescribe sleep medication, or replace sleep medicine. It recommends seeing a doctor when insomnia lasts more than three months, when the STOP-BANG score is 3 or higher, or when daytime sleepiness affects safety.

What it analyzes

  • Trends. Sleep duration, sleep efficiency, bedtime and wake time, a schedule consistency score, and weekday versus weekend differences ("social jetlag").
  • Quality. PSQI score over time, your own quality ratings, night awakenings, sleep stages if you record them from a tracker, and how rested you feel.
  • Problem patterns. Trouble falling asleep (over 30 minutes), trouble staying asleep (more than two awakenings or over 30 minutes awake), early waking, and mixed patterns; apnea risk from the STOP-BANG questionnaire; irregular schedules; and sleep debt.
  • Correlations with exercise timing and intensity, caffeine and alcohol, mood, and chronic conditions such as blood pressure and blood glucose, using the project's other trackers.
  • Suggestions as a prioritized sleep hygiene plan with long-term goals.

How to use it

WellAlly Health is a Claude Code project, not a standalone package. Clone it and start Claude Code in the folder:

git clone https://github.com/huifer/WellAlly-health.git
cd WellAlly-health
claude

The /sleep command supports record, history, stats, psqi, epworth, isi, problem, hygiene, and recommendations. Examples from the upstream docs:

/sleep record 23:00 07:00 good
/sleep record bedtime 23:00 onset 23:30 wake 07:00 outbed 07:15
/sleep record 23:00 07:00 fair 2 awakenings
/sleep history last 30 days
/sleep psqi

epworth and isi record the Epworth Sleepiness Scale and the Insomnia Severity Index.

Output

A sleep report covering duration, efficiency, regularity, quality distribution, awakenings, PSQI trend, insomnia and apnea screening results, correlations, key insights, and an action plan ordered by priority.

Limitations

  • Most inputs are self-reported. Sleep stage figures are only as accurate as the device you copy them from.
  • Screening questionnaires estimate risk; only a sleep study and a clinician can diagnose a sleep disorder.

FAQ

Do I need a sleep tracker? No. Bedtime, wake time, and a quality rating are enough for trends. Tracker data adds stage information.

Does my data leave my machine? Records are stored as local files. The analysis runs through Claude Code, so the content you ask about is sent to the model Claude Code uses.

Alternatives

Browse more in the skills category or the health tag.

Comments

No comments yet. Be the first to comment!