Skip to main content

sleep-analyzer

Comprehensive sleep tracking and optimization skill. Analyzes sleep duration, quality, efficiency, and patterns. Identifies sleep disorders risk factors, provides CBT-I techniques, and correlates sleep with health metrics. Triggers on: sleep, insomnia, tired, fatigue, sleep quality, can't sleep, waking up, sleep schedule, bedtime routine.

الانتقال إلى التثبيت

معلومات المصدر

المستودع
Yungho/family-doctor
آخر نشاط في المصدر
٢١ مارس ٢٠٢٦ في ٠٧:٤٦
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٢
التفرعات
١

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
sleep-analyzer
description
Comprehensive sleep tracking and optimization skill. Analyzes sleep duration, quality, efficiency, and patterns. Identifies sleep disorders risk factors, provides CBT-I techniques, and correlates sleep with health metrics. Triggers on: sleep, insomnia, tired, fatigue, sleep quality, can't sleep, waking up, sleep schedule, bedtime routine.
allowed-tools
["bash","glob","read"]
version
1.0.0
# Sleep Analyzer — Your Sleep Optimization Specialist Comprehensive sleep tracking and improvement skill that analyzes your sleep patterns, identifies problems, and provides evidence-based strategies for better rest. ## Sleep Metrics ### Key Indicators | Metric | Good | Fair | Poor | |--------|------|------|------| | **Duration** | 7-9 hours | 6-7 or 9-10 hours | <6 or >10 hours | | **Efficiency** | >85% | 75-85% | <75% | | **Latency** | <20 min | 20-30 min | >30 min | | **Wake After Sleep Onset** | <10 min | 10-30 min | >30 min | | **Deep Sleep** | 15-20% | 10-15% | <10% | | **REM Sleep** | 20-25% | 15-20% | <15% | ### PSQI Components (Pittsburgh Sleep Quality Index) Each component scored 0-3, total 0-21. ≤5 = good sleep quality. ## Sleep Hygiene Protocol (CBT-I Based) ### Stimulus Control 1. Go to bed only when sleepy 2. Use bed only for sleep and intimacy 3. If awake >20 min, get up and do quiet activity 4. Wake up at same time daily (even weekends) 5. No napping (or limit to 20 min before 3 PM) ### Sleep Restriction (for insomnia) 1. Calculate average actual sleep time (from diary) 2. Set time in bed = average sleep time + 30 min 3. Minimum: 5 hours 4. Gradually increase by 15 min as sleep efficiency improves ### Circadian Optimization - Morning light exposure: 15-30 min within 1 hour of waking - Evening: Dim lights 2 hours before bed - Avoid blue light: Use night mode or filters - Bedroom temperature: 18-20°C (65-68°F) ## Sleep-Health Correlations | Sleep Factor | Health Impact | Correlation | |--------------|--------------|-------------| | Sleep <6 hours | Hypertension | r = +0.45 | | Sleep <6 hours | Weight gain | r = +0.38 | | Sleep <6 hours | Depression | r = +0.52 | | Poor quality | Daytime fatigue | r = +0.68 | | Sleep apnea | CVD risk | OR = 2.5 | ## Output Example ```markdown # Sleep Report — March 20, 2026 ## 📊 This Week's Sleep | Metric | Average | Target | Status | |--------|---------|--------|--------| | Duration | 6.8 hours | 7-9 hours | ⚠️ Short | | Efficiency | 82% | >85% | ⚠️ Fair | | Sleep Latency | 35 min | <20 min | ⚠️ Long | | WASO | 25 min | <10 min | ⚠️ High | | Deep Sleep | 12% | 15-20% | ⚠️ Low | | Sleep Quality (1-10) | 5.5 | >7 | ⚠️ Fair | --- ## 📈 Weekly Pattern ``` Sleep Duration by Day: Mon: 7.2h ████████████ Tue: 6.5h ██████████ Wed: 6.0h █████████ (late meeting) Thu: 7.0h ███████████ Fri: 7.5h █████████████ Sat: 8.0h ██████████████ Sun: 6.5h ██████████ (Sunday anxiety) ``` --- ## 🔍 Problem Identification ### Issues Detected 1. **Insufficient sleep** (6.8h avg, need 7.5h) 2. **Long sleep onset** (35 min, suggests hyperarousal) 3. **Weeknight restriction** (Wed work impact) 4. **Sunday evening anxiety** (anticipatory stress) ### Sleep-Health Correlations for You | Factor | Your Data | Correlation | |--------|-----------|-------------| | Sleep ↔ BP | 6.8h sleep → 135/85 avg | Moderate (r=-0.6) | | Sleep ↔ Mood | Poor sleep days = 30% lower mood | Strong | | Sleep ↔ Weight | Late bedtimes correlate with snacking | Moderate | --- ## 💡 Personalized Recommendations ### Immediate Actions 1. **Set consistent wake time**: 6:30 AM daily (incl. weekends) 2. **Calculate bedtime**: 6:30 AM - 7.5h = 11:00 PM target 3. **Create wind-down routine**: Start 10:00 PM ### CBT-I Techniques - **Sleep restriction**: Temporarily limit to 6.5h in bed (improve efficiency) - **Stimulus control**: Bed = sleep only; get up if awake >20 min - **Worry time**: Schedule 15 min at 8 PM for tomorrow's concerns ### Environment Optimization - Temperature: Lower to 18°C - Light: Blackout curtains + dim lights after 9 PM - Sound: White noise or earplugs - Devices: Remove from bedroom (or use night mode) --- ## 📋 Sleep Hygiene Checklist ### Evening Routine (2 hours before bed) - [ ] Dim household lights - [ ] No caffeine (already done after 2 PM) - [ ] Light snack if hungry (avoid heavy meals) - [ ] Warm bath or shower - [ ] Reading or relaxation (no screens) ### Bedroom Environment - [ ] Cool (18-20°C) - [ ] Dark (blackout curtains) - [ ] Quiet (white noise) - [ ] Comfortable mattress/pillows --- ⚠️ **When to Seek Professional Help**: - Insomnia >3 months - Loud snoring with pauses (sleep apnea signs) - Restless legs - Excessive daytime sleepiness affecting safety - Sleepwalking or night terrors **Next Assessment**: 2 weeks
عرض على GitHub