Skip to content

SkillOpt Sleep Self-Improvement

Lets Claude Code review past sessions overnight and propose improvements to its CLAUDE.md and skills.

Stars
18,813
Licence
MIT
Files
1 file

What it does

This skill gives Claude Code a 'sleep cycle': on demand or on a nightly schedule, it reads your recent Claude Code session logs, re-runs recurring tasks, and drafts proposed edits to your CLAUDE.md memory file and your SKILL.md skill files. Each proposed change is tested against a held-out set of tasks, and only changes that score better are staged. Nothing live is changed until you explicitly adopt the staged proposal, which creates a backup first.

Great for

  • Developers who repeatedly use Claude Code on the same kinds of tasks and want its instructions to improve over time
  • Users who want a reviewable, measurable way to consolidate preferences into CLAUDE.md
  • People comfortable running shell scripts and reviewing diffs before adopting changes

Skip it if

  • Users with sensitive or confidential sessions when using a real model backend (claude, codex, copilot, azure_openai), since truncated transcript and task content is sent to that provider
  • Anyone expecting guaranteed improvement: the skill itself notes that held-out gains are run-specific evidence, not a guarantee
  • Users who do not want a cron entry installed in their system

Try asking

  • “Run the sleep cycle for this project and show me what changed in the staged proposal”
  • “Review my past sessions from the last 72 hours and learn my preferences into CLAUDE.md”
  • “Do a dry-run preview of the sleep cycle without staging anything”
  • “Schedule a nightly self-optimization run at 3:17 am for this project”
Step-by-step guide: how to use SkillOpt Sleep Self-ImprovementInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    skillopt-sleep.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip skillopt-sleep.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip skillopt-sleep.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Start with the default mock backend and dry-run to see how the plumbing works before spending any API budget
  • Review report.md and the proposed files in .skillopt-sleep/staging/ before running adopt
  • Use --preferences or the preferences config key to state house rules explicitly

What's inside

  • SKILL.md

Redistributed unmodified from microsoft/SkillOpt under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.