skillopt-sleep
Use when the user wants their Claude agent to self-improve from past usage, asks about a nightly/offline 'sleep' or 'dream' cycle, memory/skill consolidation, or says things like 'make my agent better the more I use it', 'review my past sessions', 'learn my preferences', 'consolidate what you learned', 'run the sleep cycle', or wants to schedule background self-optimization. Drives the skillopt_sleep engine: harvest past sessions -> mine recurring tasks -> replay through a selected backend -> consolidate validated CLAUDE.md/SKILL.md behind a held-out gate.
npx skills add microsoft/SkillOpt --skill skillopt-sleep --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# SkillOpt-Sleep: usage-driven self-evolution for a local Claude agent SkillOpt-Sleep gives the user's agent a **sleep cycle**. On demand or on a nightly schedule, it reviews real past Claude Code sessions, re-runs recurring tasks through the selected backend, and consolidates what it learns into **memory** (`CLAUDE.md`) and **skills** (`SKILL.md`). With the default validation gate enabled, it keeps only changes that improve a held-out score. Live files change only through explicit adoption or a user-requested `--auto-adopt`. It aims to improve this user's recurring work, while making each accepted proposal measurable on the run's held-out tasks, with no model-weight training. It is the deployment-time analogue of training: short-term experience → long-term competence. It synthesizes three ideas: - **SkillOpt** — the skill/memory doc is trainable text; bounded add/delete/replace edits; accepted only through a held-out gate; rejected edits are recorded in the run report for review. - **Claude Dreams** — consolidation that reads past sessions and proposes changes inside protected learned blocks; the input is never mutated, and output is reviewed before adoption. - **Agent sleep** — p
- When to use this skill
- The cycle (six stages)
- How to drive it
- Scheduling
- Common CLI flags
- Config keys (~/.skillopt-sleep/config.json)
- Memory consolidation
- Hard rules
- Validate / demo
deterministic synthetic demo (no API): score rises and the gate blocks a regression python -m skillopt_sleep.experiments.run_experiment --persona researcher --assert-improves python -m skillopt_sleep.experiments.run_experiment --persona programmer --assert-improves
What does the skillopt-sleep skill do?
Use when the user wants their Claude agent to self-improve from past usage, asks about a nightly/offline 'sleep' or 'dream' cycle, memory/skill consolidation, or says things like 'make my agent better the more I use it', 'review my past sessions', 'learn my preferences', 'consolidate what you learned', 'run the sleep cycle', or wants to schedule background self-optimization. Drives the skillopt_sleep engine: harvest past sessions -> mine recurring tasks -> replay through a selected backend -> consolidate validated CLAUDE.md/SKILL.md behind a held-out gate.
How do I install it?
Run `npx skills add microsoft/SkillOpt --skill skillopt-sleep --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From microsoft/SkillOpt, a repository with 15,586 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.