agentleFS
YunghoYungho/family-doctor/sleep-analyzer/SKILL.md

sleep-analyzer

Skill2 starsChanged 8 months agoMITView on GitHub

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.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use bed only for sleep and intimacy

    line 30
  2. Distinctive:

    If awake >20 min, get up and do quiet activity

    line 31
  3. Distinctive:

    No napping (or limit to 20 min before 3 PM)

    line 33
  4. Distinctive:

    Avoid blue light: Use night mode or filters

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

MetricGoodFairPoor
Duration7-9 hours6-7 or 9-10 hours<6 or >10 hours
Efficiency>85%75-85%<75%
Latency<20 min20-30 min>30 min
Wake After Sleep Onset<10 min10-30 min>30 min
Deep Sleep15-20%10-15%<10%
REM Sleep20-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 FactorHealth ImpactCorrelation
Sleep <6 hoursHypertensionr = +0.45
Sleep <6 hoursWeight gainr = +0.38
Sleep <6 hoursDepressionr = +0.52
Poor qualityDaytime fatiguer = +0.68
Sleep apneaCVD riskOR = 2.5

Output Example

# 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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.