skillopt-sleep
What it does
Reviews recent local Cursor sessions, finds recurring work, and proposes improvements to a project skill. It is for Cursor users who want their assistant to improve from real usage without manual rewriting.
When to use it
- ✓When you want Cursor to learn from your recent sessions.
- ✓When you want recurring work consolidated into a Cursor skill.
- ✓When you want to review or adopt a proposed skill change.
Skill link
https://github.com/microsoft/SkillOpt/blob/main/plugins/cursor/skills/skillopt-sleep/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Look at my recent Cursor sessions and suggest a skill that covers the work I keep repeating.”
5 new skills a week. 1 minute to read.
How it works
The skill reads your recent session records and mines recurring tasks. It replays them and stages a proposed change for review, keeping only changes that improve a held-out score. Nothing live changes until you adopt it.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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:
.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:
- Source checkout on macOS/Linux:
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" <action> ... - Source checkout on Windows:
powershell -File "$env:SKILLOPT_SLEEP_REPO\plugins\run-sleep.ps1" <action> ... - 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
- Harvest local Cursor JSONL transcripts read-only.
- Mine recurring, checkable task records from session digests.
- Replay tasks under the current skill and memory through the selected backend.
- Reflect on failures and propose bounded edits.
- Gate the candidate on held-out real tasks.
- Stage accepted proposals under
<project>/.skillopt-sleep/staging/<timestamp>/. - Adopt only after review, backing up existing live targets first.
Commands
Use the installed-command form below, or replace skillopt-sleep with the
platform-specific source runner described above.
TARGET_SKILL=.cursor/skills/skillopt-sleep-learned/SKILL.md
# Inspect current state and the latest staged proposal.
skillopt-sleep status --project "$(pwd)"
# Inspect mined tasks without provider spend.
skillopt-sleep harvest --project "$(pwd)" --source cursor \
--target-skill-path "$TARGET_SKILL" --max-sessions 5 --max-tasks 3
# First smoke check: deterministic and no provider calls.
skillopt-sleep dry-run --project "$(pwd)" --source cursor --backend mock \
--target-skill-path "$TARGET_SKILL" --max-sessions 5 --max-tasks 3 --json
# Model-driven optimization through the authenticated Cursor Agent CLI.
skillopt-sleep run --project "$(pwd)" --source cursor --backend cursor \
--target-skill-path "$TARGET_SKILL" \
--max-sessions 5 --max-tasks 3 --progress
# Inspect selections, then apply the reviewed managed proposal.
skillopt-sleep status --project "$(pwd)"
skillopt-sleep adopt --project "$(pwd)" --legacy
For fan-out proposals, use repeatable --skill NAME or --all-skills after
review. Bare adopt deliberately refuses a night containing fan-out rows.
Actions are status, harvest, dry-run, run, adopt, schedule, and
unschedule.
- Default backend is
mock, which is deterministic and makes no provider calls. --backend cursoruses the user's authenticated Cursor Agent CLI budget for model-driven mining, replay, judging, and reflection.--source cursorreads~/.cursor/projects/<workspace>/agent-transcripts/*/*.jsonl.--cursor-home PATHoverrides the Cursor home used for harvesting.--scope invokedselects the current workspace;--scope allincludes every Cursor workspace.--cursor-path PATHorSKILLOPT_SLEEP_CURSOR_PATHselects a non-defaultcursor-agentexecutable.--model NAMEorSKILLOPT_SLEEP_CURSOR_MODELoverrides the Cursor model.- Check model identifiers with
cursor-agent --list-models; when cost matters, verify the billed variant in Cursor's usage reporting. - Keep live runs bounded with
--max-sessions,--max-tasks, and--progress. - A held-out gain is evidence for that run, not a promise of general improvement.
FAQ
Does it run on its own?
No. It runs when you ask, or when you install a schedule you explicitly requested.
Where does the proposed skill go?
To a project Cursor skill folder, which is the intended target for Cursor.
Does it need an extra tool?
An optional Cursor Agent command-line backend can be used for replays.
Details
Original description by the author
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.
repo: microsoft/SkillOpt
Popularity
- GitHub stars
- 19k
- Ranking position
- #10501
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
skillopt-sleep
19kHelps your agent learn from past Codex sessions in a nightly review, testing proposed skill changes and keeping only those that score better.
skillopt-sleep
19kHelps your agent improve from past usage, reviewing sessions overnight and proposing skill and memory changes checked against a held-out score.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.