# Skillopt Sleep

Use when the user wants Cursor to learn from recent local sessions, asks for an offline...

- Repository: https://github.com/microsoft/SkillOpt (18804 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add microsoft/SkillOpt --skill skillopt-sleep -g -a claude-code -y`
Codex: `npx skills add microsoft/SkillOpt --skill skillopt-sleep -g -a codex -y`
Cursor: `npx skills add microsoft/SkillOpt --skill skillopt-sleep -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/SkillOpt --skill skillopt-sleep -g -a gemini-cli -y`

## Description

Use when the user wants Cursor to learn from recent local sessions, asks for an offline sleep or dream cycle, wants to consolidate recurring work into a Cursor skill, or requests SkillOpt-Sleep status, harvest, dry-run, run, scheduling, review, or adoption. Drives the validation-gated skillopt_sleep engine with Cursor transcripts and the optional Cursor Agent CLI backend.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# SkillOpt-Sleep for Cursor

SkillOpt-Sleep reviews recent local Cursor sessions, mines recurring tasks,
replays those tasks, and proposes bounded improvements to a project Cursor
skill. With the default gate enabled, a proposal is accepted only when it
improves the held-out score. A normal run stages the proposal for review;
nothing live changes until explicit adoption. There is no model-weight training.

This plugin has no session-end hook and no MCP server. Run the cycle only when
the user asks, or install a schedule only when the user explicitly requests one.

## Cursor target

Always use this project-relative target for Cursor-visible learning:

```text
.cursor/skills/skillopt-sleep-learned/SKILL.md
```

Pass it through `--target-skill-path` on `harvest`, `dry-run`, and `run`.
Without an explicit target, the shared engine uses a Claude-managed skill under
`~/.claude/skills`, which is not the intended Cursor project skill.

The shared engine can also evolve project `CLAUDE.md`. If that secondary memory
target is unwanted, set `"evolve_memory": false` in
`~/.skillopt-sleep/config.json` before running.

## Choose the runner

Use one of these supported command paths consistently:

1. Source checkout on macOS/Linux:
   `bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" <action> ...`
2. Source checkout on Windows:
   `powershell -File "$env:SKILLOPT_SLEEP_REPO\plugins\run-sleep.ps1" <action> ...`
3. Installed engine on any platform:
   `skillopt-sleep <action> ...`

If `SKILLOPT_SLEEP_REPO` is not set and `skillopt-sleep` is unavailable, stop
and explain that the engine must be installed or a SkillOpt checkout must be
selected. Do not substitute a hand-written edit for the engine workflow.

## Core workflow

The rest: https://github.com/microsoft/SkillOpt/blob/HEAD/plugins/cursor/skills/skillopt-sleep/SKILL.md
