Tooluck logoTooluck
SKILL.md

skillopt-sleep

Agent skill frommicrosoft/SkillOpt

Use when the user wants the dsh agent to self-improve from past usage, asks about a nightly/offline 'sleep' or 'dream' cycle, skill/memory 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 through the skillopt_* tools: harvest past sessions -> mine recurring tasks -> replay via a selected backend -> consolidate validated skills behind a held-out gate.

How to install skillopt-sleep

install skillopt-sleep
# install the SkillOpt pack with the skills CLI
npx skills add microsoft/SkillOpt

# or add only this skill to Claude Code: copy the folder

plugins/dsh/skills/skillopt-sleep/

# into

~/.claude/skills/skillopt-sleep/ (all projects)

.claude/skills/skillopt-sleep/ (one project)

plugins/dsh/skills/skillopt-sleep/SKILL.md

MITFull file
1# SkillOpt-Sleep: usage-driven self-evolution for the dsh agent
2
3SkillOpt-Sleep is Microsoft's [SkillOpt](https://github.com/microsoft/SkillOpt)
4deployment-time companion engine: it reviews your past sessions (harvest), mines
5recurring tasks (mine), replays them through a selected backend (replay), and
6consolidates what it learns into skill documents behind a **held-out validation
7gate** (consolidate).
8
9This skill drives the engine through the 7 `skillopt_*` tools exposed by the
10dsh-skillopt plugin. The default `mock` backend makes no model calls, which is
11useful for verifying the plumbing; a real backend consumes your API budget.
12
13## When to use
14
15- "make my agent better the more I use it" / "learn my preferences across sessions"
16- a one-off **offline self-evolution / sleep / dream** run (immediate or scheduled)
17- review past sessions/trajectories and distill recurring tasks
18- consolidate feedback into `AGENTS.md` / `SKILL.md` / managed skills
19- schedule (cron) the cycle, or adopt a staged proposal
20
21## The cycle (six stages)
22
231. **Harvest** — read-only scan of supported local session records → digests
242. **Mine** — digests → recurring task records (intent + outcome labels + checkable refs)
253. **Replay** — re-run tasks under the current skill+memory with the selected backend → (hard, soft) scores
264. **Consolidate** — reflect on failures → propose bounded edits → **validation gate** on a held-out slice (default: accept only on strict improvement)
27…

Excerpt shown under the repository's MIT license.

More skills in SkillOpt

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates