sleep-protocol
Skill1 starsChanged 7 months agoMITView on GitHub
Huberman-style sleep diagnostic and fix plan. 10 variables that most determine sleep quality. Run when you've had a bad week of sleep or whenever you want a tune-up.
In this repository34 other files it gives its agents.
- accountability-mirrorSkill
- annual-physicalSkill
- bills-and-subsSkill
- brotherhoodSkill
- conscious-spendingSkill
- date-nightSkill
- decision-journalSkill
- discomfort-doseSkill
- emotion-coachSkill
- enough-checkSkill
- errand-batchSkill
- evening-examenSkill
- father-reviewSkill
- friend-reach-outSkill
- gratitudeSkill
- hard-conversationSkill
- home-maintenanceSkill
- kid-oneononeSkill
- love-map-refreshSkill
- mentor-touchSkill
- money-dateSkill
- morning-resetSkill
- parent-checkinSkill
- partner-checkinSkill
- partner-reviewSkill
- repairSkill
- resetSkill
- screwupSkill
- shutdown-ritualSkill
- training-planSkill
- values-checkSkill
- virtue-reviewSkill
- weekly-reviewSkill
- weekly-serviceSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
If you are sleeping poorly, no amount of discipline, productivity hack, or supplement will compensate.
- Distinctive: line 17
Do you get 2-10 minutes of direct outdoor light, eyes open (no sunglasses), within 60 minutes of waking?
- Distinctive: line 27
When is your last caffeine?
- Distinctive: line 50
Do you have a 30-60 minute transition between "day" and "sleep"?
- Distinctive: line 58
Cool down the room before bed: If you can't run AC all night, at least have the room chilled when you get in.
- Distinctive: line 59
Apnea screening: If you snore, wake unrefreshed despite adequate hours, or your partner says you stop breathing: get tested.
- Distinctive: line 63
Ask: which of the 10 are you getting right?
- Distinctive: line 70
No alcohol within 3 hours of bed.
- Distinctive: line 87
Ask the user: "Which three are you committing to this week?"
- Very specific: line 89
Put them in ~/adulting-data/journal/sleep-log.md:
- Distinctive: line 119
If after 4 weeks of honest compliance with the protocol, sleep is still poor:
- Distinctive: line 122
Consider CBT-I (cognitive behavioral therapy for insomnia).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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-protocol
Sleep is not a nice-to-have. It is the foundation everything else sits on.
If you are sleeping poorly, no amount of discipline, productivity hack, or supplement will compensate. And most sleep problems in adults without a clinical disorder are caused by the same 10 inputs. You can fix most of them this week.
The diagnostic
Walk through these with the user. Honest answers only.
1. Morning sunlight
Do you get 2-10 minutes of direct outdoor light, eyes open (no sunglasses), within 60 minutes of waking?
This is the #1 intervention. It sets the 24-hour melatonin cycle that governs everything downstream. On cloudy days, double the duration.
2. Consistent wake time
Are you waking within 30 minutes of the same time, seven days a week?
Sleeping in on weekends is called "social jet lag." It is real and it degrades Monday-Thursday sleep.
3. Caffeine cutoff
When is your last caffeine? Huberman's protocol: nothing after 90 minutes before the midpoint of your day, practically this means no caffeine after ~2 p.m. for most people. Certainly nothing after 4 p.m.
4. Alcohol
Are you drinking within 3 hours of bed? Alcohol fragments sleep architecture. You will fall asleep faster and wake in the 2-4 a.m. window with cortisol spiked. Whoever told you a nightcap helps was wrong.
5. Bedroom temperature
Is the room 65-68°F / 18-20°C at sleep time? You need to DROP about 2°F to fall and stay asleep. A warm room wakes you at 3 a.m. without your knowing why.
6. Darkness
Is the room truly dark? Blackout curtains? LEDs covered? Phone face-down?
Any light on the retina, including through closed eyelids, suppresses melatonin. Light-blocking is not optional.
7. Screens 60 minutes before bed
Are you scrolling until lights-out? Blue light matters some, but the bigger issue is the content. Stimulating content activates the same stress systems that keep you awake.
8. Eating schedule
Last meal — how close to bedtime? A full stomach, especially with high-glycemic carbs, disrupts deep sleep. Aim for 3 hours before bed as a minimum.
9. Exercise timing
Are you doing intense cardio within 2 hours of bed? It raises core temperature at exactly the wrong time. Strength training is more forgiving. Morning or early afternoon exercise is ideal.
10. Wind-down ritual
Do you have a 30-60 minute transition between "day" and "sleep"? Same routine nightly — tooth brushing, shower, reading, low light. Your nervous system needs a trail of cues.
Bonus: more subtle inputs
- Naps. Short (<30 min) naps before 3 p.m. are fine. Long naps or late naps destroy the sleep drive.
- Hydration. Too much water in the evening = bathroom wake-ups. Front-load hydration early in the day.
- Magnesium glycinate or threonate. 200-400 mg about an hour before bed. Most people are deficient and this helps many.
- Hot shower 60 min before bed. Paradoxical but works: the vasodilation drops core temp afterwards.
- Cool down the room before bed. If you can't run AC all night, at least have the room chilled when you get in.
- Apnea screening. If you snore, wake unrefreshed despite adequate hours, or your partner says you stop breathing: get tested. Apnea is massively underdiagnosed and has severe long-term consequences.
Diagnose the pattern
Ask: which of the 10 are you getting right? Which are you getting wrong?
Prioritize fixes by expected ROI:
High-ROI fixes
- Morning sunlight.
- Consistent wake time.
- No alcohol within 3 hours of bed.
- Cold, dark room.
Medium-ROI fixes
- Caffeine cutoff at 2 p.m.
- Screens off 30-60 min before bed.
- Last meal 3 hours before bed.
Lower-ROI, but add if the above are fixed
- Wind-down ritual.
- Exercise timing.
- Magnesium supplementation.
Action plan
Pick the top 3 fixes. One per week. Do not try all 10 at once; you will change nothing.
Ask the user: "Which three are you committing to this week?"
Put them in ~/adulting-data/journal/sleep-log.md:
# Sleep protocol — <date>
## Audit
Sunlight: <Y/N>
Wake time: <Y/N — range>
Caffeine cutoff: <Y/N — when>
Alcohol: <Y/N — timing>
Bedroom temp: <°>
Darkness: <Y/N>
Screens off 60m: <Y/N>
Last meal: <time>
Exercise timing: <morning|afternoon|evening>
Wind-down: <Y/N>
## This week's fixes
1. <...>
2. <...>
3. <...>
## Outcome (review in 1 week)
Wake feel: <rating 1-10>
Energy 2pm: <rating 1-10>
Night wakings: <count>When to get help
If after 4 weeks of honest compliance with the protocol, sleep is still poor:
- Get an apnea screening.
- Rule out thyroid, ferritin, B12 issues (request labs).
- Consider CBT-I (cognitive behavioral therapy for insomnia). Evidence > Ambien.
- Talk to a sleep doc.
Sleep is the foundation. Get it right.
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.

