Skillopt Sleep logo

Skillopt Sleep

OrganizationPopular
microsoft
skillopt-sleep

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.

Overview

Publishermicrosoft
RepositorySkillOpt
Skill nameskillopt-sleep
Stars
17.2K
Forks
1.6K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by microsoft on GitHub. Read the source before you install it.

Installation

Install the Skillopt Sleep AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/SkillOpt.git /tmp/SkillOpt
mkdir -p .claude/skills
cp -r /tmp/SkillOpt/plugins/dsh/skills/skillopt-sleep .claude/skills/skillopt-sleep
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Skillopt Sleep in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Skillopt Sleep on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Skillopt Sleep is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

SkillOpt-Sleep: usage-driven self-evolution for the dsh agent

SkillOpt-Sleep is Microsoft's SkillOpt deployment-time companion engine: it reviews your past sessions (harvest), mines recurring tasks (mine), replays them through a selected backend (replay), and consolidates what it learns into skill documents behind a held-out validation gate (consolidate).

This skill drives the engine through the 7 skillopt_* tools exposed by the dsh-skillopt plugin. The default mock backend makes no model calls, which is useful for verifying the plumbing; a real backend consumes your API budget.

When to use

  • "make my agent better the more I use it" / "learn my preferences across sessions"
  • a one-off offline self-evolution / sleep / dream run (immediate or scheduled)
  • review past sessions/trajectories and distill recurring tasks
  • consolidate feedback into AGENTS.md / SKILL.md / managed skills
  • schedule (cron) the cycle, or adopt a staged proposal

The cycle (six stages)

  1. Harvest — read-only scan of supported local session records → digests
  2. Mine — digests → recurring task records (intent + outcome labels + checkable refs)
  3. Replay — re-run tasks under the current skill+memory with the selected backend → (hard, soft) scores
  4. Consolidate — reflect on failures → propose bounded edits → validation gate on a held-out slice (default: accept only on strict improvement)
  5. Stage — write accepted proposals to <project>/.skillopt-sleep/staging/<timestamp>/. Live files are unchanged. A rejected run still has a report but no proposal files.
  6. Adopt — explicit (or operator-configured --auto-adopt) copies staged files over live ones, backing up first.

Driving it

Prefer the tools over hand-editing files:

ToolBehavior
skillopt_statusstate, engine availability, latest staged proposal & report
skillopt_dry_runfull preview (harvest+mine+replay), stages nothing
skillopt_runfull cycle, stages a proposal (live files unchanged by default)
skillopt_adoptapply latest staged proposal (with backup) — the live-change boundary
skillopt_harvestread-only show/export of mined tasks
skillopt_schedule / skillopt_unscheduleinstall/remove the nightly cron entry for this project

Typical flow:

text
# 1. check state (default mock backend, zero cost)
skillopt_status

# 2. preview the cycle
skillopt_dry_run project=<dir> source=<claude|codex|…>

# 3. real run (consumes the selected backend's API budget)
skillopt_run project=<dir> backend=<codex|claude|…> preferences="Prefer pytest; keep commits imperative."

# 4. review the report, then adopt
skillopt_adopt project=<dir>

# 5. schedule nightly at 03:17
skillopt_schedule project=<dir> hour=3 minute=17 backend=<codex>

Parameters

ParameterDefaultMeaning
projectconfig or cwdproject directory to evolve
backendmockmock|claude|codex|copilot|cursor|pi|opencode|handoff|azure_openai (mock = no model calls)
sourceconfigtranscript source: claude|codex|copilot|cursor|pi|opencode|auto
modelbackend defaultreplay model override
maxTasks40mined-task cap
preferencesemptyhouse rules for the reflection prior (e.g. "always use async/await")

Configuration (cordis.yml / bundle patch)

yaml
- insert:
    - id: skillopt
      name: './src/index.js'
      config:
        backend: codex
        project: /path/to/project
        preferences: 'Always use async/await'
        # auto-adopt is OPERATOR-ONLY — the model cannot set it
        autoAdopt: false

Advanced engine keys go in ~/.skillopt-sleep/config.json: gate_mode (on/off), gate_metric (hard/soft/mixed), gate_no_regression, dream_rollouts, recall_k, evolve_memory / evolve_skill.

Hard rules

  • Never hand-edit AGENTS.md / SKILL.md around skillopt_adopt; let the engine's explicit adopt (or operator-configured --auto-adopt) apply the staging manifest, backing up live files first.
  • Harvest is read-only; mock replay has no side effects.
  • Real backends send truncated transcript excerpts and derived tasks to the selected provider for mining/replay/judging/reflection. For sensitive sessions, export tasks first (skillopt_harvest output=<file>), redact, set the top-level "reviewed" to true, then replay with --tasks-file; real backends refuse unreviewed task files.
  • Show the user the held-out baseline → candidate score and the exact proposed edits before suggesting adoption. Evidence before adoption.

Validate / demo (no API spend)

bash
pip install skillopt
python -m skillopt_sleep.experiments.run_experiment --persona researcher --assert-improves

Deterministic synthetic demo: the score rises and the gate blocks a regression. It validates the mechanism, not effectiveness on your own tasks.

See the SkillOpt-Sleep docs for recorded results and limitations.

Frequently asked questions

What does the Skillopt Sleep AI skill do?

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.

Why use Skillopt Sleep on TypingMind?

Because you install it once and use it with any model. Skillopt Sleep is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Skillopt Sleep in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/microsoft/SkillOpt/tree/main/plugins/dsh/skills/skillopt-sleep. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Skillopt Sleep?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Skillopt Sleep?

As many as you like. As long as a model supports skills, you can use Skillopt Sleep with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Skillopt Sleep AI skill free?

Yes. It is published on GitHub by microsoft under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇