sleep-optimizer
Skill1 starsChanged 38 days agoMITView on GitHub
Builds a personalized sleep protocol - a fixed wake time held within 30 minutes daily, a chronotype-aligned sleep window, a light-exposure plan, environment settings, evening input rules, and a scripted wind-down routine - from a baseline assessment. Use when someone says "I can't fall asleep", "I wake up at 3am every night", "fix my sleep schedule", or "I'm exhausted no matter how long I sleep". General wellness education, not medical advice - snoring with gasping, suspected apnea, or chronic insomnia route to a physician or sleep specialist. Do NOT use when racing thoughts and daytime stress are the primary complaint - use stress-management instead; for the broader multi-pillar health routine, use longevity-protocol.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- SkillMedev/health-and-longevityword for word, first seen Oct 5, 2026
Other versions1 project uses a version of this.
Word for word · 1
- SkillMedev/health-and-longevity★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- decision-makingSkill
- deep-work-plannerSkill
- goals-accountabilitySkill
- habit-builderSkill
- journal-frameworkSkill
- second-brainSkill
- stress-managementSkill
- study-systemSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Distinctive: line 83
Do not anchor the protocol on bedtime.
- Distinctive: line 84
Do not allow weekend wake times to float "as recovery" - the Monday cost is a self-inflicted timezone shift.
- Distinctive: line 85
Do not change multiple variables per review cycle.
- Distinctive: line 86
Do not prescribe lying in bed trying harder.
- Distinctive: line 87
Do not recommend melatonin dosing, sleeping medication, or supplement stacks - that is a physician conversation.
- Distinctive: line 88
Do not treat stress-driven rumination with sleep hygiene alone.
≈ “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.
Files
Sleep Optimizer
Most people try to fix sleep from the wrong end - chasing an earlier bedtime with willpower while their wake time drifts by hours across the week. Wake-time consistency is the single strongest lever, and everything else in the protocol hangs off it. This skill builds a complete protocol: fixed wake time, light plan, environment, input rules, and a scripted wind-down - then changes one variable at a time so the user can tell what worked.
Operating procedure
Steps run in this order because the wake anchor must exist before the bedtime, light plan, and wind-down can be scheduled against it.
Step 1: Assess the baseline
Collect: typical bedtime and wake time, weekday versus weekend (the gap between them is the social-jetlag number to shrink); time to fall asleep and number of night wakings; caffeine dose and timing, alcohol frequency, and evening screen habits; energy dips and peaks across the day; work constraints (fixed start time, shift work); and bed partner factors (snoring, different schedules). Screen the red flags in Escalation before optimizing anything - protocol work cannot fix apnea.
Step 2: Identify chronotype
Classify as early (lark), intermediate, or late (owl) from the natural wake time on unconstrained days. Align the target schedule with the chronotype where life allows rather than forcing an unnatural one - a forced 5am schedule on a strong owl fails within weeks. Label the classification a guess if the user has no unconstrained days to judge from.
Step 3: Fix the wake time and derive the bedtime
Pick one wake time and hold it every day including weekends, within ±30 minutes - this consistency window is the non-negotiable core of the protocol. Count back 7.5-9 hours to set the target bedtime. If the current schedule is far off, shift in 15-30 minute steps every few days rather than one heroic jump.
Step 4: Build the light plan
Morning: 10-30 minutes of bright, preferably outdoor light within an hour of waking to anchor the circadian clock (through a window is a weak substitute; overcast outdoor light still works). Evening: dim household lights and cut blue-heavy screens 1-2 hours before bed. Bedroom: fully dark - blackout curtains or an eye mask.
Step 5: Set the environment
Temperature 16-19 °C (60-67 °F) - cool wins. Noise controlled with earplugs or steady white noise. The bed is for sleep only: no work, no scrolling; the association between bed and wakefulness is what conditioning-based insomnia is made of.
Step 6: Tune the inputs
Caffeine: none within 8-10 hours of bedtime (its half-life is long - a 3pm coffee is still half-active at 9pm). Alcohol: fragments the second half of the night; keep it modest and away from bedtime. Large meals: finished 2-3 hours before bed. Exercise: strongly pro-sleep, but schedule vigorous sessions earlier in the day.
Step 7: Script the wind-down routine
A 30-60 minute buffer of low-stimulation activities that becomes the cue for sleep. Script it concretely with times, not as a vague intention - see the worked artifact.
Step 8: Install the wakefulness rule and nap policy
Awake in bed more than ~20 minutes: get up, do something calm in dim light, return when sleepy. No clock-watching - turn the clock face away; checking the time raises arousal. Naps: only if nighttime sleep is intact, 10-20 minutes, early afternoon only.
Step 9: Review at 2 weeks
Compare sleep latency, night wakings, and morning energy against baseline. Adjust exactly one variable at a time - changing three things at once makes the protocol unfalsifiable. Improvement typically shows in 1-2 weeks of consistent wake times; no improvement after 4 weeks of genuine adherence is an escalation trigger.
Worked artifact
Example: intermediate chronotype, 8:00 work start, current weekend drift of 2.5 hours.
SLEEP PROTOCOL - [name]
Wake time: 6:45 every day, +/-30 min max (weekends included)
Bedtime: 10:45 (8h window) - shift from current 12:30 in 30-min steps
Morning: coffee on the balcony 7:00-7:20 (light + caffeine together)
Caffeine: last cup 12:45pm (10h before bed)
Evening: dinner by 8:00 / lights dimmed + screens off 9:30
Bedroom: 18C, blackout curtains, phone charges in kitchen, clock turned away
WIND-DOWN (10:00-10:45)
10:00 screens off, tomorrow's top-3 jotted down (closes open loops)
10:10 warm shower
10:25 paper book on the couch, lamp only
10:45 lights out
If awake >20 min: up, armchair + dim lamp, back when sleepy.
Review Sun evening, week 2: latency __ min / wakings __ / AM energy 1-10 __
Change ONE variable next cycle: ______Deliverable
Produce a one-page protocol containing: the fixed wake time with its ±30 minute rule, target bedtime with the shift plan if needed, the morning and evening light plan, the environment checklist (temperature, dark, noise, bed-for-sleep-only), the evening input rules with their hour cutoffs, the scripted timed wind-down, the 20-minute wakefulness rule and nap policy, and the 2-week review with the one-variable rule.
Do NOT
- Do not anchor the protocol on bedtime; bedtime follows sleepiness, wake time drives the clock.
- Do not allow weekend wake times to float "as recovery" - the Monday cost is a self-inflicted timezone shift.
- Do not change multiple variables per review cycle; the protocol stops being diagnostic.
- Do not prescribe lying in bed trying harder; past 20 minutes that trains the bed-wakefulness association.
- Do not recommend melatonin dosing, sleeping medication, or supplement stacks - that is a physician conversation.
- Do not treat stress-driven rumination with sleep hygiene alone; when racing thoughts are the driver, pair with stress-management.
Quality bar
The protocol ships when: the wake time is a single clock time with the ±30 minute rule stated; every input rule carries its hour cutoff (caffeine 8-10h, meals 2-3h, screens 1-2h); the wind-down is scripted with actual times, not adjectives; the red-flag screen was run and documented; and the review names the date, the metrics, and the one variable eligible to change.
Escalation
This is general wellness education, not medical advice - a licensed physician or sleep specialist owns anything clinical. Refer promptly, before or alongside protocol work, for: loud snoring with gasping, choking, or witnessed breathing pauses (apnea signs - protocol work will not fix a mechanical airway problem); severe daytime sleepiness such as dozing while driving; insomnia persisting 3+ months despite consistent protocol adherence (CBT-I with a specialist is the evidence-based treatment); restless legs or acting out dreams; or shift-work schedules causing serious impairment. Route neighbors: stress-management when daytime stress drives night rumination, longevity-protocol for the full health routine this protocol slots into.
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
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.

