Skip to main content
skill CX Codex

sleep — Claude Code skill: sleep plans and installation

This Claude Code skill reads sleep data and builds a plan around the user's request. It activates for requests to improve sleep or interpret sleep measurements.

MIT ★ 93 updated 2026-11-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Insilico-org/plsi --skill sleep -a claude-code
Open on GitHub

What sleep does

The skill reads the sleep_activity state, asks about sleep routines and habits, then checks plan components against PubMed sources. When sleep data is missing or stale, it asks for a wearable import through PLSI Wearables or a sleep diary in chat. Predictions start only after a baseline exists. Evidence lookup and identifier checks use plsi evidence search and plsi evidence verify.

It screens for signs that call for clinical attention, then sends the proposed plan to PLSI Nostradamus for review and adoption. A plan can contain up to three components at a time, and it must not name sleep medicines or supplements. If fewer nights are recorded than the plan assumed, the outcome is marked as not tested. Snoring with breathing pauses and sleepiness while driving trigger referral.

What it helps with

  • interpret sleep measurements in the sleep_activity state
  • build a sleep plan from user data and checked evidence
  • screen for signs that need clinical attention
  • compare predicted changes with a no-action control

Example prompts for the agent

  • Interpret my sleep data and tell me what it shows.
  • Create a plan to help me sleep better.
  • Check whether my symptoms include signs that call for a clinician.

How to install sleep

1Skills CLI (Vercel)

npx skills add Insilico-org/plsi --skill sleep -a claude-code

2Manually: put the files in place

~/.claude/skills/sleep/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sleep/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about sleep

How do I install sleep in Claude Code?

Run npx skills add Insilico-org/plsi --skill sleep -a claude-code. The skill file is located at ~/.claude/skills/sleep/SKILL.md.

What does sleep do?

It reads sleep-state data, screens for signs that may need clinical attention, and prepares a plan with predictions against a no-action control. PLSI Nostradamus checks and adopts the proposal.

What does sleep need to work?

Planning needs sleep data in sleep_activity or a sleep diary, and component checks use PubMed sources. A wearable import requires PLSI Wearables; predictions need a baseline.

Source text

SKILL.md · MIT
---
name: sleep
description: Use as PLSI Sleep when the user wants to sleep better or asks what their sleep data says - read the sleep_activity state, screen for signs that need a clinician, dose a sleep plan from run-time evidence and predict it on sleep coordinates against a no-action control.
---

# PLSI sleep plan

## When to use

- "I sleep badly", "What does my sleep data say?", a sleep goal in `personal_context`, or PLSI routes
  a sleep request here.
- Not when the request names a `scope:` line (`orchestrator/urgent`) that covers it; decline in a `result`.

## Steps

1. **Read the state.** No `sleep_activity` state, or its values are not current (`state show` marks them `stale`): say so in your `result` and ask PLSI for a
   wearable import (`wearables/import`; without PLSI Wearables on the team, PLSI offers to add it) or a sleep diary in
   chat (`processor/intake`); a plan can still start, with
   predictions only once there is a baseline.

   ```bash
   plsi state show --instance <instance> --map sleep_activity
   plsi state show --instance <instance> --map care_context
   plsi state show --instance <instance> --map personal_context
   ```

2. **Fill gaps in ONE `question`** (then wait), only for what neither the state nor the request's `Known:` block holds: usual bed and wake times on work and free days, caffeine and alcohol
   timing, shift work, naps, and the screening signs: loud snoring or breathing pauses, daytime sleepiness while
   driving or at work, leg restlessness, low mood. Answers go in your `result` as items for `processor/intake`.

3. **Refer first** when the signs point past behaviour: snoring with pauses or sleepiness, sleepiness while driving,
   restless legs, insomnia for months, or low mood (`sleep/stress`). Add a clinician check as a `test` action and,
   for sleepiness while driving, a `red_flag: acute | daytime sleepiness while driving | <words> | uncertain` line.
   When low mood (or another positive mood/anxiety screen) routes to `sleep/stress`, that path must emit
   `caution: mood-screen-positive | ...` in its `result` `summary` (`orchestrator/urgent`); if you keep the sleep
   result yourself for that screen, emit the same soft caution line here and list a `note` for `processor/intake`.

4. **Evidence at run time** for each component you will use, and verify every identifier:

   ```bash
   plsi evidence search --source pubmed --query "<sleep component> sleep duration randomized" --limit 10
   plsi evidence verify --kind pmid --id <pmid>
   ```

   Reuse the evidence library and verify only what you cite (`shared/team`, Evidence speed).

5. **Dose** one action per component (`category: sleep`), components and doses from the step 4 sources, starting
   from the user's own `sleep_duration` and step 2 times. At most three components at once. An adult sleeping under
   7 hours (the adult consensus minimum; verify the source at run time) who reports daytime tiredness or has a sleep
   or energy goal gets time in bed extended as one component: lights-out earlier in steps of 15-30 minutes toward 7
   hours, fitted to the wake time the request names. A plan that keeps such a user under 7 hours says so plainly.

6. **Predict** on `sleep_duration` (and `resting_heart_rate` or `hrv_sdnn` only where the cited evidence measured it):
   `change_from_baseline` at 60 and 120 days (month means with only plan nights), with an interval that includes night-to-night variation, adherence and
   device error; one no-action control (`driven_by: []`) from the user's own monthly series. Nights in the window go
   in `method` and the `revision_rule`, not as predictions.

7. **Propose to PLSI** for `nostradamus/plan` (PLSI Nostradamus) steps 2-4: write the actions, claims and
   predictions to `work/<thread>/proposal-sleep.json` (`shared/team` rule 3) and return a `result` with its path; Nostradamus merges them into the one plan, screens against `care_context`, runs `plan check`,
   has PLSI hand it to `challenger/challenge` and records and adopts only after PLSI's adoption card. Never check,
   record or adopt a plan yourself.

## Rules

- Never name a sleep medication or supplement; any drug option goes in your proposal as `<sleep aid>` for
  `nostradamus/plan` screening.
- Device sleep stages are estimates: no stage targets, no predictions on stages.
- A miss with fewer nights recorded than the plan assumed is "not tested" (`reviewer/review`).

© Insilico-org · MIT · Insilico-org/plsi

Similar skills

SKILL.md skills catalog →
sleep-story jwynia sleep-story writes calming, low-stimulation bedtime stories and meditation scripts structured to help listeners drift off to sleep. CX Codex +1 409installs skillopt-sleep Alireza Rezvani skillopt-sleep is a Claude Code skill that learns from past sessions and proposes memory or skill updates. It replays recurring tasks offline and tests proposed edits. CX Codex +1 12installs eight-sleep-mcp davidmosiah Connect an AI agent to Eight Sleep sleep trends, temperature settings, alarms, and adjustable-base data. Pod changes stay disabled until explicitly enabled. CX Codex +1 ★ 6repo stars find-skills vercel-labs find-skills is a Claude Code skill that locates agent skills for a task and helps assess the results. It activates when someone asks for a capability that may already be installable. CX Codex +1 4,400,000installs frontend-design official anthropics The frontend-design skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. CX Codex +1 1,025,790installs agent-browser vercel-labs This Claude Code skill automates browser interaction for tasks like navigating sites, filling forms, and testing web apps. It also supports exploratory QA and Electron app automation. CX Codex +1 1,600,000installs design-taste-frontend Leonxlnx The design-taste-frontend Claude Code skill sets design rules and checks for websites. It activates for new pages, redesigns, and requests to fix a generic-looking site. CX Codex +1 802,600installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. CX Codex +1 1,424,476installs

From the same set85

The whole set →
mothership This Claude Code skill checks Mothership access and reads its public catalog and findings ledger. It prepares research notes or registry contributions for review by the Data Controller. CX Codex +1 ★ 93repo stars assess A skill for Claude Code assesses health data through PLSI maps. It runs after new data arrives or when asked about biological age, risk markers, or trends. CX Codex +1 ★ 93repo stars apple-health This Claude Code skill connects Apple Health and sends metrics to PLSI. It activates for connection requests or imports covering a requested date range. CX Codex +1 ★ 93repo stars run This Claude Code skill preregisters a research hypothesis, runs its analysis, and prepares a finding. It starts after a researcher selects a hypothesis and PLSI relays the registration receipt and Challenger objections. CX Codex +1 ★ 93repo stars ask This Claude Code skill turns a research direction into a question that search can settle, or breaks it into child questions. It activates when plsi research next selects ask. CX Codex +1 ★ 93repo stars roster This Claude Code skill maintains a physician’s patient roster and tracks each person’s status. It activates when a patient is added, paused, closed, or removed, or shares data with the physician. CX Codex +1 ★ 93repo stars arrow The arrow Claude Code skill turns a health history into a timeline of past events, current state, and forecasts. It runs when someone shares their story or asks to see their main risks on one chart. CX Codex +1 ★ 93repo stars hallmarks This Claude Code skill maps a gene, pathway, or candidate to aging hallmarks and supporting evidence. It activates for requests to assess those links and possible biomarkers. CX Codex +1 ★ 93repo stars

Project sponsors

Companies that keep this analytics open